jsiloto / configfile

A very simple reader for config files written in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

	Copyright 2010 Benjamin Reh <ich@benjaminreh.de>

	This file is part of 'configfile'.

    'configfile' is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation version 3 of the License.

    'configfile is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with 'configfile'.  If not, see <http://www.gnu.org/licenses/>.

This is a very simple tool for reading simple config files.
A file may contain a key/value pair like

name = 'fooba'
number = 5

In your C++ program they can be accessed like this:

ConfigFile cfg("test.cfg");
string conf_name=cfg.getvalue<string>("name");
int conf_number = cfg.getvalue<int>("number");


main.cpp shows a more detailed example usage.

Benjamin Reh
www.benjaminreh.de

About

A very simple reader for config files written in C++


Languages

Language:C++ 83.2%Language:Makefile 16.8%