Archon::Utilities::Stream::WriterBase< C > Struct Template Reference

Virtual base class for all writers. More...

#include <archon/util/stream.H>

Inheritance diagram for Archon::Utilities::Stream::WriterBase< C >:

Inheritance graph
[legend]
Collaboration diagram for Archon::Utilities::Stream::WriterBase< C >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef C CharType

Public Member Functions

virtual int write (const C *buffer, int size)=0 throw (WriteException, UnexpectedException)
 Write at most 'size' characters from 'buffer'.
void writeAll (const C *buffer, int size) throw (WriteException, UnexpectedException)
 Write all 'size' characters from 'buffer'.
void writeAll (string s)
unsigned long getWriteCount () const

Protected Member Functions

unsigned long getWriteCountNoLock () const
 Does not lock the mutex.

Detailed Description

template<class C>
struct Archon::Utilities::Stream::WriterBase< C >

Virtual base class for all writers.

Note:
The character type used as template argument 'C' must have default copy semantics like for std::string.

Definition at line 124 of file stream.H.


Member Function Documentation

template<class C>
virtual int Archon::Utilities::Stream::WriterBase< C >::write const C *  buffer,
int  size
throw (WriteException, UnexpectedException) [pure virtual]
 

Write at most 'size' characters from 'buffer'.

Returns:
The number of characters written. This will always be at least one unless size is zero.

Implemented in Archon::Utilities::Stream::BasicPipe< C >, Archon::Utilities::Stream::FileWriter, and Archon::Utilities::Stream::BasicPipe< char >.

Referenced by Archon::Utilities::Stream::WriterBase< char >::writeAll().


The documentation for this struct was generated from the following file:
Generated on Sun Jul 30 22:58:17 2006 for Archon by  doxygen 1.4.4