Timetabler
instructor.cpp
1 #include "fields/instructor.h"
2 
3 #include <string>
4 #include "global.h"
5 
12 Instructor::Instructor(std::string name) { this->name = name; }
13 
22 bool Instructor::operator==(const Instructor &other) {
23  return (this->name == other.name);
24 }
25 
31 FieldType Instructor::getType() { return FieldType::instructor; }
32 
38 std::string Instructor::getName() { return name; }
39 
45 std::string Instructor::getTypeName() { return "Instructor"; }
FieldType getType()
Gets the type under the FieldType enum.
Definition: instructor.cpp:31
Instructor(std::string)
Constructs the Instructor object.
Definition: instructor.cpp:12
Class for an instructor.
Definition: instructor.h:13
bool operator==(const Instructor &other)
Checks if two Instructor objects are identical, i.e., if both have the same name. ...
Definition: instructor.cpp:22
FieldType
Enum that represents all the field types.
Definition: global.h:9
std::string getTypeName()
Gets the type name, which is "Instructor".
Definition: instructor.cpp:45
std::string getName()
Gets the name of the Instructor.
Definition: instructor.cpp:38