hdac SDK
SDK for hdac blockchain development
|
#include <streams.h>
Public 멤버 함수 | |
CAutoFile (FILE *filenew, int nTypeIn, int nVersionIn) | |
void | fclose () |
FILE * | release () |
FILE * | Get () const |
bool | IsNull () const |
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) |
Non-refcounted 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).
|
inline |
Get wrapped FILE* without transfer of ownership.
|
inline |
Return true if the wrapped FILE* is NULL, false otherwise.
|
inline |
Get wrapped FILE* with transfer of ownership.