hdac SDK
SDK for hdac blockchain development
Public 멤버 함수 | 모든 멤버 목록
CAutoFile 클래스 참조

#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 ()
 
CAutoFileread (char *pch, size_t nSize)
 
CAutoFilewrite (const char *pch, size_t nSize)
 
template<typename T >
unsigned int GetSerializeSize (const T &obj)
 
template<typename T >
CAutoFileoperator<< (const T &obj)
 
template<typename T >
CAutoFileoperator>> (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).

멤버 함수 문서화

FILE* CAutoFile::Get ( ) const
inline

Get wrapped FILE* without transfer of ownership.

주의
Ownership of the FILE* will remain with this class. Use this only if the scope of the CAutoFile outlives use of the passed pointer.
bool CAutoFile::IsNull ( ) const
inline

Return true if the wrapped FILE* is NULL, false otherwise.

FILE* CAutoFile::release ( )
inline

Get wrapped FILE* with transfer of ownership.

주의
This will invalidate the CAutoFile object, and makes it the responsibility of the caller of this function to clean up the returned FILE*.

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: