// DatasetIdList.h #ifndef DatasetIdList_H #define DatasetIdList_H // David Adams // July 2002 // // A sorted collection of Dataset ID's. // // XML format: // // DatasetIdList // DatasetId // collection = 123 // entry = 456 // DatasetId // collection = 123 // entry = 457 #include #include #include "dataset_id/DatasetId.h" class XmlElement; class DatasetIdList : public std::multiset { public: // static functions // XML name static const char* xml_name() { return "DatasetIdList"; } // XML DTD. static const Text& dtd(); public: // functions // Default constructor. DatasetIdList(); // Construct from XML. // If try_children is true, then the children are searched for a // DatasetId list if ele is not such. explicit DatasetIdList(const XmlElement& ele, bool try_children =false); // Convert to XML. const XmlElement* xml() const; // Output stream with indent. // If the last argument is not null, then constituent ID's // are written as HTML links using that location as base, e.g.:: // baseurl?did=123-456 std::ostream& ostr(std::ostream& lhs, std:: string indent, std::string repurl ="") const; }; // Output stream. std::ostream& operator<<(std::ostream& lhs, const DatasetIdList& rhs); #endif