#include <BESCatalogList.h>
Inheritance diagram for BESCatalogList:
Public Types | |
typedef map< string, BESCatalog * >::iterator | catalog_iter |
typedef map< string, BESCatalog * >::const_iterator | catalog_citer |
Public Member Functions | |
BESCatalogList () | |
virtual | ~BESCatalogList () |
list destructor deletes all registered catalogs | |
virtual bool | add_catalog (BESCatalog *catalog) |
adds the speciifed catalog to the list | |
virtual bool | del_catalog (const string &catalog_name) |
remove from the list and delete the specified catalog | |
virtual BESCatalog * | find_catalog (const string &catalog_name) |
find the catalog in the list with the specified name | |
virtual void | show_catalog (const string &container, const string &catalog_or_info, BESInfo *info) |
show the contents of the catalog given the specified container | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
Static Public Member Functions | |
static BESCatalogList * | TheCatalogList () |
returns the singleton BESCatalogList instance |
BESCatalog objecgts can be registered with this list. The BES allows for multiple catalogs. Most installations will have a single catalog registered.
Catalogs have a uniq name
If there is only one catalog then the display of the root will be the display of that catalogs root.
If there are more than one catalogs registered then the view of the root will display the list of catalogs registered. To view the contents of a specific catalog begin each container name with the name of the catalog followed by a colon.
show catalog for "cedar_catalog:/instrument/5340/year/2004/";
typedef map<string,BESCatalog *>::const_iterator BESCatalogList::catalog_citer |
typedef map<string,BESCatalog *>::iterator BESCatalogList::catalog_iter |
BESCatalogList::BESCatalogList | ( | ) | [inline] |
BESCatalogList::~BESCatalogList | ( | ) | [virtual] |
bool BESCatalogList::add_catalog | ( | BESCatalog * | catalog | ) | [virtual] |
adds the speciifed catalog to the list
catalog | new catalog to add to the list |
bool BESCatalogList::del_catalog | ( | const string & | catalog_name | ) | [virtual] |
remove from the list and delete the specified catalog
Search the list for the catalog with the given name. If the catalog exists, remove it from the list and delete it.
catalog_name | name of the catalog to delete |
void BESCatalogList::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance along with the catalogs registered in this list.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
BESCatalog * BESCatalogList::find_catalog | ( | const string & | catalog_name | ) | [virtual] |
find the catalog in the list with the specified name
catalog_name | name of the catalog to find |
void BESCatalogList::show_catalog | ( | const string & | container, | |
const string & | coi, | |||
BESInfo * | info | |||
) | [virtual] |
show the contents of the catalog given the specified container
This method adds information about the specified container to the informational object specified.
If there is only one catalog registered then the container must be a node within that one catalog.
if there are more than one catalog registered then:
If coi is catalog then if the specified container is a collection then display the elements in the collection. If coi is info then display information about only the specified container and not its contents if a collection.
If there is a problem accessing the requested node then the reason for the problem must be included in the informational response, not an exception thrown. This method will not throw an exception.
container | node to display, empty means root | |
coi | is the request to include collections or just the specified container | |
info | informational object to add information to |
BESSyntaxUserError | if more than one catalog and no catalog specified; if the specified catalog does not exist; if the container within the catalog does not exist. |
BESCatalogList * BESCatalogList::TheCatalogList | ( | ) | [static] |
returns the singleton BESCatalogList instance