38#ifndef ASYNC_CONFIG_INCLUDED
39#define ASYNC_CONFIG_INCLUDED
156 bool open(
const std::string& name);
171 const std::string&
tag)
const;
186 std::string&
value)
const;
208 template <
typename Rsp>
252 template <
template <
typename,
typename>
class Container,
307 template <
typename Rsp>
354 const std::string&
value);
357 typedef std::map<std::string, std::string> Values;
358 typedef std::map<std::string, Values> Sections;
363 bool parseCfgFile(
void);
364 char *trimSpaces(
char *
line);
365 char *parseSection(
char *
line);
367 bool parseValueLine(
char *
line, std::string&
tag, std::string&
value);
368 char *parseValue(
char *
value);
369 char *translateEscapedChars(
char *val);
A class for reading INI-formatted configuration files.
bool getValue(const std::string §ion, const std::string &tag, const Rsp &min, const Rsp &max, Rsp &rsp, bool missing_ok=false) const
Get a range checked variable value.
Config(void)
Default constuctor.
std::list< std::string > listSection(const std::string §ion)
Return the name of all the tags in the given section.
bool getValue(const std::string §ion, const std::string &tag, Rsp &rsp, bool missing_ok=false) const
Get the value of the given configuration variable.
bool getValue(const std::string §ion, const std::string &tag, std::string &value) const
Get the string value of the given configuration variable.
bool open(const std::string &name)
Open the given config file.
bool getValue(const std::string §ion, const std::string &tag, Container< Value, std::allocator< Value > > &c, bool missing_ok=false) const
Get the value of the given config variable into container.
const std::string & getValue(const std::string §ion, const std::string &tag) const
Return the string value of the given configuration variable.
void setValue(const std::string §ion, const std::string &tag, const std::string &value)
Set the value of a configuration variable.
A class for creating a TCP client connection.
Namespace for the asynchronous programming classes.