Timetabler
classroom.h
Go to the documentation of this file.
1 
3 #ifndef CLASSROOM_H
4 #define CLASSROOM_H
5 
6 #include <string>
7 #include "fields/field.h"
8 #include "global.h"
9 
13 class Classroom : public Field {
14  private:
18  std::string number;
23  unsigned size;
24 
25  public:
26  Classroom(std::string, unsigned);
27  bool operator==(const Classroom &other);
28  bool sizeLessThan(const Classroom &other);
30  std::string getTypeName();
31  std::string getName();
32  unsigned getSize();
33 };
34 
35 #endif
Class for a classroom.
Definition: classroom.h:13
std::string getTypeName()
Gets the type name, which is "Classroom".
Definition: classroom.cpp:54
Class for a field.
Definition: field.h:14
FieldType
Enum that represents all the field types.
Definition: global.h:9
bool sizeLessThan(const Classroom &other)
Checks if the size of this Classroom is less than the size of another.
Definition: classroom.cpp:38
Classroom(std::string, unsigned)
Constructs the object.
Definition: classroom.cpp:12
bool operator==(const Classroom &other)
Overloads the == operator to check for equality.
Definition: classroom.cpp:26
unsigned getSize()
Gets the size of the Classroom.
Definition: classroom.cpp:68
FieldType getType()
Gets the type under the FieldType enum.
Definition: classroom.cpp:47
std::string getName()
Gets the class number of the Classroom.
Definition: classroom.cpp:61