OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
BESDefinitionStorage Class Referenceabstract

provides persistent storage for a specific view of different containers including contraints and aggregation. More...

#include <BESDefinitionStorage.h>

Inheritance diagram for BESDefinitionStorage:
Inheritance graph
Collaboration diagram for BESDefinitionStorage:
Collaboration graph

Public Member Functions

virtual bool add_definition (const string &def_name, BESDefine *d)=0
 adds a given definition to this storage More...
 
 BESDefinitionStorage (const string &name)
 create an instance of BESDefinitionStorage with the give name. More...
 
virtual bool del_definition (const string &def_name)=0
 deletes a defintion with the given name More...
 
virtual bool del_definitions ()=0
 deletes all defintions from the definition store More...
 
virtual void dump (ostream &strm) const =0
 Displays debug information about this object. More...
 
virtual const string & get_name () const
 retrieve the name of this persistent store More...
 
virtual BESDefinelook_for (const string &def_name)=0
 looks for a definition in this persistent store with the given name More...
 
virtual void show_definitions (BESInfo &info)=0
 show the defintions stored in this store More...
 
virtual ~BESDefinitionStorage ()
 

Protected Attributes

string _my_name
 

Detailed Description

provides persistent storage for a specific view of different containers including contraints and aggregation.

An implementation of the abstract interface BESDefinitionStorage provides storage for a definition, or view, of a set of data including possibly constraints on each of those containers and possibly aggregation of those containers.

An instance of a derived implementation has a name associated with it, in case that there are multiple ways in which the information can be stored. For example, the main persistent storage for containers could be a mysql database, but a user could store temporary information in different files. If the user wishes to remove one of these persistence stores they would request that a named BESDefinitionStorage object be removed from the list.

See also
BESDefine
BESDefinitionStorageList

Definition at line 64 of file BESDefinitionStorage.h.

Constructor & Destructor Documentation

◆ BESDefinitionStorage()

BESDefinitionStorage::BESDefinitionStorage ( const string &  name)
inline

create an instance of BESDefinitionStorage with the give name.

Parameters
namename of this persistence store

Definition at line 75 of file BESDefinitionStorage.h.

◆ ~BESDefinitionStorage()

virtual BESDefinitionStorage::~BESDefinitionStorage ( )
inlinevirtual

Definition at line 78 of file BESDefinitionStorage.h.

Member Function Documentation

◆ add_definition()

virtual bool BESDefinitionStorage::add_definition ( const string &  def_name,
BESDefine d 
)
pure virtual

adds a given definition to this storage

This method adds a definition to the definition store, taking ownership of that definition. If the definition already exists, then the definition is NOT added.

Parameters
def_namename of the definition to add
ddefinition to add
Returns
true if successfully added, false if already exists

Implemented in BESDefinitionStorageVolatile.

Referenced by BESDefineResponseHandler::execute(), and get_name().

◆ del_definition()

virtual bool BESDefinitionStorage::del_definition ( const string &  def_name)
pure virtual

deletes a defintion with the given name

This method deletes a definition from the definition store with the given name.

Parameters
def_namename of the defintion to delete
Returns
true if successfully deleted and false otherwise

Implemented in BESDefinitionStorageVolatile.

Referenced by BESDelDefResponseHandler::execute(), BESDefineResponseHandler::execute(), and get_name().

◆ del_definitions()

virtual bool BESDefinitionStorage::del_definitions ( )
pure virtual

deletes all defintions from the definition store

Returns
true if successfully deleted and false otherwise

Implemented in BESDefinitionStorageVolatile.

Referenced by BESDelDefsResponseHandler::execute(), and get_name().

◆ dump()

virtual void BESDefinitionStorage::dump ( ostream &  strm) const
pure virtual

Displays debug information about this object.

Parameters
strmoutput stream to use to dump the contents of this object

Implements BESObj.

Implemented in BESDefinitionStorageVolatile.

Referenced by get_name().

◆ get_name()

virtual const string& BESDefinitionStorage::get_name ( ) const
inlinevirtual

retrieve the name of this persistent store

Returns
name of this persistent store.

Definition at line 84 of file BESDefinitionStorage.h.

References _my_name, add_definition(), del_definition(), del_definitions(), dump(), look_for(), and show_definitions().

Referenced by BESDefinitionStorageList::add_persistence(), and BESDefinitionStorageVolatile::dump().

Here is the call graph for this function:

◆ look_for()

virtual BESDefine* BESDefinitionStorage::look_for ( const string &  def_name)
pure virtual

looks for a definition in this persistent store with the given name

Parameters
def_namename of the definition to look for
Returns
definition with the given name, NULL if not found

Implemented in BESDefinitionStorageVolatile.

Referenced by get_name().

◆ show_definitions()

virtual void BESDefinitionStorage::show_definitions ( BESInfo info)
pure virtual

show the defintions stored in this store

Add information to the passed information response object about each of the defintions stored within this defintion store. The information added to the passed information objects includes the name of this persistent store on the first line followed by the information for each definition on the following lines.

Parameters
infoinformation response object to store the information in

Implemented in BESDefinitionStorageVolatile.

Referenced by get_name().

Member Data Documentation

◆ _my_name

string BESDefinitionStorage::_my_name
protected

Definition at line 67 of file BESDefinitionStorage.h.

Referenced by get_name().


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