Public Types | Public Member Functions

xl7::io::IniFile Class Reference

#include <IniFile.h>

List of all members.

Public Types

typedef std::vector
< cl7::string_type
Sections
typedef std::vector
< cl7::string_type >::iterator 
SectionIterator
typedef std::vector
< cl7::string_type
Keys
typedef std::vector
< cl7::string_type
KeyIterator

Public Member Functions

 IniFile (void)
 ~IniFile (void)
const cl7::string_typeGetFileName () const
bool Init (const cl7::string_type &file_name)
Sections GetAllSections ()
Keys GetAllSectionKeys (const cl7::string_type &section)
cl7::string_type GetKeyValue (const cl7::string_type &section, const cl7::string_type &key, const cl7::string_type &default_value=cl7::string_type(TEXT("")))
bool SetKeyValue (const cl7::string_type &section, const cl7::string_type &key, const cl7::string_type &value)
bool RemoveSection (const cl7::string_type &section)
bool RemoveKey (const cl7::string_type &section, const cl7::string_type &key)
bool RemoveKeyValue (const cl7::string_type &section, const cl7::string_type &key)

Detailed Description

Supports funtionality for initialization files (INI file format).


Member Typedef Documentation

typedef std::vector<cl7::string_type>::iterator xl7::io::IniFile::SectionIterator

Constructor & Destructor Documentation

xl7::io::IniFile::IniFile ( void   ) 

Default constructor.

xl7::io::IniFile::~IniFile ( void   ) 

Destructor.


Member Function Documentation

IniFile::Keys xl7::io::IniFile::GetAllSectionKeys ( const cl7::string_type section  ) 

Returns a list of the keys of the given section.

Returns a list of the keys of the section with the given name.

IniFile::Sections xl7::io::IniFile::GetAllSections (  ) 

Returns a list of the sections within this initialization file.

const cl7::string_type& xl7::io::IniFile::GetFileName (  )  const [inline]

Returns the file name of the initialization file.

cl7::string_type xl7::io::IniFile::GetKeyValue ( const cl7::string_type section,
const cl7::string_type key,
const cl7::string_type default_value = cl7::string_type(TEXT("")) 
)

Returns the value of the given key.

bool xl7::io::IniFile::Init ( const cl7::string_type file_name  ) 

Prepares the initialization file.

bool xl7::io::IniFile::RemoveKey ( const cl7::string_type section,
const cl7::string_type key 
)

Removes a key (and its value) from a section.

bool xl7::io::IniFile::RemoveKeyValue ( const cl7::string_type section,
const cl7::string_type key 
)

Removes the value of a key by setting it to an empty string.

bool xl7::io::IniFile::RemoveSection ( const cl7::string_type section  ) 

Removes a complete section with all its keys and values.

bool xl7::io::IniFile::SetKeyValue ( const cl7::string_type section,
const cl7::string_type key,
const cl7::string_type value 
)

Writes the given value for a key into the initialization file.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines