3 Stop::Stop (const Position& position, const Direction& direction)
5 , direction_(direction)
7 // Intentionally Left Empty
10 bool Stop::operator== (const Stop& rhs) const
12 if (rhs.position_ != position_)
15 if (direction_ == ALL || rhs.direction_ == ALL)
18 return (rhs.direction_ == direction_);
21 bool Stop::operator< (const Stop& rhs) const
23 /* If we do not use the direction to help differentiate, then it is
24 * possible that an object can be neither less, greater, or equal */
25 return (position_ < rhs.position_);
28 bool Stop::operator> (const Stop& rhs) const
30 return (position_ > rhs.position_);
33 const Direction Stop::getDirection () const
38 const Position Stop::getPosition () const
43 std::ostream& operator<< (std::ostream& os, const Stop& rhs)
45 os << "Stop(" << rhs.position_ << ", "; // << rhs.direction_ << ")";
47 switch (rhs.direction_)
71 /* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */