Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::BufferedFile Class Reference

#include "OVR_File.h"

Inheritance diagram for OVR::BufferedFile:
Inheritance graph
Collaboration diagram for OVR::BufferedFile:
Collaboration graph

Public Member Functions

 BufferedFile (File *pfile)
 
 ~BufferedFile ()
 
virtual int Tell ()
 
virtual SInt64 LTell ()
 
virtual int GetLength ()
 
virtual SInt64 LGetLength ()
 
virtual int Write (const UByte *pbufer, int numBytes)
 
virtual int Read (UByte *pbufer, int numBytes)
 
virtual int SkipBytes (int numBytes)
 
virtual int BytesAvailable ()
 
virtual bool Flush ()
 
virtual int Seek (int offset, int origin=Seek_Set)
 
virtual SInt64 LSeek (SInt64 offset, int origin=Seek_Set)
 
virtual int CopyFromStream (File *pstream, int byteSize)
 
virtual bool Close ()
 
- Public Member Functions inherited from OVR::DelegatedFile
 DelegatedFile (File *pfile)
 
virtual const char * GetFilePath ()
 
virtual bool IsValid ()
 
virtual bool IsWritable ()
 
virtual int GetErrorCode ()
 
- Public Member Functions inherited from OVR::File
 File ()
 
bool IsEOF ()
 
int SeekToBegin ()
 
int SeekToEnd ()
 
int Skip (int numBytes)
 
void WriteUByte (UByte v)
 
void WriteSByte (SByte v)
 
void WriteUInt8 (UByte v)
 
void WriteSInt8 (SByte v)
 
void WriteUInt16 (UInt16 v)
 
void WriteSInt16 (SInt16 v)
 
void WriteUInt32 (UInt32 v)
 
void WriteSInt32 (SInt32 v)
 
void WriteUInt64 (UInt64 v)
 
void WriteSInt64 (SInt64 v)
 
void WriteFloat (float v)
 
void WriteDouble (double v)
 
void WriteUByteBE (UByte v)
 
void WriteSByteBE (SByte v)
 
void WriteUInt8BE (UInt16 v)
 
void WriteSInt8BE (SInt16 v)
 
void WriteUInt16BE (UInt16 v)
 
void WriteSInt16BE (UInt16 v)
 
void WriteUInt32BE (UInt32 v)
 
void WriteSInt32BE (UInt32 v)
 
void WriteUInt64BE (UInt64 v)
 
void WriteSInt64BE (UInt64 v)
 
void WriteFloatBE (float v)
 
void WriteDoubleBE (double v)
 
UByte ReadUByte ()
 
SByte ReadSByte ()
 
UByte ReadUInt8 ()
 
SByte ReadSInt8 ()
 
UInt16 ReadUInt16 ()
 
SInt16 ReadSInt16 ()
 
UInt32 ReadUInt32 ()
 
SInt32 ReadSInt32 ()
 
UInt64 ReadUInt64 ()
 
SInt64 ReadSInt64 ()
 
float ReadFloat ()
 
double ReadDouble ()
 
UByte ReadUByteBE ()
 
SByte ReadSByteBE ()
 
UByte ReadUInt8BE ()
 
SByte ReadSInt8BE ()
 
UInt16 ReadUInt16BE ()
 
SInt16 ReadSInt16BE ()
 
UInt32 ReadUInt32BE ()
 
SInt32 ReadSInt32BE ()
 
UInt64 ReadUInt64BE ()
 
SInt64 ReadSInt64BE ()
 
float ReadFloatBE ()
 
double ReadDoubleBE ()
 
- Public Member Functions inherited from OVR::RefCountBase< File >
OVR_FORCE_INLINE RefCountBase ()
 
- Public Member Functions inherited from OVR::RefCountBaseStatImpl< RefCountImpl >
 RefCountBaseStatImpl ()
 
- Public Member Functions inherited from OVR::RefCountImpl
void AddRef ()
 
void Release ()
 
- Public Member Functions inherited from OVR::RefCountImplCore
OVR_FORCE_INLINE RefCountImplCore ()
 
virtual ~RefCountImplCore ()
 
int GetRefCount () const
 
void operator= (const RefCountImplCore &)
 

Protected Types

enum  BufferModeType { NoBuffer, ReadBuffer, WriteBuffer }
 

Protected Member Functions

bool SetBufferMode (BufferModeType mode)
 
void FlushBuffer ()
 
void LoadBuffer ()
 
 BufferedFile ()
 
 BufferedFile (const BufferedFile &source)
 
- Protected Member Functions inherited from OVR::DelegatedFile
 DelegatedFile ()
 
 DelegatedFile (const DelegatedFile &source)
 

Protected Attributes

UBytepBuffer
 
BufferModeType BufferMode
 
unsigned Pos
 
unsigned DataSize
 
UInt64 FilePos
 
- Protected Attributes inherited from OVR::DelegatedFile
Ptr< FilepFile
 
- Protected Attributes inherited from OVR::RefCountImplCore
volatile int RefCount
 

Additional Inherited Members

- Public Types inherited from OVR::FileConstants
enum  OpenFlags {
  Open_Read = 1, Open_Write = 2, Open_ReadWrite = 3, Open_Truncate = 4,
  Open_Create = 8, Open_CreateOnly = 24, Open_Buffered = 32
}
 
enum  Modes { Mode_Read = 0444, Mode_Write = 0222, Mode_Execute = 0111, Mode_ReadWrite = 0666 }
 
enum  SeekOps { Seek_Set = 0, Seek_Cur = 1, Seek_End = 2 }
 
enum  Errors { Error_FileNotFound = 0x1001, Error_Access = 0x1002, Error_IOError = 0x1003, Error_DiskFull = 0x1004 }
 
- Static Public Member Functions inherited from OVR::RefCountImplCore
static void checkInvalidDelete (RefCountImplCore *)
 

Detailed Description

Definition at line 334 of file OVR_File.h.

Member Enumeration Documentation

Enumerator
NoBuffer 
ReadBuffer 
WriteBuffer 

Definition at line 337 of file OVR_File.h.

Constructor & Destructor Documentation

OVR::BufferedFile::BufferedFile ( )
protected

Definition at line 47 of file OVR_File.cpp.

OVR::BufferedFile::BufferedFile ( const BufferedFile source)
inlineprotected

Definition at line 365 of file OVR_File.h.

OVR::BufferedFile::BufferedFile ( File pfile)

Definition at line 57 of file OVR_File.cpp.

OVR::BufferedFile::~BufferedFile ( )

Definition at line 68 of file OVR_File.cpp.

Member Function Documentation

int OVR::BufferedFile::BytesAvailable ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 372 of file OVR_File.cpp.

bool OVR::BufferedFile::Close ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 551 of file OVR_File.cpp.

int OVR::BufferedFile::CopyFromStream ( File pstream,
int  byteSize 
)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 524 of file OVR_File.cpp.

bool OVR::BufferedFile::Flush ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 392 of file OVR_File.cpp.

void OVR::BufferedFile::FlushBuffer ( )
protected

Definition at line 118 of file OVR_File.cpp.

int OVR::BufferedFile::GetLength ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 195 of file OVR_File.cpp.

SInt64 OVR::BufferedFile::LGetLength ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 207 of file OVR_File.cpp.

void OVR::BufferedFile::LoadBuffer ( )
protected

Definition at line 142 of file OVR_File.cpp.

SInt64 OVR::BufferedFile::LSeek ( SInt64  offset,
int  origin = Seek_Set 
)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 464 of file OVR_File.cpp.

SInt64 OVR::BufferedFile::LTell ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 180 of file OVR_File.cpp.

int OVR::BufferedFile::Read ( UByte pbufer,
int  numBytes 
)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 271 of file OVR_File.cpp.

int OVR::BufferedFile::Seek ( int  offset,
int  origin = Seek_Set 
)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 399 of file OVR_File.cpp.

bool OVR::BufferedFile::SetBufferMode ( BufferModeType  mode)
protected

Definition at line 97 of file OVR_File.cpp.

int OVR::BufferedFile::SkipBytes ( int  numBytes)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 344 of file OVR_File.cpp.

int OVR::BufferedFile::Tell ( )
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 164 of file OVR_File.cpp.

int OVR::BufferedFile::Write ( const UByte pbufer,
int  numBytes 
)
virtual

Reimplemented from OVR::DelegatedFile.

Definition at line 242 of file OVR_File.cpp.

Field Documentation

BufferModeType OVR::BufferedFile::BufferMode
protected

Definition at line 346 of file OVR_File.h.

unsigned OVR::BufferedFile::DataSize
protected

Definition at line 350 of file OVR_File.h.

UInt64 OVR::BufferedFile::FilePos
protected

Definition at line 352 of file OVR_File.h.

UByte* OVR::BufferedFile::pBuffer
protected

Definition at line 345 of file OVR_File.h.

unsigned OVR::BufferedFile::Pos
protected

Definition at line 348 of file OVR_File.h.


The documentation for this class was generated from the following files: