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

Catalogs provide a hierarchical organization for data. More...

#include <BESCatalog.h>

Inheritance diagram for BESCatalog:
Inheritance graph
Collaboration diagram for BESCatalog:
Collaboration graph

Public Member Functions

 BESCatalog (const std::string &catalog_name)
 
virtual unsigned int dereference_catalog ()
 Decrement the count of clients that reference this catalog.
 
virtual void dump (std::ostream &strm) const =0
 dump the contents of this object to the specified ostream
 
virtual std::string get_catalog_name () const
 Get the name for this catalog.
 
virtual BESCatalogUtilsget_catalog_utils () const
 Get a pointer to the utilities, customized for this catalog.
 
virtual bes::CatalogNodeget_node (const std::string &path) const =0
 
virtual std::string get_root () const =0
 
virtual void get_site_map (const std::string &prefix, const std::string &node_suffix, const std::string &leaf_suffix, std::ostream &out, const std::string &path="/") const =0
 
virtual void reference_catalog ()
 Increase the count of clients that reference this catalog.
 
virtual BESCatalogEntryshow_catalog (const std::string &container, BESCatalogEntry *entry)=0
 

Detailed Description

Catalogs provide a hierarchical organization for data.

Definition at line 51 of file BESCatalog.h.

Constructor & Destructor Documentation

◆ BESCatalog()

BESCatalog::BESCatalog ( const std::string & catalog_name)
explicit

Definition at line 35 of file BESCatalog.cc.

◆ ~BESCatalog()

BESCatalog::~BESCatalog ( )
virtual

Definition at line 40 of file BESCatalog.cc.

Member Function Documentation

◆ dereference_catalog()

virtual unsigned int BESCatalog::dereference_catalog ( )
inlinevirtual

Decrement the count of clients that reference this catalog.

Returns
The number of clients that reference this BESCatalog instance
See also
reference_catalog()

Definition at line 91 of file BESCatalog.h.

◆ dump()

virtual void BESCatalog::dump ( std::ostream & strm) const
pure 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.

Implemented in BESCatalogDirectory, cmr::CmrCatalog, and httpd_catalog::HttpdCatalog.

◆ get_catalog_name()

virtual std::string BESCatalog::get_catalog_name ( ) const
inlinevirtual

Get the name for this catalog.

Returns
The catalog.

Definition at line 102 of file BESCatalog.h.

◆ get_catalog_utils()

virtual BESCatalogUtils * BESCatalog::get_catalog_utils ( ) const
inlinevirtual

Get a pointer to the utilities, customized for this catalog.

Returns
A BESCatalogUtils pointer.

Definition at line 112 of file BESCatalog.h.

◆ get_node()

virtual bes::CatalogNode * BESCatalog::get_node ( const std::string & path) const
pure virtual

◆ get_root()

virtual std::string BESCatalog::get_root ( ) const
pure virtual

The 'root prefix' for a catalog. For catalogs rooted in the file system, this is the pathname to that directory. If the idea of a 'root prefix' makes no sense for a particular kind of catalog, this should be the empty string.

Returns
The root prefix for the catalog.

Implemented in BESCatalogDirectory, cmr::CmrCatalog, and httpd_catalog::HttpdCatalog.

◆ get_site_map()

virtual void BESCatalog::get_site_map ( const std::string & prefix,
const std::string & node_suffix,
const std::string & leaf_suffix,
std::ostream & out,
const std::string & path = "/" ) const
pure virtual

◆ reference_catalog()

virtual void BESCatalog::reference_catalog ( )
inlinevirtual

Increase the count of clients that reference this catalog.

This class maintains a count of the clients that reference the catalog. When count of clients drops to zero, the instance can be deleted.

Todo
Revisit the reference counting behavior - maybe there's a better way to manage these catalogs?

Definition at line 80 of file BESCatalog.h.

◆ show_catalog()

virtual BESCatalogEntry * BESCatalog::show_catalog ( const std::string & container,
BESCatalogEntry * entry )
pure virtual

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