24#ifndef __BITPIT_CONFIGURATION_HPP__
25#define __BITPIT_CONFIGURATION_HPP__
30#include "bitpit_common.hpp"
32#include "configuration_common.hpp"
33#include "configuration_config.hpp"
43 ConfigParser(
const std::string &rootName,
bool multiSections);
45 ConfigParser(
const std::string &rootName,
int version,
bool multiSections);
47 void reset(
const std::string &rootName);
48 void reset(
const std::string &rootName,
int version);
49 void reset(
const std::string &rootName,
int version,
bool multiSections);
51 void read(
const std::string &filename,
bool append =
true);
52 void read(config::SourceFormat format,
const std::string &content,
bool append =
true);
53 void write(
const std::string &filename)
const;
54 void write(config::SourceFormat format, std::string *content)
const;
57 BITPIT_PUBLIC_API
static const int VERSION_UNDEFINED;
59 std::string m_rootName;
74 static const std::string DEFAULT_ROOT_NAME;
75 static const int DEFAULT_VERSION;
77 static std::unique_ptr<GlobalConfigParser> m_parser;
100 void reset(
const std::string &rootName);
101 void reset(
const std::string &rootName,
int version);
102 void reset(
const std::string &rootName,
int version,
bool multiSections);
104 void read(
const std::string &filename,
bool append =
true);
105 void read(config::SourceFormat format,
const std::string &content,
bool append =
true);
106 void write(
const std::string &filename);
107 void write(config::SourceFormat format, std::string *content);
Configuration file parser.
void write(const std::string &filename) const
ConfigParser(const std::string &rootName)
void read(const std::string &filename, bool append=true)
void reset(const std::string &rootName)
Global configuration file parser.
static GlobalConfigParser & parser()
void write(const std::string &filename)
GlobalConfigParser & root
void read(const std::string &filename, bool append)