Use Finite State Machine to manage Elevator movement
[cs356-p1-elevator.git] / position.hpp
1 /*
2  * CS356 Project 01 -- Elevator Simulator
3  *
4  * Position Class Specification
5  */
6
7 #ifndef POSITION_HPP
8 #define POSITION_HPP
9
10 #include <iostream>
11
12 class Position
13 {
14         friend std::ostream& operator<< (std::ostream& os, const Position& rhs);
15
16         public:
17                 Position ();
18                 Position (int initial_position);
19
20                 Position& operator+= (const float rhs);
21                 Position& operator-= (const float rhs);
22
23                 bool operator== (const Position& rhs) const;
24                 bool operator!= (const Position& rhs) const;
25                 bool operator< (const Position& rhs) const;
26                 bool operator> (const Position& rhs) const;
27                 Position operator- (const Position& rhs) const;
28                 operator float() const;
29
30
31         private:
32                 int major_;
33                 int minor_;
34 };
35
36 #endif /* POSITION_HPP */
37
38 /* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */