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 /* This is here to keep the order with "ALL" stops correct */
16 if (direction_ == ALL || rhs.direction_ == ALL)
19 return (rhs.direction_ == direction_);
22 bool Stop::operator< (const Stop& rhs) const
24 /* If we do not use the direction to help differentiate, then it is
25 * possible that an object can be neither less, greater, or equal */
26 return (position_ < rhs.position_);
29 bool Stop::operator> (const Stop& rhs) const
31 return (position_ > rhs.position_);
34 const Direction Stop::getDirection () const
39 const Position Stop::getPosition () const
44 std::ostream& operator<< (std::ostream& os, const Stop& rhs)
46 os << "Stop(" << rhs.position_ << ", "; // << rhs.direction_ << ")";
48 switch (rhs.direction_)
71 /* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */