INI_AUTO< _DT > Class Template Reference

INI_AUTO is a class designed to automatically handle reading and writing of data from an INI file and ensure that IniRead \ IniWrite pairs function together correctly. More...

#include <mi32/inidefns.h>

List of all members.

Public Member Functions

 INI_AUTO (const _DT &defaultdata, const char *field, const char *group=NULL, bool copyfield=false, bool copygroup=false)
 INI_AUTO (const char *field, const char *group=NULL, bool copyfield=false, bool copygroup=false)
 operator const _DT & () const
const _DT & operator= (const _DT &dt)
void Set (const _DT &dt, bool write=true)
void Write (INIHANDLE inihandle=NULL) const
 ~INI_AUTO ()


Detailed Description

template<class _DT>
class INI_AUTO< _DT >

INI_AUTO is a class designed to automatically handle reading and writing of data from an INI file and ensure that IniRead \ IniWrite pairs function together correctly.

The constructor calls IniRead and the assignment operator calls IniWrite. The Write method allows the data to be written to the INI file at times other than assignment if necessary.

Example: INI_AUTO<COLOR> m_Color; In container constructor's initializer list: m_Color(COLOR::RED),

Definition at line 809 of file inidefns.h.


Constructor & Destructor Documentation

template<class _DT>
INI_AUTO< _DT >::INI_AUTO const char *  field,
const char *  group = NULL,
bool  copyfield = false,
bool  copygroup = false
[inline]
 

Parameters:
field  Field that the data is to be stored under
group  Group to locate field in, uses GetAppName() if NULL
copyfield  Keep internal copy
copygroup  Keep internal copy

Definition at line 813 of file inidefns.h.

template<class _DT>
INI_AUTO< _DT >::INI_AUTO const _DT &  defaultdata,
const char *  field,
const char *  group = NULL,
bool  copyfield = false,
bool  copygroup = false
[inline]
 

Parameters:
defaultdata  Default value
field  Field that the data is to be stored under
group  Group to locate field in, uses GetAppName() if NULL
copyfield  Keep internal copy
copygroup  Keep internal copy

Definition at line 829 of file inidefns.h.

template<class _DT>
INI_AUTO< _DT >::~INI_AUTO  )  [inline]
 

Definition at line 847 of file inidefns.h.


Member Function Documentation

template<class _DT>
INI_AUTO< _DT >::operator const _DT &  )  const [inline]
 

Definition at line 853 of file inidefns.h.

template<class _DT>
const _DT& INI_AUTO< _DT >::operator= const _DT &  dt  )  [inline]
 

Definition at line 856 of file inidefns.h.

template<class _DT>
void INI_AUTO< _DT >::Set const _DT &  dt,
bool  write = true
[inline]
 

Alternative to assignment - allows setting of data without writing to file.

Definition at line 866 of file inidefns.h.

template<class _DT>
void INI_AUTO< _DT >::Write INIHANDLE  inihandle = NULL  )  const [inline]
 

Force write to file.

Definition at line 876 of file inidefns.h.


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:28:44 2006 for TNTsdk by  doxygen 1.3.8-20040913