33 #ifndef BESCatalogList_h_ 34 #define BESCatalogList_h_ 1 43 #include "BESDataHandlerInterface.h" 48 #define BES_DEFAULT_CATALOG "catalog" 73 map<string, BESCatalog *> _catalogs ;
74 string _default_catalog ;
77 static void initialize_instance();
78 static void delete_instance();
82 friend class BESCatalogListUnitTest;
89 typedef map<string,BESCatalog *>::iterator catalog_iter ;
90 typedef map<string,BESCatalog *>::const_iterator catalog_citer ;
95 virtual int num_catalogs() {
return _catalogs.size() ; }
96 virtual string default_catalog() {
return _default_catalog ; }
99 virtual bool ref_catalog(
const string &catalog_name ) ;
104 bool show_default =
true ) ;
106 virtual catalog_iter first_catalog() {
return _catalogs.begin() ; }
107 virtual catalog_iter end_catalog() {
return _catalogs.end() ; }
109 virtual void dump( ostream &strm )
const ;
113 #endif // BESCatalogList_h_ virtual BESCatalog * find_catalog(const string &catalog_name)
find the catalog in the list with the specified name
virtual bool add_catalog(BESCatalog *catalog)
adds the speciifed catalog to the list
virtual BESCatalogEntry * show_catalogs(BESDataHandlerInterface &dhi, BESCatalogEntry *entry, bool show_default=true)
show the list of catalogs
virtual void dump(ostream &strm) const
dumps information about this object
Base object for bes objects.
virtual bool ref_catalog(const string &catalog_name)
reference the specified catalog
List of all registered catalogs.
virtual bool deref_catalog(const string &catalog_name)
de-reference the specified catalog and remove from list if no longer referenced
BESCatalogList()
construct a catalog list
abstract base class catalog object. Derived classes know how to show nodes and leaves in a catalog...
Structure storing information used by the BES to handle the request.
static BESCatalogList * TheCatalogList()
returns the singleton BESCatalogList instance. The pthreads library insures that only one instance ca...