OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
TheBESKeys Class Reference

#include <TheBESKeys.h>

Inheritance diagram for TheBESKeys:
Inheritance graph
Collaboration diagram for TheBESKeys:
Collaboration graph

Public Types

typedef map< string, vector
< string > >::const_iterator 
Keys_citer
 

Public Member Functions

virtual void dump (ostream &strm) const
 dumps information about this object More...
 
void get_value (const string &s, string &val, bool &found)
 Retrieve the value of a given key, if set. More...
 
void get_values (const string &s, vector< string > &vals, bool &found)
 Retrieve the values of a given key, if set. More...
 
Keys_citer keys_begin ()
 
Keys_citer keys_end ()
 
string keys_file_name ()
 
void set_key (const string &key, const string &val, bool addto=false)
 allows the user to set key/value pairs from within the application. More...
 
void set_key (const string &pair)
 allows the user to set key/value pairs from within the application. More...
 

Static Public Member Functions

static BESKeysTheKeys ()
 

Static Public Attributes

static string ConfigFile = ""
 

Protected Member Functions

 TheBESKeys (const string &keys_file_name)
 

Detailed Description

Definition at line 38 of file TheBESKeys.h.

Member Typedef Documentation

typedef map< string, vector< string > >::const_iterator BESKeys::Keys_citer
inherited

Definition at line 123 of file BESKeys.h.

Constructor & Destructor Documentation

TheBESKeys::TheBESKeys ( const string &  keys_file_name)
inlineprotected

Definition at line 43 of file TheBESKeys.h.

Referenced by TheKeys().

Member Function Documentation

void BESKeys::dump ( ostream &  strm) const
virtualinherited

dumps information about this object

Displays the pointer value of this instance along with all of the keys.

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

Implements BESObj.

Definition at line 506 of file BESKeys.cc.

References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

void BESKeys::get_value ( const string &  s,
string &  val,
bool &  found 
)
inherited

Retrieve the value of a given key, if set.

This method allows the user of BESKeys to retrieve the value of the specified key. If multiple values are set then an exception is thrown.

Parameters
sThe key the user is looking for
valThe value of the key the user is looking for
foundSet to true of the key is set or false if the key is not set. The value of a key can be set to the empty string, which is why this boolean is provided.
Exceptions
BESSyntaxUserErrorif multiple values are available for the specified key

Definition at line 453 of file BESKeys.cc.

Referenced by BESInfo::add_data_from_file(), BESCache::BESCache(), BESCatalogList::BESCatalogList(), BESCatalogUtils::BESCatalogUtils(), BESContainerStorageFile::BESContainerStorageFile(), BESContainerStorageVolatile::BESContainerStorageVolatile(), BESInfo::BESInfo(), BESLog::BESLog(), BESMemoryGlobalArea::BESMemoryGlobalArea(), BESServerHandler::BESServerHandler(), BESUncompressManager::BESUncompressManager(), BESInfoList::build_info(), DaemonCommandHandler::DaemonCommandHandler(), BESVersionResponseHandler::execute(), BESExceptionManager::handle_exception(), ServerApp::initialize(), BESContainerStorageList::isnice(), and main().

void BESKeys::get_values ( const string &  s,
vector< string > &  vals,
bool &  found 
)
inherited

Retrieve the values of a given key, if set.

This method allows the user of BESKeys to retrieve the value of the specified key.

Parameters
sThe key the user is looking for
valsThe value set for the specified key
foundSet to true of the key is set or false if the key is not set. The value of a key can be set to the empty string, which is why this boolean is provided.

Definition at line 488 of file BESKeys.cc.

Referenced by BESCatalogUtils::BESCatalogUtils(), and DaemonCommandHandler::DaemonCommandHandler().

Keys_citer BESKeys::keys_begin ( )
inlineinherited

Definition at line 124 of file BESKeys.h.

Referenced by BESConfigResponseHandler::execute().

Keys_citer BESKeys::keys_end ( )
inlineinherited

Definition at line 125 of file BESKeys.h.

Referenced by BESConfigResponseHandler::execute().

string BESKeys::keys_file_name ( )
inlineinherited

Definition at line 113 of file BESKeys.h.

void BESKeys::set_key ( const string &  key,
const string &  val,
bool  addto = false 
)
inherited

allows the user to set key/value pairs from within the application.

This method allows users of BESKeys to set key/value pairs from within the application, such as for testing purposes, key/value pairs from the command line, etc...

If addto is set to true then the value is added to the list of values for key

If addto is false, and the key is already set then this value replaces all values for the key

Parameters
keyname of the key/value pair to be set
valvalue of the key to be set
addtoSpecifies whether to add the value to the key or set the value. Default is to set, not add to

Definition at line 402 of file BESKeys.cc.

Referenced by BESKeys::set_key().

void BESKeys::set_key ( const string &  pair)
inherited

allows the user to set key/value pairs from within the application.

This method allows users of BESKeys to set key/value pairs from within the application, such as for testing purposes, key/value pairs from the command line, etc...

If the key is already set then this value replaces the value currently held in the keys map.

Parameters
pairthe key/value pair passed as key=value

Definition at line 430 of file BESKeys.cc.

References BESKeys::set_key().

Here is the call graph for this function:

Member Data Documentation

string TheBESKeys::ConfigFile = ""
static

Definition at line 50 of file TheBESKeys.h.

Referenced by StandAloneApp::initialize(), ServerApp::initialize(), main(), and TheKeys().


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