IniFile
An INI file
still has its permissions, especially if you look at Windows with
its registry;-) An INI has sections [entries in square brackets] and values
(e.g.: value=1).
Class ini::File is provided for this purpose. Usually four methods are sufficient
to create or read an INI file, set and determine values and store thi INI file
again.
Creates a new INI file "test.ini":
ini::File * t_pIniFile = new ini::File("test.ini", ini::bCreateInifile);Loads the INI file "test.ini" from the file system:
ini::File * t_pIniFile = new ini::File("test.ini", ini::bOpenInifile);Writes in sektion "Section 1" the key "Key 1" with the value "Value 1":
int iRetVal = t_pIniFile->setKeyValue( "[Section 1]", "Key 1", "Value 1" );Reads the value of the key "Key 1" from the sektion "Section 1":
std::string Value, Section( "[Section 1]" ), Key( "Key 1" ); t_iErr = t_pIniFile->getKeyValue( Value, & Section, & Key );Stores the INI file in the file system:
int iRetVal = t_pIniFile->store();
The current version IniFile 1.0.2 is implemented in the C++ programming language and has so far been used with:
- Microsoft Visual Studio 2010 C++ 98 (32 bit)
- Microsoft Visual Studio 2015 C++ 98 (32 and 64 bit)
- Microsoft Visual Studio 2017 C++ 14/C++ 17 (32 and 64 bit)
- Microsoft Visual Studio 2019 C++ 14/C++ 17/C++ 20 (32 and 64 bit)
- Microsoft Visual Studio 2022 C++ 14/C++ 17/C++ 20 (32 and 64 bit)
- MinGW Version 5.3.0 (32 bit)
- MinGW Version 7.3.0 (32 and 64 bit)
- MinGW Version 8.x (32 and 64 bit)
- MinGW Version 9.x (64 bit)
- MinGW Version 11.2.20 (64 bit)
- gcc 4.8.3 (32 bit)
- gcc 5.4.0 (32 bit)
- gcc 7.4.40 (64 bit)
- gcc 9.3.30 (64 bit)
- gcc 11.3.30 (64 bit)
- clang 6.0.0 (64 bit)
- clang 10.0.0 (64 bit)
- clang 14.0.0 (64 bit)
Windows
Linux
IniFile User Guides (online)
Download IniFile
The texts were translated into English with the support of www.DeepL.com and translate.google.de.