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

CP_SocketOutStream Class Reference

Class to write stream data to socket connection.

Inheritance diagram for CP_SocketOutStream:

CP_OutStream List of all members.

Public Member Functions

Writing
virtual void WriteBytes (const void *inBuffer, UInt32 inNumberBytes)
ByteSwapping
bool NeedsByteSwap () const
void SetNeedsByteSwap (bool doSwap)
Getters
UInt16 GetStreamVersion () const
bool HasHeader () const
Tags
bool HasTaggedData () const
void WriteTag (SInt32 inTag)
Writing
virtual void WriteBytes (const void *inBuffer, UInt32 inNumberBytes)
ByteSwapping
bool NeedsByteSwap () const
void SetNeedsByteSwap (bool doSwap)
Getters
UInt16 GetStreamVersion () const
bool HasHeader () const
Tags
bool HasTaggedData () const
void WriteTag (SInt32 inTag)
Writing
virtual void WriteBytes (const void *inBuffer, UInt32 inNumberBytes)
ByteSwapping
bool NeedsByteSwap () const
void SetNeedsByteSwap (bool doSwap)
Getters
UInt16 GetStreamVersion () const
bool HasHeader () const
Positioning
virtual UInt32 GetPosition () const
virtual void SetPosition (UInt32)
Tags
bool HasTaggedData () const
void WriteTag (SInt32 inTag)
Writing
virtual void WriteBytes (const void *inBuffer, UInt32 inNumberBytes)
ByteSwapping
bool NeedsByteSwap () const
void SetNeedsByteSwap (bool doSwap)
Getters
UInt16 GetStreamVersion () const
bool HasHeader () const
Tags
bool HasTaggedData () const
void WriteTag (SInt32 inTag)
Constructor / Destructor
 CP_SocketOutStream (class CP_Socket &inSocket, bool inHasHeader, bool inHasDebugTags=false)
 Constructor.
virtual ~CP_SocketOutStream () throw ()
 Destructor.
Misc
virtual void Flush ()
virtual void Close ()
Writing
virtual void WriteBytes (const void *inBuffer, UInt32 inNumberBytes)
ByteSwapping
bool NeedsByteSwap () const
void SetNeedsByteSwap (bool doSwap)
Getters
UInt16 GetStreamVersion () const
bool HasHeader () const
Positioning
virtual UInt32 GetPosition () const
virtual void SetPosition (UInt32)
Tags
bool HasTaggedData () const
void WriteTag (SInt32 inTag)

Protected Member Functions

Writing
virtual void WriteHeader ()
Writing
virtual void WriteHeader ()
Writing
virtual void WriteHeader ()
Writing
virtual void OnWriteBytes (const void *inBuffer, UInt32 inBytesToWrite)
Writing
virtual void WriteHeader ()

Protected Attributes

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

Private Member Functions

Constructor / Destructor
 CP_SocketOutStream ()
 Constructor.
 CP_SocketOutStream (const CP_SocketOutStream &obj)
operators
CP_SocketOutStreamoperator= (const CP_SocketOutStream &obj)

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_SocketOutStream::CP_SocketOutStream class CP_Socket inSocket,
bool  inHasHeader,
bool  inHasDebugTags = false
 

Constructor.

Parameters:
inSocket CP_Socket to communicate over.
inHasHeader Flag to indicate if the stream has a header.
inHasDebugTags Flag to indicate if tags are written before each item.
Exceptions:
none 

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

Destructor.

Exceptions:
none 

CP_SocketOutStream::CP_SocketOutStream  )  [private]
 

CP_SocketOutStream::CP_SocketOutStream const CP_SocketOutStream obj  )  [private]
 


Member Function Documentation

void CP_SocketOutStream::Flush  )  [virtual]
 

Flush our socket's output stream.

Exceptions:
none 
Returns:
void

void CP_SocketOutStream::Close  )  [virtual]
 

Close our socket's output stream.

Exceptions:
none 
Returns:
void

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

Write inBytesToWrite of data from the buffer pointed to by inBuffer to our stream. This function returns the actual number of bytes written to the stream.

Parameters:
inBuffer Points to the buffer we will write the data from.
inBytesToWrite The number of bytes we want to write.
Exceptions:
none 
Returns:
void

Reimplemented from CP_OutStream.

CP_SocketOutStream& CP_SocketOutStream::operator= const CP_SocketOutStream obj  )  [private]
 

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]
 

virtual UInt32 CP_OutStream::GetPosition  )  const [virtual, inherited]
 

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, inherited]
 

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.

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

class CP_Socket& CP_SocketOutStream::fSocket [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:02:14 2005 for CPLAT by  doxygen 1.4.0