libthinkpad  2.6
https://github.com/libthinkpad
Public Member Functions | List of all members
ThinkPad::Utilities::Ini::Ini Class Reference

This class represents a .ini/.conf/.desktop file parser based on the Windows INI standard. More...

#include <libthinkpad.h>

Public Member Functions

vector< IniSection * > * readIni (string path)
 parse parse a config file from the disk into the class More...
 
bool writeIni (string path)
 writeConfig write a list of sections to the disk More...
 
vector< IniSection * > getSections (const char *section)
 
IniSectiongetSection (const char *section)
 
void addSection (IniSection *section)
 

Detailed Description

This class represents a .ini/.conf/.desktop file parser based on the Windows INI standard.

WARNING: COMMENTS ARE NOT SUPPORTED!

Member Function Documentation

void ThinkPad::Utilities::Ini::Ini::addSection ( IniSection section)

Add a section to the config file

Parameters
sectionthe section to add
Utilities::Ini::IniSection * ThinkPad::Utilities::Ini::Ini::getSection ( const char *  section)

Get a single section from the file with the name

Parameters
sectionthe section to get
Returns
the section in the file or null
vector< Utilities::Ini::IniSection * > ThinkPad::Utilities::Ini::Ini::getSections ( const char *  section)

Get a list of sections from the file with the same name

Parameters
sectionthe name of the sections
Returns
the section or empry vector
vector< Utilities::Ini::IniSection * > * ThinkPad::Utilities::Ini::Ini::readIni ( string  path)

parse parse a config file from the disk into the class

Parameters
paththe path to the file to parse
Returns
the point to the section list
bool ThinkPad::Utilities::Ini::Ini::writeIni ( string  path)

writeConfig write a list of sections to the disk

Parameters
sectionsthe list of sections to write
paththe path to write

The documentation for this class was generated from the following files: