Experimental Changes
[cs356-p1-elevator.git] / stop.hpp
1 /*
2  * CS356 Project 01 -- Elevator Simulator
3  *
4  * Stop Class Specification
5  */
6
7 #ifndef STOP_HPP
8 #define STOP_HPP
9
10 #include "position.hpp"
11 #include "direction.hpp"
12
13 class Stop : public Position
14 {
15         public:
16                 /* PURPOSE: Construct a new Stop object, and set the floor and direction
17                  *
18                  * REQUIRE: Nothing
19                  *
20                  * PROMISE: A new Stop object will be created
21                  */
22                 Stop (int floor, enum direction mydirection);
23
24
25                 Stop (Position pos, enum direction mydirection);
26
27                 /*
28                  * PURPOSE: Check if this and another Stop object is equivalent
29                  *
30                  * REQUIRE: rhs is a valid Stop object
31                  *
32                  * PROMISE: Return true if this and rhs are equivalent, false otherwise
33                  */
34                 bool operator== (Stop& rhs);
35                 friend std::ostream& operator<< (std::ostream& os, Stop& rhs);
36
37         private:
38
39                 /* Storage for the direction */
40                 enum direction _direction;
41 };
42
43 #endif /* STOP_HPP */
44
45 /* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */