// EdoTypeKey.h #ifndef hes_EdoTypeKey_H #define hes_EdoTypeKey_H // David Adams // February 2002 // // EDO type-key. #include #include #include #include "EdoType.h" #include "EdoKey.h" namespace hes { class EdoTypeKey { private: // data EdoType m_type; EdoKey m_key; public: // methods // Default constructor. // Leaves type-key in an invalid state. EdoTypeKey(); // Constructor from a type and key. // Both must be valid for the type-key to be valid. EdoTypeKey(hes::EdoType type, hes::EdoKey key); // Return if this is avalid type-key. // Both type and key must be valid. bool is_valid() const; // Return the type. EdoType type() const; // Return the key. EdoKey key() const; }; } // end namespace // Ordering. bool operator<(const hes::EdoTypeKey& lhs, const hes::EdoTypeKey& rhs); // Equality. bool operator==(const hes::EdoTypeKey& lhs, const hes::EdoTypeKey& rhs); // Inequality bool operator!=(const hes::EdoTypeKey& lhs, const hes::EdoTypeKey& rhs); // Output stream. std::ostream& operator<<(std::ostream& lhs, const hes::EdoTypeKey& rhs); #endif