configuration file parser library

Discussion in 'C++' started by Damiano G. Preatoni, May 5, 2005.

  1. 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
     
    Damiano G. Preatoni, May 5, 2005
    #1
    1. Advertising

  2. Damiano G. Preatoni

    Guest

    , May 5, 2005
    #2
    1. Advertising

  3. Damiano G. Preatoni

    Jeff Flinn Guest

    "Damiano G. Preatoni" <> wrote in message
    news:d5d3l4$mdf$...
    > 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?


    "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
     
    Jeff Flinn, May 5, 2005
    #3
  4. Damiano G. Preatoni wrote:

    > Hi all,
    > I'msearching for a free/open implementation of a class able to read and
    > process variables in a configuration (text) file.


    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/~wagnerr/ConfigFile.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
    -----------------------------------------------------------
     
    Damiano G. Preatoni, May 5, 2005
    #4
  5. Damiano G. Preatoni

    __PPS__ Guest

    __PPS__, May 5, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,836
  2. Mark
    Replies:
    0
    Views:
    863
  3. Eric Lee
    Replies:
    2
    Views:
    337
    Jack Klein
    Apr 22, 2004
  4. Tech Id
    Replies:
    14
    Views:
    1,375
    Tech Id
    May 23, 2010
  5. Tammo Tjarks
    Replies:
    3
    Views:
    269
    Trans
    Sep 5, 2007
Loading...

Share This Page