YGP::INIList< T, L > Class Template Reference

Class to parse all entries of a section into a list (vector) of values (see INIFile for more details). More...

Inherits YGP::INISection.

List of all members.

Public Member Functions

 INIList (const char *name, L &values)
 ~INIList ()
void write (std::ostream &stream)

Static Public Member Functions

static void write (std::ostream &stream, const char *section, const L &values)

Protected Member Functions

virtual int foundKey (const char *key, unsigned int)
virtual int foundValue (const char *value, unsigned int len)


Detailed Description

template<class T, class L = std::vector<T>>
class YGP::INIList< T, L >

Class to parse all entries of a section into a list (vector) of values (see INIFile for more details).

The entries of the section must have a numeric key, which specifies the (zero-based) offset of the entry of the list its value belongs to.


Constructor & Destructor Documentation

template<class T , class L = std::vector<T>>
YGP::INIList< T, L >::INIList ( const char *  name,
L &  values 
) [inline]

Constructor; Creates an object named name and a vector to receive the parsed values.

Parameters:
name Name of the section
values List to store the passed values

template<class T , class L = std::vector<T>>
YGP::INIList< T, L >::~INIList (  )  [inline]

Destructor; Frees the internally used attribute list.


Member Function Documentation

template<class T , class L = std::vector<T>>
virtual int YGP::INIList< T, L >::foundKey ( const char *  key,
unsigned  int 
) [inline, protected, virtual]

Callback when a key is found while parsing the INI-file (during parsing the INIList).

This method considers the key as offet for the value in the list.

Reimplemented from YGP::INISection.

template<class T , class L = std::vector<T>>
virtual int YGP::INIList< T, L >::foundValue ( const char *  value,
unsigned int  len 
) [inline, protected, virtual]

Callback when a value is found while parsing the INI-file (during parsing the INIList).

This method assigns value to the previously parsed offset.

Reimplemented from YGP::INISection.

template<class T , class L = std::vector<T>>
static void YGP::INIList< T, L >::write ( std::ostream &  stream,
const char *  section,
const L &  values 
) [inline, static]

Writes the contents of the passed values to the passed stream (in its own section named section).

Parameters:
stream Stream to write to
section Name of section to write
values Values to write

template<class T , class L = std::vector<T>>
void YGP::INIList< T, L >::write ( std::ostream &  stream  )  [inline]

Writes the contents of the holded attribute values to the passed stream (in its own section).

Parameters:
stream Stream to write to


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

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:27 2009 by doxygen 1.5.8