Timetabler
Public Member Functions | List of all members
Classroom Class Reference

Class for a classroom. More...

#include <classroom.h>

Inheritance diagram for Classroom:
Inheritance graph
[legend]
Collaboration diagram for Classroom:
Collaboration graph
[legend]

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...
 

Detailed Description

Class for a classroom.

Constructor & Destructor Documentation

Classroom::Classroom ( std::string  number,
unsigned  size 
)

Constructs the object.

Parameters
[in]numberThe Classroom number, a unique identifier
[in]sizeThe number of students the Classroom can hold

Member Function Documentation

std::string Classroom::getName ( )

Gets the class number of the Classroom.

Returns
The class number, which is unique identifier of the Classroom
unsigned Classroom::getSize ( )

Gets the size of the Classroom.

Returns
The size of the Classroom
FieldType Classroom::getType ( )
virtual

Gets the type under the FieldType enum.

Returns
A member of the FieldType enum, which is FieldType::classroom

Implements Field.

std::string Classroom::getTypeName ( )
virtual

Gets the type name, which is "Classroom".

Returns
The string "Classroom"

Implements Field.

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.

Parameters
[in]otherThe Classroom with which the comparison is being done
Returns
Returns true if equal, false otherwise
bool Classroom::sizeLessThan ( const Classroom other)

Checks if the size of this Classroom is less than the size of another.

Parameters
[in]otherThe Classroom with which the comparison is being done
Returns
Returns true if less, false othewise

The documentation for this class was generated from the following files: