#include <stdair/bom/ConfigHolderStruct.hpp>
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 |
Structure holding the configuration of the simulation.
Definition at line 40 of file ConfigHolderStruct.hpp.
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.
void stdair::ConfigHolderStruct::add | ( | const bpt::ptree & | iConfigPropertyTree | ) |
Merge the given property tree with the existing configuration property tree gathering all the configuration information.
const | bpt::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).
const | std::string& Value to add at the given path. |
const | std::string& Path to create (or to look for). |
Definition at line 191 of file ConfigHolderStruct.cpp.
Referenced by stdair::STDAIR_Service::importConfigValue().
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.
ValueType& | Value to add in the configuration tree. |
const | std::string& Path to look for. |
Definition at line 144 of file ConfigHolderStruct.hpp.
Referenced by stdair::STDAIR_Service::exportConfigValue().
void stdair::ConfigHolderStruct::updateAirlineFeatures | ( | BomRoot & | iBomRoot | ) |
Update the airline features objects thanks to the configuration holder.
BomRoot& | Reference on the BomRoot to update. |
Definition at line 220 of file ConfigHolderStruct.cpp.
References stdair::BomRetriever::retrieveAirlineFeatureFromKey(), stdair::AirlineFeature::setForecastingMethod(), stdair::AirlineFeature::setOptimisationMethod(), stdair::AirlineFeature::setPartnershipTechnique(), stdair::AirlineFeature::setPreOptimisationMethod(), stdair::AirlineFeature::setUnconstrainingMethod(), STDAIR_LOG_ERROR, and stdair::RootException::what().
Referenced by stdair::STDAIR_Service::updateAirlineFeatures().
void stdair::ConfigHolderStruct::toStream | ( | std::ostream & | ioOut | ) | const |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Definition at line 41 of file ConfigHolderStruct.cpp.
References describe().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Reimplemented from stdair::StructAbstract.
Definition at line 46 of file ConfigHolderStruct.cpp.
|
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().
|
inline |
Definition at line 175 of file ConfigHolderStruct.hpp.