![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
RAII wrapper for FILE*. More...
#include <serialize.h>
Collaboration diagram for CAutoFile:Public Member Functions | |
| CAutoFile (FILE *filenew, int nTypeIn, int nVersionIn) | |
| ~CAutoFile () | |
| void | fclose () |
| FILE * | release () |
| operator FILE * () | |
| FILE * | operator-> () |
| FILE & | operator* () |
| FILE ** | operator& () |
| FILE * | operator= (FILE *pnew) |
| bool | operator! () |
| void | setstate (short bits, const char *psz) |
| bool | fail () const |
| bool | good () const |
| void | clear (short n=0) |
| short | exceptions () |
| short | exceptions (short mask) |
| void | SetType (int n) |
| int | GetType () |
| void | SetVersion (int n) |
| int | GetVersion () |
| void | ReadVersion () |
| void | WriteVersion () |
| CAutoFile & | read (char *pch, size_t nSize) |
| CAutoFile & | write (const char *pch, size_t nSize) |
| template<typename T > | |
| unsigned int | GetSerializeSize (const T &obj) |
| template<typename T > | |
| CAutoFile & | operator<< (const T &obj) |
| template<typename T > | |
| CAutoFile & | operator>> (T &obj) |
Public Attributes | |
| int | nType |
| int | nVersion |
Protected Attributes | |
| FILE * | file |
| short | state |
| short | exceptmask |
RAII wrapper for FILE*.
Will automatically close the file when it goes out of scope if not null. If you're returning the file pointer, return file.release(). If you need to close the file early, use file.fclose() instead of fclose(file).
Definition at line 1145 of file serialize.h.
Definition at line 1155 of file serialize.h.
|
inline |
Definition at line 1164 of file serialize.h.
References fclose().
Here is the call graph for this function:
|
inline |
Definition at line 1197 of file serialize.h.
|
inline |
Definition at line 1198 of file serialize.h.
References exceptmask.
|
inline |
Definition at line 1199 of file serialize.h.
References exceptmask, and setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1195 of file serialize.h.
|
inline |
Definition at line 1169 of file serialize.h.
Referenced by ~CAutoFile().
Here is the caller graph for this function:
|
inline |
Definition at line 1227 of file serialize.h.
References GetSerializeSize().
Referenced by WriteBlockToDisk().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1202 of file serialize.h.
References nType.
|
inline |
Definition at line 1204 of file serialize.h.
References nVersion.
|
inline |
Definition at line 1196 of file serialize.h.
|
inline |
Definition at line 1177 of file serialize.h.
References file.
|
inline |
Definition at line 1182 of file serialize.h.
|
inline |
Definition at line 1180 of file serialize.h.
References file.
|
inline |
Definition at line 1179 of file serialize.h.
References file.
|
inline |
Definition at line 1178 of file serialize.h.
References file.
|
inline |
Definition at line 1234 of file serialize.h.
References Serialize().
Here is the call graph for this function:
|
inline |
Definition at line 1181 of file serialize.h.
|
inline |
Definition at line 1244 of file serialize.h.
References Unserialize().
Here is the call graph for this function:Definition at line 1208 of file serialize.h.
References setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1205 of file serialize.h.
References nVersion.
|
inline |
Definition at line 1176 of file serialize.h.
References file.
|
inline |
Definition at line 1188 of file serialize.h.
Referenced by exceptions(), read(), and write().
Here is the caller graph for this function:
|
inline |
Definition at line 1201 of file serialize.h.
|
inline |
Definition at line 1203 of file serialize.h.
Definition at line 1217 of file serialize.h.
References setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1206 of file serialize.h.
References nVersion.
|
protected |
Definition at line 1150 of file serialize.h.
Referenced by exceptions().
|
protected |
Definition at line 1148 of file serialize.h.
Referenced by operator FILE *(), operator&(), operator*(), operator->(), and release().
| int CAutoFile::nType |
Definition at line 1152 of file serialize.h.
Referenced by GetType().
| int CAutoFile::nVersion |
Definition at line 1153 of file serialize.h.
Referenced by GetVersion(), ReadVersion(), and WriteVersion().
|
protected |
Definition at line 1149 of file serialize.h.
1.8.8