34#ifndef BASICS_CONFIGURATIONFILE_H
35#define BASICS_CONFIGURATIONFILE_H
81 std::istringstream
stream(value);
86 static_cast<std::string
>(
typeid(
typedValue).name()) +
">");
104 bool contains(
const std::string& key)
const;
108 std::vector<T>
getVector(
const std::string& key)
const;
112 T getValue(
const std::string& key)
const;
119 std::map<std::string, std::string>
data;
124 std::string
getValue(
const std::string& key)
const;
127 static std::string trim(
const std::string&
str);
133 void split(std::vector<std::string>&
lst,
const std::string&
input,
const std::string&
separators,
142 std::vector<T> values;
146 if (!(*it).empty()) {
std::vector< T > getVector(const std::string &key) const
get vector with key
std::map< std::string, std::string > data
the container is public to test this class
bool contains(const std::string &key) const
check if value associated with given key exists
void load(const std::string &File)
load a configuration file
void clear()
clear all values
T getValue(const std::string &key) const
get value with key
std::shared_ptr< T > SPtr
Simple configuration file.
ConfigurationFile loadConfig(int argc, char *argv[], std::string configPath)
bool convert_to< bool >(const std::string &value)
T convert_to(const std::string &value)