Summer-conf is a program developing by C++ and
can read configure easily.
The confiure style likes that:
# main section
[main]
name = aleda
age = 13
# other section
[other]
codename = aleda
nickname = aleda
array = 1, 2, 3, 4
and you can read the element through these steps:
- summerconf::Config conf = summerconf::Config('test.conf');
- int num_value = conf["main"]["age"]->int_value();
- std::string string_value = conf["main"]["name"]->string_value();
- std::vectorstd::string string_arr = conf["other"]["array"]->string_value_list();
and you should note these:
1. if section dose not find, secion_name that value was "__INTER_MARK__" will return;
2. if value dose not find, value that was "__NOT_FOUND__" will return;
more details, you should see test/summerconf_test.cpp.
1. make clean
2. make ar
or you will just:
make output
more details, see makefile;
Please contact with Aleda[aleda.cn | aledalee@foxmail].