NCCLOUD  0.1
Public Member Functions | Data Fields
Config Class Reference

Class for dealing with config files. More...

#include <config.h>

Public Member Functions

void read_config (std::string &path)
 Read config from path into coding_param and storages_param.
void write_config (std::string &path)
 Write config to path using coding_param and storages_param.

Data Fields

std::map< std::string,
std::string > 
coding_param
 Stores parameters under the [Coding] section.
std::vector< std::map
< std::string, std::string > > 
storages_param
 Stores parameters under the [Storage] section.

Detailed Description

Class for dealing with config files.


Member Function Documentation

void Config::read_config ( std::string &  path)

Read config from path into coding_param and storages_param.

void Config::write_config ( std::string &  path)

Write config to path using coding_param and storages_param.


Field Documentation

std::map<std::string,std::string> Config::coding_param

Stores parameters under the [Coding] section.

For example, if there is a line "k=8" under [Coding], we have: coding_param["k"] = "8"

std::vector< std::map<std::string,std::string> > Config::storages_param

Stores parameters under the [Storage] section.

Parameters are grouped by repositories, separated by an empty line. For example, if config is like: [Storage] type = 0

type = 1 then we have: storages_param[0]["type"] = "0" storages_param[1]["type"] = "1"


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Enumerations Enumerator Defines