StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stdair::ConfigHolderStruct Struct Reference

#include <stdair/bom/ConfigHolderStruct.hpp>

+ Inheritance diagram for stdair::ConfigHolderStruct:

List of all members.

Public Member Functions

void add (const bpt::ptree &)
bool addValue (const std::string &iValue, const std::string &iPath)
template<typename ValueType >
bool exportValue (ValueType &ioValue, const std::string &iPath) const
void updateAirlineFeatures (BomRoot &)
void toStream (std::ostream &ioOut) const
void fromStream (std::istream &ioIn)
const std::string describe () const
const std::string jsonExport () const
 ConfigHolderStruct ()
 ConfigHolderStruct (const ConfigHolderStruct &)
 ~ConfigHolderStruct ()
template<>
bool exportValue (Date_T &ioValue, const std::string &iPath) const

Detailed Description

Structure holding the configuration of the simulation.

Definition at line 40 of file ConfigHolderStruct.hpp.


Constructor & Destructor Documentation

stdair::ConfigHolderStruct::ConfigHolderStruct ( )

Constructor.

Definition at line 27 of file ConfigHolderStruct.cpp.

stdair::ConfigHolderStruct::ConfigHolderStruct ( const ConfigHolderStruct iConfigHolderStruct)

Copy constructor.

Definition at line 32 of file ConfigHolderStruct.cpp.

stdair::ConfigHolderStruct::~ConfigHolderStruct ( )

Destructor.

Definition at line 37 of file ConfigHolderStruct.cpp.


Member Function Documentation

void stdair::ConfigHolderStruct::add ( const bpt::ptree iConfigPropertyTree)

Merge the given property tree with the existing configuration property tree gathering all the configuration information.

Parameters:
constbpt::ptree& Property tree to add to the configuration tree.

Definition at line 144 of file ConfigHolderStruct.cpp.

Referenced by stdair::BomINIImport::importINIConfig(), and stdair::BomJSONImport::jsonImportConfig().

bool stdair::ConfigHolderStruct::addValue ( const std::string &  iValue,
const std::string &  iPath 
)

Create the given specified path in the configuration tree and add the corresponding given value (or replace the value if the path already exists).

Parameters:
conststd::string& Value to add at the given path.
conststd::string& Path to create (or to look for).

Definition at line 191 of file ConfigHolderStruct.cpp.

Referenced by stdair::STDAIR_Service::importConfigValue().

template<typename ValueType >
bool stdair::ConfigHolderStruct::exportValue ( ValueType &  ioValue,
const std::string &  iPath 
) const

Look for the specified path in the configuration tree and, if existing, try to extract the corresponding value. The type of the value to extract is a template parameter.

Parameters:
ValueType&Value to add in the configuration tree.
conststd::string& Path to look for.

Definition at line 144 of file ConfigHolderStruct.hpp.

Referenced by stdair::STDAIR_Service::exportConfigValue().

void stdair::ConfigHolderStruct::toStream ( std::ostream &  ioOut) const

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Reimplemented from stdair::StructAbstract.

Definition at line 41 of file ConfigHolderStruct.cpp.

References describe().

void stdair::ConfigHolderStruct::fromStream ( std::istream &  ioIn)
virtual

Read a Business Object from an input stream.

Parameters:
istream&the input stream.

Reimplemented from stdair::StructAbstract.

Definition at line 46 of file ConfigHolderStruct.cpp.

const std::string stdair::ConfigHolderStruct::describe ( ) const
virtual

Display of the structure.

Implements stdair::StructAbstract.

Definition at line 50 of file ConfigHolderStruct.cpp.

Referenced by stdair::STDAIR_Service::configDisplay(), and toStream().

const std::string stdair::ConfigHolderStruct::jsonExport ( ) const

Display of the configuration in a JSON-ified format.

Definition at line 134 of file ConfigHolderStruct.cpp.

Referenced by stdair::STDAIR_Service::jsonExportConfiguration().

template<>
bool stdair::ConfigHolderStruct::exportValue ( Date_T ioValue,
const std::string &  iPath 
) const
inline

Definition at line 175 of file ConfigHolderStruct.hpp.


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