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

CP_OutStream Class Reference

Inheritance diagram for CP_OutStream:

CP_FileOutStream CP_HandleBlockOutStream CP_PtrBlockOutStream CP_SocketOutStream List of all members.

Writing

virtual void OnWriteBytes (const void *, UInt32)
virtual void WriteHeader ()

Public Member Functions

Constructor / Destructor
 CP_OutStream (bool inHasHeader, bool inHasDebugTags=false)
 Constructor.
 CP_OutStream (const CP_OutStream &inStream)
virtual ~CP_OutStream () throw ()
 Destructor.
Operators
CP_OutStreamoperator= (const CP_OutStream &inStream)

Protected Attributes

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

Constructor & Destructor Documentation

CP_OutStream::CP_OutStream bool  inHasHeader,
bool  inHasDebugTags = false
 

Constructor.

Parameters:
inHasHeader Flag to indicate if there is a header that is written at the beginning of the stream.
inHasDebugTags Flag to indicate if a tag is written before the actual stream data.
Exceptions:
none 

CP_OutStream::CP_OutStream const CP_OutStream inStream  ) 
 

Copy constructor.

Parameters:
inStream A CP_OutStream object to copy the data from.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

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

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
 

void CP_OutStream::SetNeedsByteSwap bool  doSwap  ) 
 

UInt16 CP_OutStream::GetStreamVersion  )  const
 

Returns the stream version used to write this data.

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

bool CP_OutStream::HasHeader  )  const
 

virtual UInt32 CP_OutStream::GetPosition  )  const [virtual]
 

Return the current position of our marker. Subclasses must override this.

Exceptions:
none 
Returns:
UInt32 The current position of the stream marker.

Reimplemented in CP_FileOutStream, CP_HandleBlockOutStream, and CP_PtrBlockOutStream.

virtual void CP_OutStream::SetPosition UInt32   )  [virtual]
 

Sets the current position of our marker. Subclasses must override this.

Parameters:
inPosition The position to set the stream marker to.
Exceptions:
none 
Returns:
void

Reimplemented in CP_FileOutStream, CP_HandleBlockOutStream, and CP_PtrBlockOutStream.

CP_OutStream & CP_OutStream::operator= const CP_OutStream inStream  ) 
 

Assignment operator. Assigns the data from the passed in CP_OutStream object.

Parameters:
inStream CP_OutStream object to copy data from.
Exceptions:
none 
Returns:
void

bool CP_OutStream::HasTaggedData  )  const
 

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  ) 
 

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

virtual void CP_OutStream::OnWriteBytes const void *  ,
UInt32 
[protected, virtual]
 

Writes out bytes to the stream. Subclasses must override to handle writing the data to the output stream.

Parameters:
inDestBuffer The buffer to hold the data.
inNumberBytes The number of bytes to write.
Exceptions:
none 
Returns:
void

Reimplemented in CP_FileOutStream, CP_HandleBlockOutStream, CP_PtrBlockOutStream, and CP_SocketOutStream.

void CP_OutStream::WriteHeader  )  [protected, virtual]
 

Writes the header out to the stream.

Exceptions:
none 
Returns:
void


Member Data Documentation

bool CP_OutStream::fHeaderWasWritten [protected]
 

bool CP_OutStream::fNeedsByteSwap [protected]
 

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

UInt32 CP_OutStream::fCurrentPosition [protected]
 

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

UInt16 CP_OutStream::fCPLATStreamVersion [protected]
 

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

bool CP_OutStream::fHasTaggedData [protected]
 

Version of the stream data.

bool CP_OutStream::fHasHeader [protected]
 


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