473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

configuration file parser library

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

Jul 23 '05 #1
4 12398
Tou could write some wrappers for libconfuse.
http://www.nongnu.org/confuse/

Jul 23 '05 #2

"Damiano G. Preatoni" <pr**@uninsubria.it> wrote in message
news:d5**********@newsserver.cilea.it...
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
Jul 23 '05 #3
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/...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
-----------------------------------------------------------
Jul 23 '05 #4
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

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Karthikesh Raju | last post by:
Hi All, i am wondering about the best way to read in a configuration file that goes like: ########### source_dir = '/home/karthik/Projects/python' data_dir =...
2
by: kathy | last post by:
What Application Configuration File is? And when/where/how to use it? Any documents on that? MSDN has somrthings scatter everywhere - hard to follow. thanks,
5
by: Egil Hansen | last post by:
Hi I need to pass 5-6 simple settings to a console program I'm writing. I thought about putting them in a simple .ini file or a .xml file. I'm also thinking about simply passing them to my...
2
by: Joel Cade | last post by:
I'm having a problem with ASP.Net on a machine with both .Net Framework 1.0 and 1.1. This application is targeted to 1.0 using IIS application extension mappings. The following error page is...
5
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want...
5
by: Jay | last post by:
I want to store various text settings in a configuration file, that I will read into C# and make use of. Here's a simplified example of the file: #comment loop(var=1:5){ deviceundertest ...
0
by: rsaikamesh | last post by:
Hi All, I am developing an application in c++. Now I am planning to create application configuration file(start up file) for my application. I dont know which is the best c++ configuration file...
5
by: Allan Ebdrup | last post by:
I have a webservice in ASP.Net 2.0, I need to store and load a xml configuration file in relation to one of the web methods in my webservice. What's the best place to store and the best way to load...
5
by: John Nagle | last post by:
Python's "robots.txt" file parser may be misinterpreting a special case. Given a robots.txt file like this: User-agent: * Disallow: // Disallow: /account/registration Disallow: /account/mypro...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.