Timetabler
|
Class for a classroom. More...
#include <classroom.h>
Public Member Functions | |
Classroom (std::string, unsigned) | |
Constructs the object. More... | |
bool | operator== (const Classroom &other) |
Overloads the == operator to check for equality. More... | |
bool | sizeLessThan (const Classroom &other) |
Checks if the size of this Classroom is less than the size of another. More... | |
FieldType | getType () |
Gets the type under the FieldType enum. More... | |
std::string | getTypeName () |
Gets the type name, which is "Classroom". More... | |
std::string | getName () |
Gets the class number of the Classroom. More... | |
unsigned | getSize () |
Gets the size of the Classroom. More... | |
Class for a classroom.
Definition at line 13 of file classroom.h.
Classroom::Classroom | ( | std::string | number, |
unsigned | size | ||
) |
Constructs the object.
[in] | number | The Classroom number, a unique identifier |
[in] | size | The number of students the Classroom can hold |
Definition at line 12 of file classroom.cpp.
std::string Classroom::getName | ( | ) |
Gets the class number of the Classroom.
Definition at line 61 of file classroom.cpp.
unsigned Classroom::getSize | ( | ) |
Gets the size of the Classroom.
Definition at line 68 of file classroom.cpp.
|
virtual |
Gets the type under the FieldType enum.
Implements Field.
Definition at line 47 of file classroom.cpp.
|
virtual |
Gets the type name, which is "Classroom".
Implements Field.
Definition at line 54 of file classroom.cpp.
bool Classroom::operator== | ( | const Classroom & | other | ) |
Overloads the == operator to check for equality.
Two classrooms are said to be equal if their numbers are identical.
[in] | other | The Classroom with which the comparison is being done |
Definition at line 26 of file classroom.cpp.
bool Classroom::sizeLessThan | ( | const Classroom & | other | ) |
Checks if the size of this Classroom is less than the size of another.
[in] | other | The Classroom with which the comparison is being done |
Definition at line 38 of file classroom.cpp.