Connecting Tech Pros Worldwide Forums | Help | Site Map

configuration file parser library

Damiano G. Preatoni
Guest
 
Posts: n/a
#1: Jul 23 '05
Hi all,
I'msearching for a free/open implementation of a class able to read and
process variables in a configuration (text) file. since I'm not wanting to
reinvent the wheel, I did some preliminray search work, but none of the
sources I found satisfied me (or worked at all).

Any hints?

TIA

--
Damiano G. Preatoni, PhD
http://biocenosi.dipbsf.uninsubria.it/
ICQ: 78690321


groleo@gmail.com
Guest
 
Posts: n/a
#2: Jul 23 '05

re: configuration file parser library


Tou could write some wrappers for libconfuse.
http://www.nongnu.org/confuse/

Jeff Flinn
Guest
 
Posts: n/a
#3: Jul 23 '05

re: configuration file parser library



"Damiano G. Preatoni" <prea@uninsubria.it> wrote in message
news:d5d3l4$mdf$1@newsserver.cilea.it...[color=blue]
> Hi all,
> I'msearching for a free/open implementation of a class able to read and
> process variables in a configuration (text) file. since I'm not wanting to
> reinvent the wheel, I did some preliminray search work, but none of the
> sources I found satisfied me (or worked at all).
>
> Any hints?[/color]

"configuration file" is pretty vague, but you can try:

http://www.boost.org/doc/html/program_options.html

or the more general parser library:

http://www.boost.org/libs/spirit/index.html

Jeff Flinn


Damiano G. Preatoni
Guest
 
Posts: n/a
#4: Jul 23 '05

re: configuration file parser library


Damiano G. Preatoni wrote:
[color=blue]
> Hi all,
> I'msearching for a free/open implementation of a class able to read and
> process variables in a configuration (text) file.[/color]

More on the 'ocnfiguration file': it is a classical ASCII text file, holding
name = value pairs, with the possibility to group things with braces,
a-là-C... maybe an example will suit better:

----------------8<----------------snip-------------
# this is a comment
global {
base = BASEDIR
user = test
}

population {
beast1 {
xpos = 123
ypos = 150
sex = M
C = 0.6
}

}
----------------8<----------------snip-------------

After a (rather) thorough googling I found:

http://www-personal.engin.umich.edu/...onfigFile.html
By Rick Wagner, author of my favourite random number generator.
Alas, I don't like the file format, and array support.

http://www.gubbe.ch/code/libcfgparse/index.html
Nice thing. Compiles and installs, but I have some trouble linking.

http://freshmeat.net/projects/libconfigduo/ or
http://www.dystance.net/software/libconfig/
More compact, recent, but at present capable only to read.
Yesterday I contacted the author asking for a more complete documentation,
but I had no answer yet.

http://voodoo.com.ua/
A C++ clone of dotconf (which works in C, and I want C++). Too big,
problems with the installer.

http://www.nongnu.org/cfl/
a classic...

http://alumni.media.mit.edu/~rahimi/configuration/
I like the design, but can't compile it at all!


Of course, I also saw stuff like libconfusion and other C stuff.
I am searching for a working library (or a half made one as well), but I
haven't time and skill to build one from scratch or even to code a
wrapper... call it laziness :)


--
-----------------------------------------------------------
Damiano G. Preatoni, PhD

Unità *di Analisi e Gestione delle Risorse Ambientali
Dipartimento "Ambiente-Salute-Sicurezza"
Università *degli Studi dell'Insubria
Via J.H. Dunant, 3 - 21100 Varese (ITALY)

http://biocenosi.dipbsf.uninsubria.it/
ICQ: 78690321
Odigo: 2645129
-----------------------------------------------------------
__PPS__
Guest
 
Posts: n/a
#5: Jul 23 '05

re: configuration file parser library


boost.program_options not only is about program options but also about
configuration files, where some program options come from the command
line and some from config file and some come ... whatever.
Here's the explanation about config part :
http://www.boost.org/doc/html/progra....html#id548282

Closed Thread