// Copyright {Jagger Software Limited} 2003 #ifndef GRAMMAR_BOUND_INCLUDED #define GRAMMAR_BOUND_INCLUDED #include "grammar/infinity.hpp" #include #include namespace grammar { class bound // <> { public: // 'tors bound(size_t value); bound(infinity_type infinity); // compiler generated copy-c'tor ok // compiler generated non virtual d'tor ok // compiler generated copy assignment ok public: // increment bound & operator++(); const bound operator++(int); public: // primitives int compare(const bound &) const; void write(::std::ostream &) const; private: // representation size_t value; bool is_infinity; }; // bound - idiomatic operators bool operator==(const bound &, const bound &); bool operator!=(const bound &, const bound &); bool operator< (const bound &, const bound &); bool operator<=(const bound &, const bound &); bool operator> (const bound &, const bound &); bool operator>=(const bound &, const bound &); ::std::ostream & operator<<(::std::ostream &, const bound &); } #endif