FileStream
Engine/source/core/stream/fileStream.h
Public Types
enum
_Anonymous_ { BUFFER_SIZE = 8 * 1024 BUFFER_INVALID = 0xffffffff }
char
Ch
Character type. Only support char.
Protected Attributes
Private Attributes
Public Functions
clone()
Create an exact replica of this stream.
bool
flush()
bool
Flush()
Gets the position in the stream.
Gets the size of the stream.
bool
hasCapability(const Capability caps)
Checks to see if this stream has the capability of a given function.
bool
open(const String & inFileName, Torque::FS::File::AccessMode inMode)
bool
setPosition(const U32 in_newPosition)
Sets the position of the stream. Returns if the new position is valid or not.
Public Static Functions
createAndOpen(const String & inFileName, Torque::FS::File::AccessMode inMode)
Protected Functions
Protected Static Functions
Private Functions
FileStream(const FileStream & i_fileStrm)
operator=(const FileStream & i_fileStrm)
Detailed Description
Public Types
@69
Enumerator
- BUFFER_SIZE = 8 * 1024
- BUFFER_INVALID = 0xffffffff
typedef char Ch
Character type. Only support char.
Protected Attributes
U32 mStreamCaps
Private Attributes
U8 mBuffer [BUFFER_SIZE]
U32 mBuffHead
U32 mBuffPos
U32 mBuffTail
bool mDirty
bool mEOF
Torque::FS::FileRef mFile
Public Functions
FileStream()
~FileStream()
clone()
Reimplemented from: Stream
close()
Reimplemented by: Zip::ZipTempStream
flush()
Flush()
getPosition()
Reimplemented from: Stream
getStreamSize()
Reimplemented from: Stream
hasCapability(const Capability caps)
Reimplemented from: Stream
open(const String & inFileName, Torque::FS::File::AccessMode inMode)
setPosition(const U32 in_newPosition)
Reimplemented from: Stream
Reimplemented by: Zip::ZipTempStream
Public Static Functions
createAndOpen(const String & inFileName, Torque::FS::File::AccessMode inMode)
Protected Functions
_read(const U32 i_numBytes, void * o_pBuffer)
Reimplemented from: Stream
_write(const U32 i_numBytes, const void * i_pBuffer)
Reimplemented from: Stream
clearBuffer()
fillBuffer(const U32 i_startPosition)
init()
setStatus()
Protected Static Functions
calcBlockBounds(const U32 i_position, U32 * o_blockHead, U32 * o_blockTail)
calcBlockHead(const U32 i_position, U32 * o_blockHead)