OSB_LIB::Configuration Class Reference

Collaboration diagram for OSB_LIB::Configuration:

Collaboration graph
[legend]
List of all members.

Detailed Description

Configuration.

Configuration does not contain moduleName. We assume that we always handle configurations on a per module basis.

Definition at line 68 of file configuration.h.

Public Types

Public Member Functions

Read access to data members
Conversion of configuration value:
Conversion of value() according to type(): the result of the conversion is stored in the argument pointer.

Static Public Member Functions

Private Attributes

Friends


Member Enumeration Documentation

enum OSB_LIB::Configuration::ConfigType

The type of Configuration.

Enumerator:
ctUnknown  Unknown, illegal type.
ctDate  Type is date (database 'd').
ctLong  Type is long (database 'l').
ctString  Type is string (database 's').

Definition at line 73 of file configuration.h.

enum OSB_LIB::Configuration::RetConvert

Return value of the value conversion.

Enumerator:
rcSuccess 
rcTypeMismatch 
rcErrConvert 

Definition at line 81 of file configuration.h.


Constructor & Destructor Documentation

OSB_LIB::Configuration::Configuration ( ModuleId  module = mdUnknown  )  [explicit]

Default constructor with optional module id.


Member Function Documentation

static ConfigType OSB_LIB::Configuration::configType ( char  c  )  [static]

Convert one character database code to a config type.

Parameters:
c character to convert.
Returns:
The config type that corresponds to `c'.
ctUnknown if `c' does not match a supported ConfigType.

RetConvert OSB_LIB::Configuration::convert ( std::string *  pDest  )  const

Convert to string type.

RetConvert OSB_LIB::Configuration::convert ( long pDest  )  const

Convert to long type.

RetConvert OSB_LIB::Configuration::convert ( Date pDest  )  const

Convert to date type.

const std::string& OSB_LIB::Configuration::desc (  )  const

Get description.

const std::string& OSB_LIB::Configuration::keyword (  )  const

Get keyword.

ModuleId OSB_LIB::Configuration::module (  )  const

Get module.

bool OSB_LIB::Configuration::read ( const OSB_DB::Session session,
ModuleId  module,
const std::string &  keyword 
)

Get a single configuration entry.

Parameters:
session Database session to use.
module Module for which to read the configuration.
keyword Keywork of the configuration entry.
Returns:
true if the configuration for keyword and module or the global entry was found,
else false.
Note:
The function reads the global configuration (i.e., module mdAll) for keyword if no module specific entry exists.

ConfigType OSB_LIB::Configuration::type (  )  const

Get confiugration type.

const std::string& OSB_LIB::Configuration::value (  )  const

Get value as string.


Friends And Related Function Documentation

friend class OSB_DB::ConfigurationGw [friend]

Allow the gateway to set the data members.

Definition at line 70 of file configuration.h.


Member Data Documentation

std::string OSB_LIB::Configuration::desc_ [private]

Description of configuration.

Definition at line 159 of file configuration.h.

std::string OSB_LIB::Configuration::keyword_ [private]

Keyword of configuration.

Definition at line 153 of file configuration.h.

ModuleId OSB_LIB::Configuration::module_ [private]

Definition at line 151 of file configuration.h.

ConfigType OSB_LIB::Configuration::type_ [private]

Type of configuration.

Definition at line 157 of file configuration.h.

std::string OSB_LIB::Configuration::value_ [private]

Value of configuration.

Definition at line 155 of file configuration.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:11:03 2006 for OSB Library by  doxygen 1.4.7