Public Member Functions | |
CBofFile () | |
CBofFile (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004)) | |
virtual | ~CBofFile () |
ErrorCode | open (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004)) |
ErrorCode | create (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004)|0x00000020) |
virtual ErrorCode | close () |
virtual ErrorCode | read (void *pDestBuf, int32 lBytes) |
virtual ErrorCode | write (const void *pSrcBuf, int32 lBytes) |
void | commit () |
ErrorCode | seek (uint32 lPos) |
ErrorCode | seekToBeginning () |
ErrorCode | seekToEnd () |
ErrorCode | setPosition (uint32 lPos) |
uint32 | getPosition () |
uint32 | getLength () |
operator Common::SeekableReadStream * () const | |
Public Member Functions inherited from Bagel::CBofError | |
void | reportError (ErrorCode errCode, const char *format,...) |
bool | errorOccurred () const |
ErrorCode | getErrorCode () const |
void | clearError () |
Protected Attributes | |
char | _szFileName [MAX_FNAME] |
Common::Stream * | _stream = nullptr |
uint32 | _lFlags = ( 0x00000002 | 0x00000004 ) |
Protected Attributes inherited from Bagel::CBofError | |
ErrorCode | _errCode |
Additional Inherited Members | |
Static Public Member Functions inherited from Bagel::CBofObject | |
static bool | isValidObject (const CBofObject *pObject) |
Static Public Member Functions inherited from Bagel::CBofError | |
static void | fatalError (ErrorCode errCode, const char *format,...) |
static void | initialize () |
static int | getErrorCount () |
Protected Member Functions inherited from Bagel::CBofError | |
virtual void | bofMessageBox (const Common::String &content, const Common::String &title) |
Static Protected Attributes inherited from Bagel::CBofError | |
static int | _count |
Bagel::CBofFile::CBofFile | ( | ) |
Default constructor
Bagel::CBofFile::CBofFile | ( | const char * | pszFileName, |
uint32 | lFlags = (0x00000002|0x00000004) |
||
) |
Open a specified file for access
pszFileName | Filename |
lFlags | Access flags |
|
virtual |
Destructor
ErrorCode Bagel::CBofFile::open | ( | const char * | pszFileName, |
uint32 | lFlags = (0x00000002|0x00000004) |
||
) |
Open specified file into this object
pszFileName | Filename |
lFlags | Access flags |
ErrorCode Bagel::CBofFile::create | ( | const char * | pszFileName, |
uint32 | lFlags = (0x00000002|0x00000004)|0x00000020 |
||
) |
Creates specified file
pszFileName | Filename |
lFlags | Access flags |
|
virtual |
Close a currently open file
Reimplemented in Bagel::CBofDataFile.
|
virtual |
Read from a currently open file
pDestBuf | Destination buffer |
lBytes | Number of bytes |
Reimplemented in Bagel::CBofDataFile.
|
virtual |
Write to a currently open file
pSrcBuf | Source buffer |
lBytes | Number of bytes |
Reimplemented in Bagel::CBofDataFile.
void Bagel::CBofFile::commit | ( | ) |
Flushes I/O stream
|
inline |
Seek to a specified location in the file
|
inline |
Sets the file pointer to the beginning of the file
ErrorCode Bagel::CBofFile::seekToEnd | ( | ) |
Sets the file pointer to the end of the file
ErrorCode Bagel::CBofFile::setPosition | ( | uint32 | lPos | ) |
Sets the current file-seek position to that specified
lPos | New position |
uint32 Bagel::CBofFile::getPosition | ( | ) |
Retrieves the current seek position
uint32 Bagel::CBofFile::getLength | ( | ) |
Get the length of a file