FileStream

Engine/source/core/stream/fileStream.h

More...

Public Types

enum
_Anonymous_ {
  BUFFER_SIZE = 8 * 1024
  BUFFER_INVALID = 0xffffffff
}
char
Ch 

Character type. Only support char.

Protected Attributes

Private Attributes

Public Functions

Create an exact replica of this stream.

bool
bool

Gets the position in the stream.

Gets the size of the stream.

bool

Checks to see if this stream has the capability of a given function.

bool
bool
setPosition(const U32 in_newPosition)

Sets the position of the stream. Returns if the new position is valid or not.

Public Static Functions

Protected Functions

bool
_read(const U32 i_numBytes, void * o_pBuffer)
bool
_write(const U32 i_numBytes, const void * i_pBuffer)
bool
fillBuffer(const U32 i_startPosition)

Protected Static Functions

calcBlockBounds(const U32 i_position, U32 * o_blockHead, U32 * o_blockTail)
calcBlockHead(const U32 i_position, U32 * o_blockHead)

Private Functions

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)

Private Functions

FileStream(const FileStream & i_fileStrm)

operator=(const FileStream & i_fileStrm)