bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESCatalogList Class Reference

List of all registered catalogs. More...

#include <BESCatalogList.h>

Inheritance diagram for BESCatalogList:
Inheritance graph
Collaboration diagram for BESCatalogList:
Collaboration graph

Public Types

typedef std::map< std::string, BESCatalog * >::const_iterator catalog_citer
 
typedef std::map< std::string, BESCatalog * >::iterator catalog_iter
 

Public Member Functions

virtual bool add_catalog (BESCatalog *catalog)
 
virtual BESCatalogdefault_catalog () const
 The the default catalog.
 
virtual std::string default_catalog_name () const
 The name of the default catalog.
 
virtual bool deref_catalog (const std::string &catalog_name)
 
virtual void dump (std::ostream &strm) const
 dump the contents of this object to the specified ostream
 
virtual int empty () const
 
virtual catalog_citer end_catalog () const
 Iterator to the last catalog.
 
virtual BESCatalogfind_catalog (const std::string &catalog_name) const
 
virtual catalog_citer first_catalog () const
 Iterator to the first catalog.
 
virtual int num_catalogs () const
 The number of non-default catalogs.
 
virtual bool ref_catalog (const std::string &catalog_name)
 
virtual BESCatalogEntryshow_catalogs (BESCatalogEntry *entry, bool show_default=true)
 

Static Public Member Functions

static BESCatalogListTheCatalogList ()
 

Friends

class BESCatalogListTest
 

Detailed Description

List of all registered catalogs.

Catalogs are a way of organizing data into a tree. Every BES daemon has at least one catalog, the default catalog (confusingly named 'catalog.') In general, this is the daemon's local file system.

Multiple BESCatalog objects can be registered with this list. However, most installations have a single catalog registered (the default catalog) which provides access to files on the host computer's local file system.

Each catalog in the list must have a unique name.

The BESCatalogList class is a singleton. The catalogs (represented by specializations of the BESCatalog class) are held in a reference-counted list. Handlers typically try to add the catalog they use, and if that fails because the catalog is already in the list, they increment its reference. See add_catalog() and ref_catalog(). When the singleton's instance is deleted, so are all of the catalogs, regardless of their reference count.

See also
BESCatalog

Definition at line 84 of file BESCatalogList.h.

Member Typedef Documentation

◆ catalog_citer

typedef std::map<std::string,BESCatalog*>::const_iterator BESCatalogList::catalog_citer

Definition at line 103 of file BESCatalogList.h.

◆ catalog_iter

typedef std::map<std::string,BESCatalog*>::iterator BESCatalogList::catalog_iter

Definition at line 102 of file BESCatalogList.h.

Member Function Documentation

◆ default_catalog()

virtual BESCatalog * BESCatalogList::default_catalog ( ) const
inlinevirtual

The the default catalog.

Definition at line 118 of file BESCatalogList.h.

◆ default_catalog_name()

virtual std::string BESCatalogList::default_catalog_name ( ) const
inlinevirtual

The name of the default catalog.

Definition at line 116 of file BESCatalogList.h.

◆ dump()

virtual void BESCatalogList::dump ( std::ostream & strm) const
virtual

dump the contents of this object to the specified ostream

This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...

The inline function below can be used to dump the contents of an OPeNDAPObj object. For example, the object Animal is derived from BESObj. A user could do the following:

Animal *a = new dog( "Sparky" ) ; cout << a << endl ;

And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...

Parameters
strmC++ i/o stream to dump the object to

Implements BESObj.

◆ empty()

virtual int BESCatalogList::empty ( ) const
inlinevirtual

Definition at line 113 of file BESCatalogList.h.

◆ end_catalog()

virtual catalog_citer BESCatalogList::end_catalog ( ) const
inlinevirtual

Iterator to the last catalog.

Definition at line 133 of file BESCatalogList.h.

◆ first_catalog()

virtual catalog_citer BESCatalogList::first_catalog ( ) const
inlinevirtual

Iterator to the first catalog.

Definition at line 130 of file BESCatalogList.h.

◆ num_catalogs()

virtual int BESCatalogList::num_catalogs ( ) const
inlinevirtual

The number of non-default catalogs.

Todo
Change this to include the default!

Definition at line 112 of file BESCatalogList.h.

Friends And Related Symbol Documentation

◆ BESCatalogListTest

friend class BESCatalogListTest
friend

Definition at line 99 of file BESCatalogList.h.


The documentation for this class was generated from the following file: