Wolframe, 0.0.3

_Wolframe::config::ConfigurationBase Class Referenceabstract

Base class for the configuration structures. More...

#include <configurationBase.hpp>

Inheritance diagram for _Wolframe::config::ConfigurationBase:
_Wolframe::AAAA::AAAAconfiguration _Wolframe::config::NamedConfiguration _Wolframe::config::ServiceBanner _Wolframe::config::ServiceConfiguration _Wolframe::db::DBproviderConfig _Wolframe::log::LoggerConfiguration _Wolframe::net::Configuration _Wolframe::proc::ProcProviderConfig

Public Member Functions

 ConfigurationBase (const char *sectionName_, const char *logParent_, const char *logName_)
 
virtual ~ConfigurationBase ()
 
const std::string & sectionName () const
 The display string (name) for the configuration section. More...
 
const std::string & logPrefix () const
 
virtual bool parse (const ConfigurationNode &cfgTree, const std::string &node, const module::ModulesDirectory *modules)=0
 Parse the configuration section. More...
 
virtual void setCanonicalPathes (const std::string &)
 
virtual bool check () const
 
virtual void print (std::ostream &os, size_t indent=0) const =0
 

Private Attributes

std::string m_sectionName
 
std::string m_logPrefix
 

Detailed Description

Base class for the configuration structures.

Constructor & Destructor Documentation

_Wolframe::config::ConfigurationBase::ConfigurationBase ( const char *  sectionName_,
const char *  logParent_,
const char *  logName_ 
)
inline

Class constructor.

Parameters
[in]sectionName_the name that will be displayed for this configuration section in messages (log, print ...) It has no other processing purpose
[in]logParent_the logging prefix of the parent.
[in]logName_the logging name of this section. Combined with the logParent parameter will form the whole logging prefix for of the section.
virtual _Wolframe::config::ConfigurationBase::~ConfigurationBase ( )
inlinevirtual

Member Function Documentation

virtual bool _Wolframe::config::ConfigurationBase::check ( ) const
inlinevirtual

Check if the server configuration makes sense

Be aware that this function does NOT test if the configuration can be used. It only tests if it MAY be valid. This function will log errors / warnings

Returns
true if the configuration has no errors, false otherwise

Reimplemented in _Wolframe::config::ServiceBanner, _Wolframe::config::ServiceConfiguration, _Wolframe::log::LoggerConfiguration, _Wolframe::serialize::DescriptiveConfiguration, _Wolframe::net::Configuration, _Wolframe::AAAA::AAAAconfiguration, _Wolframe::db::DBproviderConfig, and _Wolframe::proc::ProcProviderConfig.

const std::string& _Wolframe::config::ConfigurationBase::logPrefix ( ) const
inline

The prefix for logging messages for this configuration section

Returns
a reference to the prefix set by the constructor
virtual bool _Wolframe::config::ConfigurationBase::parse ( const ConfigurationNode cfgTree,
const std::string &  node,
const module::ModulesDirectory modules 
)
pure virtual

Parse the configuration section.

Parameters
[in]ptproperty tree node
[in]nodethe label of the node. It should be the same (case insensitive) as it->first

Implemented in _Wolframe::config::ServiceBanner, _Wolframe::config::ServiceConfiguration, _Wolframe::log::LoggerConfiguration, _Wolframe::serialize::DescriptiveConfiguration, _Wolframe::net::Configuration, _Wolframe::AAAA::AAAAconfiguration, _Wolframe::db::DBproviderConfig, and _Wolframe::proc::ProcProviderConfig.

virtual void _Wolframe::config::ConfigurationBase::print ( std::ostream &  os,
size_t  indent = 0 
) const
pure virtual

Print the configuration This function is supposed to print the running configuration, this means all the configuration parameters, not only those that were set in the configuration file.

Parameters
[in]osstream to use for printing
[in]indentprint indented with this number of spaces

Implemented in _Wolframe::config::ServiceBanner, _Wolframe::config::ServiceConfiguration, _Wolframe::log::LoggerConfiguration, _Wolframe::serialize::DescriptiveConfiguration, _Wolframe::net::Configuration, _Wolframe::AAAA::AAAAconfiguration, _Wolframe::db::DBproviderConfig, and _Wolframe::proc::ProcProviderConfig.

const std::string& _Wolframe::config::ConfigurationBase::sectionName ( ) const
inline

The display string (name) for the configuration section.

Returns
a reference to the name set by the constructor
virtual void _Wolframe::config::ConfigurationBase::setCanonicalPathes ( const std::string &  )
inlinevirtual

Set the pathes in the configuration to absolute values

Parameters
[in]refPathuse this path as reference when computing the absolute pathes

Reimplemented in _Wolframe::config::ServiceConfiguration, _Wolframe::log::LoggerConfiguration, _Wolframe::net::Configuration, _Wolframe::AAAA::AAAAconfiguration, _Wolframe::db::DBproviderConfig, and _Wolframe::proc::ProcProviderConfig.

Member Data Documentation

std::string _Wolframe::config::ConfigurationBase::m_logPrefix
private
std::string _Wolframe::config::ConfigurationBase::m_sectionName
private

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