projects
/
cs356-p1-elevator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Experimental Changes
[cs356-p1-elevator.git]
/
stop.hpp
diff --git
a/stop.hpp
b/stop.hpp
index
21e9ac3
..
c7256bc
100644
(file)
--- a/
stop.hpp
+++ b/
stop.hpp
@@
-10,7
+10,7
@@
#include "position.hpp"
#include "direction.hpp"
#include "position.hpp"
#include "direction.hpp"
-class Stop
+class Stop
: public Position
{
public:
/* PURPOSE: Construct a new Stop object, and set the floor and direction
{
public:
/* PURPOSE: Construct a new Stop object, and set the floor and direction
@@
-21,6
+21,9
@@
class Stop
*/
Stop (int floor, enum direction mydirection);
*/
Stop (int floor, enum direction mydirection);
+
+ Stop (Position pos, enum direction mydirection);
+
/*
* PURPOSE: Check if this and another Stop object is equivalent
*
/*
* PURPOSE: Check if this and another Stop object is equivalent
*
@@
-29,10
+32,9
@@
class Stop
* PROMISE: Return true if this and rhs are equivalent, false otherwise
*/
bool operator== (Stop& rhs);
* PROMISE: Return true if this and rhs are equivalent, false otherwise
*/
bool operator== (Stop& rhs);
+ friend std::ostream& operator<< (std::ostream& os, Stop& rhs);
private:
private:
- /* Storage for the floor */
- Position _floor;
/* Storage for the direction */
enum direction _direction;
/* Storage for the direction */
enum direction _direction;