Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_FileOutStream Class Reference

Inheritance diagram for CP_FileOutStream:

CP_OutStream List of all members.

Public Member Functions

Constructor / Destructor
 CP_FileOutStream (CP_File &inOutFile, bool inHasHeader=true)
 Constructor.
virtual ~CP_FileOutStream () throw ()
 Destructor.
Positioning
virtual UInt32 GetPosition () const
virtual void SetPosition (UInt32 newPosition)

Protected Member Functions

Writing
virtual void OnWriteBytes (const void *inDestBuffer, UInt32 inNumberBytes)
virtual UInt32 OnWriteData (const void *inDestBuffer, UInt32 inNumberBytes)

Protected Attributes

CP_FilefFile
bool fHeaderWasWritten
bool fNeedsByteSwap
UInt32 fCurrentPosition
UInt16 fCPLATStreamVersion
bool fHasTaggedData
bool fHasHeader

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_FileOutStream::CP_FileOutStream CP_File inOutFile,
bool  inHasHeader = true
 

Constructor.

Parameters:
inOutFile The file that we are going to write our data to. This class assumes that this file has already been opened for write access.
inHasHeader Flag to indicate if there is a header that is written at the beginning of the stream.
Exceptions:
none 

CP_FileOutStream::~CP_FileOutStream  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

UInt32 CP_FileOutStream::GetPosition  )  const [virtual]
 

Returns the current file position marker to indicate the current position we are writing to our stream.

Exceptions:
OSStatus exceptions from the file.
Returns:
SInt32 const The current position of the file marker.

Reimplemented from CP_OutStream.

void CP_FileOutStream::SetPosition UInt32  newPosition  )  [virtual]
 

Sets the current file position marker to mark the current position in our output stream.

Exceptions:
OSStatus exceptions from the file.
Returns:
SInt32 The current position of the file marker.

Reimplemented from CP_OutStream.

void CP_FileOutStream::OnWriteBytes const void *  inBuffer,
UInt32  inBytesToWrite
[protected, virtual]
 

Writes the passed in data to our file.

Parameters:
inBuffer Buffer containing the data to be written.
inBytesToWrite Number of bytes to write to our file.
Exceptions:
OSStatus exceptions from the file.
Returns:
void

Reimplemented from CP_OutStream.

UInt32 CP_FileOutStream::OnWriteData const void *  inBuffer,
UInt32  inBytesToWrite
[protected, virtual]
 

Writes the passed in data to our file, returning the actual number of bytes written to the file.

Parameters:
inBuffer Buffer containing the data to be written.
inBytesToWrite Number of bytes to write to our file.
Exceptions:
OSStatus exceptions from the file.
Returns:
UInt32 The number of bytes written to the file stream.

void CP_OutStream::WriteBytes const void *  inBuffer,
UInt32  inNumberBytes
[virtual, inherited]
 

Writes a number of butes from the passed in buffer to the stream.

Parameters:
inBuffer Buffer to hold the data to be written.
inNumberBytes Holds the number of bytes to be written out to the stream.
Exceptions:
none 
Returns:
void

bool CP_OutStream::NeedsByteSwap  )  const [inherited]
 

void CP_OutStream::SetNeedsByteSwap bool  doSwap  )  [inherited]
 

UInt16 CP_OutStream::GetStreamVersion  )  const [inherited]
 

Returns the stream version used to write this data.

Exceptions:
none 
Returns:
UInt16 The version of this stream data.

bool CP_OutStream::HasHeader  )  const [inherited]
 

bool CP_OutStream::HasTaggedData  )  const [inherited]
 

Returns a flag to indicate if the data in the stream is tagged with the type of data written before the actual data. Used in debugging streams.

Exceptions:
none 
Returns:
bool const Returns true if the data is tagged.

void CP_OutStream::WriteTag SInt32  inTag  )  [inherited]
 

Writes the passed in tag out to the stream. This is used when the user has indicated they want to write tags before each element in the streamed data.

Parameters:
inTag The tag to be written out.
Exceptions:
none 
Returns:
void

void CP_OutStream::WriteHeader  )  [protected, virtual, inherited]
 

Writes the header out to the stream.

Exceptions:
none 
Returns:
void


Member Data Documentation

CP_File& CP_FileOutStream::fFile [protected]
 

bool CP_OutStream::fHeaderWasWritten [protected, inherited]
 

bool CP_OutStream::fNeedsByteSwap [protected, inherited]
 

Flag to indicate if the header has been written to the stream.

UInt32 CP_OutStream::fCurrentPosition [protected, inherited]
 

Flag to indicate if we need to byte swap the data.

UInt16 CP_OutStream::fCPLATStreamVersion [protected, inherited]
 

The current position in the stream to write the next data to.

bool CP_OutStream::fHasTaggedData [protected, inherited]
 

Version of the stream data.

bool CP_OutStream::fHasHeader [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:40 2005 for CPLAT by  doxygen 1.4.0