lib_config
Public Member Functions | Static Public Member Functions | List of all members
libConfig::YAMLConfigParser Class Reference

#include <YAMLConfiguration.hpp>

Public Member Functions

void displayMap (const YAML::Node &map, int level=0)
 
void printNode (const YAML::Node &node, int level=0)
 
std::shared_ptr< ConfigValuegetConfigValue (const YAML::Node &node)
 
std::shared_ptr< ConfigValuegetConfigValue (const std::string &ymlString)
 
std::shared_ptr< ComplexConfigValuegetMap (const YAML::Node &map)
 
bool insetMapIntoArray (const YAML::Node &map, ArrayConfigValue &array)
 
bool insetMapIntoArray (const YAML::Node &map, ComplexConfigValue &complex)
 
bool insetMapIntoArray (const YAML::Node &map, Configuration &conf)
 
bool loadConfigFile (const std::string &path, std::map< std::string, Configuration > &subConfigs)
 
bool parseYAML (Configuration &curConfig, const std::string &yamlBuffer)
 

Static Public Member Functions

static std::string applyStringVariableInsertions (const std::string &val)
 

Member Function Documentation

std::string YAMLConfigParser::applyStringVariableInsertions ( const std::string &  val)
static

This function analyses the given string and replaces variables. The variables in the string taht will be evaluated are given by "<%= ENV('xyz') %>" or "<%= BUNDLES('xyz') %>". In the case of ENV, the given value xyz will be treeted as an environment variable that will be replaced by its current value. BUNDLES specifies that xyz in that case is a relative path (relative with respect to a bundle root). This path will be converted in an absolute path by adding the prefix path of the bundle in which the path was found (starting with the default bundle if specified).

Parameters
valIs a const string reference parameter, which contains the original string with the variables.
Returns
String containing the enhanced string with all replacements.
void YAMLConfigParser::displayMap ( const YAML::Node &  map,
int  level = 0 
)
std::shared_ptr< ConfigValue > YAMLConfigParser::getConfigValue ( const YAML::Node &  node)
std::shared_ptr< ConfigValue > YAMLConfigParser::getConfigValue ( const std::string &  ymlString)
std::shared_ptr< ComplexConfigValue > YAMLConfigParser::getMap ( const YAML::Node &  map)
bool YAMLConfigParser::insetMapIntoArray ( const YAML::Node &  map,
ArrayConfigValue array 
)
bool YAMLConfigParser::insetMapIntoArray ( const YAML::Node &  map,
ComplexConfigValue complex 
)
bool YAMLConfigParser::insetMapIntoArray ( const YAML::Node &  map,
Configuration conf 
)
bool YAMLConfigParser::loadConfigFile ( const std::string &  path,
std::map< std::string, Configuration > &  subConfigs 
)
bool YAMLConfigParser::parseYAML ( Configuration curConfig,
const std::string &  yamlBuffer 
)
void YAMLConfigParser::printNode ( const YAML::Node &  node,
int  level = 0 
)

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