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/iniauto.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) |
| | ~INI_AUTO () |
| | operator const _DT & () const |
| const _DT & | operator= (const _DT &dt) |
| void | Set (const _DT &dt, bool write=true) |
| void | Write (INIHANDLE inihandle=NULL) const |
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),
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 |
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 |
Member Function Documentation
template<class _DT >
| INI_AUTO< _DT >::operator const _DT & |
( |
|
) |
const [inline] |
template<class _DT >
| const _DT& INI_AUTO< _DT >::operator= |
( |
const _DT & |
dt |
) |
[inline] |
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.
The documentation for this class was generated from the following file: