![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cFile.h>
Public Member Functions | |
virtual | ~CFile () |
virtual STREAM_SEEKRET_t | Seek (STREAM_OFFSET_t lOffset=0, SEEK_ORIGIN_TYPE eSeekOrigin=SEEK_Set) |
virtual STREAM_POS_t | GetPosition () const |
virtual STREAM_POS_t | GetLength () const |
virtual void | SetLength (STREAM_SEEKRET_t dwNewLen) |
virtual void | Close () |
HRESULT | Write (const void *pData, size_t nDataSize) |
HRESULT | Read (void *pData, size_t nDataSize) |
![]() | |
virtual | ~CObject () |
virtual bool | isValidCheck () const noexcept |
< memory allocation and structure definitions are valid. More... | |
virtual void | AssertValid () const |
< memory allocation and structure definitions are valid. More... | |
virtual void | Serialize (cArchive &a) |
Public Attributes | |
cOSHandle | m_hFile |
OSHandle for the open file. More... | |
Protected Member Functions | |
bool | isFileOpen () const noexcept |
HRESULT | OpenCreate (cStringF sFilePath="", OF_FLAGS_t nOpenFlags=OF_CREATE|OF_WRITE, _SECURITY_ATTRIBUTES *pSa=nullptr) |
Protected Attributes | |
cStringF | m_strFileName |
store a copy of the full file path. MFC defined name. More... | |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Gray::cFileText, and Gray::cFile.
|
virtual |
Get the size of the open file in bytes. like MFC
Reimplemented in GrayLib::cFileMem, and Gray::cFile.
|
virtual |
Get the current read position in the file. Seek( 0, SEEK_CUR ) like MFC Use _tell( m_hFile ) for linux ?
Reimplemented in GrayLib::cFileMem, Gray::cFileText, and Gray::cFile.
|
inlineprotectednoexcept |
|
protected |
Open a file handle.
|
inline |
|
virtual |
Change or get the current file position pointer. Compatible with MFC definition. Might be 'const' but MFC wont allow that
Reimplemented in Gray::cFileText, GrayLib::cFileMem, and Gray::cFile.
|
virtual |
Grow/Shrink the file. Stupid MFC has void return. use HResult::GetLast()
Reimplemented in GrayLib::cFileMem.
HRESULT Gray::CFile::Write | ( | const void * | pData, |
size_t | nDataSize | ||
) |
Write a block to the stream. advance the current position. Like WriteX
cOSHandle Gray::CFile::m_hFile |
OSHandle for the open file.
|
protected |
store a copy of the full file path. MFC defined name.