FileStream Class Reference#include <fileStream.h>
Inheritance diagram for FileStream:
[legend]
|
Public Types |
enum | AccessMode {
Read = File::Read,
Write = File::Write,
ReadWrite = File::ReadWrite,
WriteAppend = File::WriteAppend
} |
enum | {
BUFFER_SIZE = 8 * 1024,
BUFFER_INVALID = 0xffffffff
} |
Public Member Functions |
| FileStream () |
virtual | ~FileStream () |
virtual bool | hasCapability (const Capability i_cap) const |
| Checks to see if this stream has the capability of a given function.
|
virtual U32 | getPosition () const |
| Gets the position in the stream.
|
virtual bool | setPosition (const U32 i_newPosition) |
| Sets the position of the stream. Returns if the new position is valid or not.
|
virtual U32 | getStreamSize () |
| Gets the size of the stream.
|
bool | open (const char *i_pFilename, AccessMode i_openMode) |
void | close () |
bool | flush () |
Protected Member Functions |
virtual bool | _read (const U32 i_numBytes, void *o_pBuffer) |
virtual bool | _write (const U32 i_numBytes, const void *i_pBuffer) |
void | init () |
bool | fillBuffer (const U32 i_startPosition) |
void | clearBuffer () |
void | setStatus () |
Static Protected Member Functions |
static void | calcBlockHead (const U32 i_position, U32 *o_blockHead) |
static void | calcBlockBounds (const U32 i_position, U32 *o_blockHead, U32 *o_blockTail) |
Private Member Functions |
| FileStream (const FileStream &i_fileStrm) |
FileStream & | operator= (const FileStream &i_fileStrm) |
Private Attributes |
File | mFile |
U32 | mStreamCaps |
U8 | mBuffer [BUFFER_SIZE] |
U32 | mBuffHead |
U32 | mBuffPos |
U32 | mBuffTail |
bool | mDirty |
bool | mEOF |
Member Enumeration Documentation
- Enumerator:
-
Read |
|
Write |
|
ReadWrite |
|
WriteAppend |
|
- Enumerator:
-
BUFFER_SIZE |
|
BUFFER_INVALID |
|
Constructor & Destructor Documentation
FileStream::FileStream |
( |
const FileStream & |
i_fileStrm |
) |
[private] |
FileStream::FileStream |
( |
|
) |
|
virtual FileStream::~FileStream |
( |
|
) |
[virtual] |
Member Function Documentation
virtual bool FileStream::hasCapability |
( |
const Capability |
Capability |
) |
const [virtual] |
Checks to see if this stream has the capability of a given function.
Implements Stream.
virtual U32 FileStream::getPosition |
( |
|
) |
const [virtual] |
Gets the position in the stream.
Implements Stream.
virtual bool FileStream::setPosition |
( |
const U32 |
in_newPosition |
) |
[virtual] |
Sets the position of the stream. Returns if the new position is valid or not.
Implements Stream.
virtual U32 FileStream::getStreamSize |
( |
|
) |
[virtual] |
Gets the size of the stream.
Implements Stream.
bool FileStream::open |
( |
const char * |
i_pFilename, |
|
|
AccessMode |
i_openMode | |
|
) |
| | |
void FileStream::close |
( |
|
) |
|
bool FileStream::flush |
( |
|
) |
|
virtual bool FileStream::_read |
( |
const U32 |
i_numBytes, |
|
|
void * |
o_pBuffer | |
|
) |
| | [protected, virtual] |
virtual bool FileStream::_write |
( |
const U32 |
i_numBytes, |
|
|
const void * |
i_pBuffer | |
|
) |
| | [protected, virtual] |
void FileStream::init |
( |
|
) |
[protected] |
bool FileStream::fillBuffer |
( |
const U32 |
i_startPosition |
) |
[protected] |
void FileStream::clearBuffer |
( |
|
) |
[protected] |
static void FileStream::calcBlockHead |
( |
const U32 |
i_position, |
|
|
U32 * |
o_blockHead | |
|
) |
| | [static, protected] |
static void FileStream::calcBlockBounds |
( |
const U32 |
i_position, |
|
|
U32 * |
o_blockHead, |
|
|
U32 * |
o_blockTail | |
|
) |
| | [static, protected] |
void FileStream::setStatus |
( |
|
) |
[protected] |
Field Documentation
|