CNcbiEnvRegMapper Class Reference
[Application Registry]

Search Toolkit Book for CNcbiEnvRegMapper

#include <env_reg.hpp>

Inheritance diagram for CNcbiEnvRegMapper:

Inheritance graph
[legend]
Collaboration diagram for CNcbiEnvRegMapper:

Collaboration graph
[legend]
List of all members.

Detailed Description

CNcbiEnvRegMapper --.

Somewhat more elaborate mapping used by default, with support for tree conversion. Special node names (starting with dots) get mapped as [<section>].<name> <-> NCBI_CONFIG_<name>__<section> ; all other names get mapped as [<section>]<name> <-> NCBI_CONFIG__<section>__<name> .

Definition at line 175 of file env_reg.hpp.

Public Member Functions

string RegToEnv (const string &section, const string &name) const
 Returns empty strings for unsupported (section, name) pairs.
bool EnvToReg (const string &env, string &section, string &name) const
 The return value indicates whether the environment variable was appropriately formatted.
string GetPrefix (void) const
 Can be overriden to speed enumeration.

Static Private Attributes

static const char * sm_Prefix = "NCBI_CONFIG_"


Member Function Documentation

bool CNcbiEnvRegMapper::EnvToReg const string &  env,
string &  section,
string &  name
const [virtual]
 

The return value indicates whether the environment variable was appropriately formatted.

Implements IEnvRegMapper.

Definition at line 292 of file env_reg.cpp.

References sm_Prefix, and NStr::StartsWith().

string CNcbiEnvRegMapper::GetPrefix void   )  const [virtual]
 

Can be overriden to speed enumeration.

Reimplemented from IEnvRegMapper.

Definition at line 316 of file env_reg.cpp.

References sm_Prefix.

string CNcbiEnvRegMapper::RegToEnv const string &  section,
const string &  name
const [virtual]
 

Returns empty strings for unsupported (section, name) pairs.

Implements IEnvRegMapper.

Definition at line 281 of file env_reg.cpp.

References sm_Prefix, and NStr::StartsWith().


Member Data Documentation

const char * CNcbiEnvRegMapper::sm_Prefix = "NCBI_CONFIG_" [static, private]
 

Definition at line 183 of file env_reg.hpp.

Referenced by EnvToReg(), GetPrefix(), and RegToEnv().


The documentation for this class was generated from the following files:
Generated on Wed Dec 9 08:03:03 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:19:31 2009 by modify_doxy.py rev. 173732