35 using std::ostringstream ;
54 string key =
"BES.Catalog.Default" ;
63 if( !found || _default_catalog.empty() )
80 if( catalog )
delete catalog ;
103 std::pair<const std::string, BESCatalog*> p =
104 std::make_pair( name, catalog ) ;
105 result = _catalogs.insert(p).second;
130 i = _catalogs.find( catalog_name ) ;
131 if( i != _catalogs.end() )
157 i = _catalogs.find( catalog_name ) ;
158 if( i != _catalogs.end() )
163 _catalogs.erase( i ) ;
182 i = _catalogs.find( catalog_name ) ;
183 if( i != _catalogs.end() )
252 << (
void *)
this <<
")" << endl ;
255 << _default_catalog << endl ;
256 if( _catalogs.size() )
virtual BESCatalog * find_catalog(const string &catalog_name)
find the catalog in the list with the specified name
#define SHOW_INFO_RESPONSE
virtual BESCatalogEntry * show_catalog(const string &container, const string &coi, BESCatalogEntry *entry)=0
virtual bool add_catalog(BESCatalog *catalog)
adds the speciifed catalog to the list
virtual unsigned int dereference_catalog()
virtual BESCatalogEntry * show_catalogs(BESDataHandlerInterface &dhi, BESCatalogEntry *entry, bool show_default=true)
show the list of catalogs
virtual bool ref_catalog(const string &catalog_name)
reference the specified catalog
List of all registered catalogs.
virtual void dump(ostream &strm) const
dumps information about this object
Abstract exception class for the BES with basic string message.
virtual string default_catalog()
virtual bool deref_catalog(const string &catalog_name)
de-reference the specified catalog and remove from list if no longer referenced
static ostream & LMarg(ostream &strm)
#define BES_DEFAULT_CATALOG
virtual ~BESCatalogList()
list destructor deletes all registered catalogs
BESCatalogList()
construct a catalog list
abstract base class catalog object.
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
Structure storing information used by the BES to handle the request.
virtual void reference_catalog()
virtual string get_catalog_name()
static BESCatalogList * TheCatalogList()
returns the singleton BESCatalogList instance
static BESKeys * TheKeys()
map< string, BESCatalog * >::iterator catalog_iter
map< string, BESCatalog * >::const_iterator catalog_citer