TMCfstream Class Reference
[MCCore]

Inheritance diagram for TMCfstream:

TMCiostream TMCObject TMCBinaryFileIO TMCBinaryFileReader TMCBinaryFileWriter

List of all members.

Public Member Functions

 TMCfstream ()
 TMCfstream (const int8 *fullPathName, TranscoderType type, int mode=TMCiostream::in, int32 bufSize=kDefaultBufferSize, boolean *createdNewFile=nil)
 TMCfstream (IMCFile &inFile, int mode, TranscoderType type, int32 bufSize=kDefaultBufferSize, boolean *createdNewFile=nil)
 If you use TMCiostream::current for mode, the mode will be taken from inFile, in which case you'd better have set the correct permission on it...
 ~TMCfstream ()
virtual MCErr Init (const int8 *fullPathName, TranscoderType type, int mode=TMCiostream::in, int32 bufSize=kDefaultBufferSize, boolean *createdNewFile=nil)
virtual MCErr Init (IMCFile &file, int32 bufSize, boolean *createdNewFile, TranscoderType type)
virtual int32 tell ()
virtual void seek (int32 off, seek_dir dir=beg)
virtual void putback (int8 c)
 can only be used on (some) input streams
virtual void read (int8 *s, int32 n)
virtual void write (const int8 *s, int32 n)
void append (int32 n)
void flush ()
void synch ()
void SetInfo (int32 creator, int32 type)
int32 GetFileSize ()
virtual void readFileRef (int8 *p)
virtual void writeFileRef (const int8 *p)
virtual
TMCiostreamContext * 
GetContext ()
const IMCFile * GetFile ()

Static Public Member Functions

static void GetFileRef (const int8 *itsFullPathName, int8 *itsFileRef, const int8 *currentPath)
static void GetFullPathNameFromRef (const int8 *itsFileRef, int8 *itsFullPathName, const int8 *currentPath)

Protected Member Functions

void close ()
void LoadBuffer (int32 pos)
void LoadPrevBuffer ()
void LoadNextBuffer ()
void DumpBuffer ()

Protected Attributes

TMCCountedPtr< IMCFile > fFile
int8 * fBuffer
uint32 fBufferSize
uint32 fActualBufSize
uint32 fBufferPos
uint32 fBufferOffset
uint32 fFileSize
boolean fBufferModified
boolean fFirstBufferLoaded


Detailed Description

Reads/writes from/into a local file

Constructor & Destructor Documentation

TMCfstream::TMCfstream (  ) 

TMCfstream::TMCfstream ( const int8 *  fullPathName,
TranscoderType  type,
int  mode = TMCiostream::in,
int32  bufSize = kDefaultBufferSize,
boolean *  createdNewFile = nil 
)

TMCfstream::TMCfstream ( IMCFile &  inFile,
int  mode,
TranscoderType  type,
int32  bufSize = kDefaultBufferSize,
boolean *  createdNewFile = nil 
)

If you use TMCiostream::current for mode, the mode will be taken from inFile, in which case you'd better have set the correct permission on it...

TMCfstream::~TMCfstream (  ) 


Member Function Documentation

virtual MCErr TMCfstream::Init ( const int8 *  fullPathName,
TranscoderType  type,
int  mode = TMCiostream::in,
int32  bufSize = kDefaultBufferSize,
boolean *  createdNewFile = nil 
) [virtual]

virtual MCErr TMCfstream::Init ( IMCFile &  file,
int32  bufSize,
boolean *  createdNewFile,
TranscoderType  type 
) [virtual]

virtual int32 TMCfstream::tell (  )  [virtual]

Implements TMCiostream.

virtual void TMCfstream::seek ( int32  off,
seek_dir  dir = beg 
) [virtual]

Implements TMCiostream.

virtual void TMCfstream::putback ( int8  c  )  [virtual]

can only be used on (some) input streams

Implements TMCiostream.

virtual void TMCfstream::read ( int8 *  s,
int32  n 
) [virtual]

Implements TMCiostream.

virtual void TMCfstream::write ( const int8 *  s,
int32  n 
) [virtual]

Implements TMCiostream.

void TMCfstream::append ( int32  n  ) 

void TMCfstream::flush (  ) 

void TMCfstream::synch (  ) 

void TMCfstream::SetInfo ( int32  creator,
int32  type 
)

int32 TMCfstream::GetFileSize (  ) 

virtual void TMCfstream::readFileRef ( int8 *  p  )  [virtual]

Reimplemented from TMCiostream.

virtual void TMCfstream::writeFileRef ( const int8 *  p  )  [virtual]

Reimplemented from TMCiostream.

virtual TMCiostreamContext* TMCfstream::GetContext (  )  [virtual]

Reimplemented from TMCiostream.

const IMCFile* TMCfstream::GetFile (  )  [inline]

static void TMCfstream::GetFileRef ( const int8 *  itsFullPathName,
int8 *  itsFileRef,
const int8 *  currentPath 
) [static]

static void TMCfstream::GetFullPathNameFromRef ( const int8 *  itsFileRef,
int8 *  itsFullPathName,
const int8 *  currentPath 
) [static]

void TMCfstream::close (  )  [protected]

void TMCfstream::LoadBuffer ( int32  pos  )  [protected]

void TMCfstream::LoadPrevBuffer (  )  [protected]

void TMCfstream::LoadNextBuffer (  )  [protected]

void TMCfstream::DumpBuffer (  )  [protected]


Member Data Documentation

TMCCountedPtr<IMCFile> TMCfstream::fFile [protected]

Reimplemented in TMCBinaryFileIO.

int8* TMCfstream::fBuffer [protected]

uint32 TMCfstream::fBufferSize [protected]

uint32 TMCfstream::fActualBufSize [protected]

uint32 TMCfstream::fBufferPos [protected]

uint32 TMCfstream::fBufferOffset [protected]

uint32 TMCfstream::fFileSize [protected]

boolean TMCfstream::fBufferModified [protected]

boolean TMCfstream::fFirstBufferLoaded [protected]


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 15:19:31 2007 for Carrara SDK Doc by  doxygen 1.5.3