// JobId.h #ifndef dial__JobId_H #define dial__JobId_H // Identifier for jobs. // // XML: // // JobId // collection = 123 // entry = 456 #include "dataset_id/UniqueId.h" class UniqueIdGenerator; namespace dial { class JobId : public UniqueId { public : // static functions // Return the xml name. static const char* xml_name() { return "JobId"; } // DTD. static const Text& dtd(); // Return the ID context. static const char* id_context() { return "Job"; } // Return the ID generator. static UniqueIdGenerator* generator(); // Return the next unused ID. static JobId generate(); public : // functions // Default constructor. JobId(); // Constructor from an UniqueID. JobId(const UniqueId& uid); // Constructor from collection and entry. JobId(Index col, Index ent); // Constructor from string specifying collection and entry. // Format is iii-jjj where iii=collectiona dn jjj=entry. explicit JobId(std::string sid); // Constructor from XML. JobId(const XmlElement& ele); // Write to XML. const XmlElement* xml() const; }; } // end namespace dial #endif