подскажите названия библиотек бля работы с ini файлами,
чтобы была возможность найти ключ, по названию поля данных
получить и записать данные
под виндой есть функции винапи и есть возможность прописывать в реестр
вообще как удобнее всего записывать настройки программы под линуксом?
Здравствуйте, Limubay, Вы писали:
L>подскажите названия библиотек бля работы с ini файлами, L>чтобы была возможность найти ключ, по названию поля данных L>получить и записать данные L>под виндой есть функции винапи и есть возможность прописывать в реестр
L>вообще как удобнее всего записывать настройки программы под линуксом?
Вообще у каждой программы — свой парсер
А так могу посоветовать:
boost::program_options (www.boost.org)
Qt: QSettings (www.troltech.com/qt)
А еще вместо Qt имеет смысл использовать http://libconfig.sourceforge.net/, она является портом класса KConfig. Плюс в том, что сам Qt при этом не нужен (а это часто актуально, например на серверных машинах)
Здравствуйте, Garrrrr, Вы писали:
G>Здравствуйте, Limubay, Вы писали:
L>>подскажите названия библиотек бля работы с ini файлами, L>>чтобы была возможность найти ключ, по названию поля данных L>>получить и записать данные L>>под виндой есть функции винапи и есть возможность прописывать в реестр
L>>вообще как удобнее всего записывать настройки программы под линуксом?
G>Вообще у каждой программы — свой парсер G>А так могу посоветовать: G>boost::program_options (www.boost.org) G>Qt: QSettings (www.troltech.com/qt)
Здравствуйте, Limubay, Вы писали:
L>подскажите названия библиотек бля работы с ini файлами, L>чтобы была возможность найти ключ, по названию поля данных L>получить и записать данные L>под виндой есть функции винапи и есть возможность прописывать в реестр
L>вообще как удобнее всего записывать настройки программы под линуксом?
Open-RJ is an open-source library that implements readers of the Record-Jar structured text file format. It is implemented in C & C++, with a C-API. The implementation of the basic library is platform-independent. Mappings are provided to several languages (including C++, Ch, D, Ruby and STL), and others (COM, Java, .NET, Perl, Python) are planned. In addition to platform-independence, the library focuses on small runtime costs — memory and speed — and the classic UNIX attributes of discoverability and visibility.
What is the Record-Jar format?
As described in the excellent book "The Art Of UNIX Programming", a Record-Jar structured format file consists of records and fields.
A field is a single line — optionally extended with trailing '\' — that contains a name, separated from an optional value by ':'.
A record is a list of fields, whose contents are arbitrary and can vary between records in the same database. Records are separated by a line that begins with "%%". The record separator also acts as a comment, so anything can come on a record separator line after the first two characters.
A database is a correctly parsed Record-Jar file. The Open-RJ API (and language mappings) provide access to all the records in the database and the complete set of fields. Hence, you may work with fields on a per-record basis, or treat the database as a single record and with all fields in the database.
A very simple Record-Jar file, representing a Pets Database, is shown in the table on the right-hand side of this page.
And that's pretty much all there is to it. There are no restrictions on what fields may be in a record, and no controls over whether all records have the same fields or not. That's the job of higher layers of application functionality. We keep Record-Jar simple so it's reliable, portable and fast, and it's those things in spades!
E>What is the Record-Jar format?
E>As described in the excellent book "The Art Of UNIX Programming", a Record-Jar structured format file consists of records and fields.
Прошу прощения за отрыв от контекста обсуждения ... а эта excellent book встречается в бумажном виде и на русском языке? Довольно редкий случай, когда книжку хочется держать в руках.
Здравствуйте, ilejn, Вы писали:
E>>What is the Record-Jar format?
E>>As described in the excellent book "The Art Of UNIX Programming", a Record-Jar structured format file consists of records and fields.
I>Прошу прощения за отрыв от контекста обсуждения ... а эта excellent book встречается в бумажном виде и на русском языке? Довольно редкий случай, когда книжку хочется держать в руках.
Здравствуйте, Limubay, Вы писали:
L>подскажите названия библиотек бля работы с ini файлами, L>чтобы была возможность найти ключ, по названию поля данных L>получить и записать данные L>под виндой есть функции винапи и есть возможность прописывать в реестр
L>вообще как удобнее всего записывать настройки программы под линуксом?
L>заранее спасибо
В свое время написал пакет на перле для работы с INI. Если хочешь могу скинуть.