OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
OnixS::ICE::BOE::System::ConfigurationParser Namespace Reference

Namespaces

namespace  Utils

Typedefs

using KeyValueMap = std::unordered_map<std::string, std::string>
template<typename C>
using Setter = std::function<void(C&, const std::string&)>
template<typename C>
using Registry = std::unordered_map<std::string, Setter<C>>

Functions

KeyValueMap parseConfigFile (const std::string &fileName, const std::string &rootNode)
void throwCannotApplyConfigurationValue (const std::string &key, const std::string &value)
template<typename C, typename Arg>
Setter< CmakeSetter (C &(C::*mf)(Arg))
template<typename C>
void loadFromFile (const std::string &fileName, C &obj, const Registry< C > &reg, const std::string &rootNode, bool ignoreUnknown=true)

Typedef Documentation

◆ KeyValueMap

using KeyValueMap = std::unordered_map<std::string, std::string>

Definition at line 101 of file ConfigurationParser.h.

◆ Registry

template<typename C>
using Registry = std::unordered_map<std::string, Setter<C>>

Definition at line 111 of file ConfigurationParser.h.

◆ Setter

template<typename C>
using Setter = std::function<void(C&, const std::string&)>

Definition at line 110 of file ConfigurationParser.h.

Function Documentation

◆ loadFromFile()

template<typename C>
void loadFromFile ( const std::string & fileName,
C & obj,
const Registry< C > & reg,
const std::string & rootNode,
bool ignoreUnknown = true )

Loads configuration from the given file.

Definition at line 125 of file ConfigurationParser.h.

◆ makeSetter()

template<typename C, typename Arg>
Setter< C > makeSetter ( C &(C::* mf )(Arg))

Definition at line 114 of file ConfigurationParser.h.

◆ parseConfigFile()

KeyValueMap parseConfigFile ( const std::string & fileName,
const std::string & rootNode )

Parses the given file to the key-value pair map.

◆ throwCannotApplyConfigurationValue()

void throwCannotApplyConfigurationValue ( const std::string & key,
const std::string & value )