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;
22  unsigned size;
23 public:
24  Classroom(std::string, unsigned);
25  bool operator==(const Classroom &other);
26  bool sizeLessThan(const Classroom &other);
28  std::string getTypeName();
29  std::string getName();
30  unsigned getSize();
31 };
32 
33 #endif
Class for a classroom.
Definition: classroom.h:13
std::string getTypeName()
Gets the type name, which is "Classroom".
Definition: classroom.cpp:55
Class for a field.
Definition: field.h:14
FieldType
Enum that represents all the field types.
Definition: global.h:10
bool sizeLessThan(const Classroom &other)
Checks if the size of this Classroom is less than the size of another.
Definition: classroom.cpp:37
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:73
FieldType getType()
Gets the type under the FieldType enum.
Definition: classroom.cpp:46
std::string getName()
Gets the class number of the Classroom.
Definition: classroom.cpp:64