// PlacementCategoryId.h #ifndef hes_PlacementCategoryId_H #define hes_PlacementCategoryId_H // David Adams // February 2002 // // A placement category ID carries the information required // to locate a placement category: file ID, event ID and placement // category name. #include #include #include "hesbase/Name.h" #include "hesbase/FileId.h" #include "hesbase/EventId.h" namespace hes { class PlacementCategoryId { private: // data FileId m_fid; EventId m_eid; Name m_name; public: // non-const functions // Default constructor. // Creates an invalid object. PlacementCategoryId(); // Constructor from contents. // All must be valid (name must have a nonzero length). PlacementCategoryId(FileId fid, EventId eid, Name name); public: // const functions // Is this object valid? // Valid if contents are all valid. bool is_valid() const; // Return the file ID. FileId file_id() const; // Return the event ID. EventId event_id() const; // Return the name of the placement category. Name name() const; }; } // end namespace // Ordering. bool operator<(const hes::PlacementCategoryId& lhs, const hes::PlacementCategoryId& rhs); // Equality. bool operator==(const hes::PlacementCategoryId& lhs, const hes::PlacementCategoryId& rhs); // Inequality. bool operator!=(const hes::PlacementCategoryId& lhs, const hes::PlacementCategoryId& rhs); // Output stream. std::ostream& operator<<(std::ostream& lhs, const hes::PlacementCategoryId& rhs); #endif