|
|
A general data sink
inline
Sink ( void )
throw () | Sink |
[protected]
Default constructor.
inline
Sink ( const Sink & sink )
throw () | Sink |
[protected]
Copy constructor.
Parameters:
sink | the Sink to copy. |
inline Sink &
operator= ( const Sink & sink )
throw ( Exception ) | operator= |
[protected virtual]
Assignment operator.
Parameters:
sink | the Sink to assign this to. |
Returns: a reference to this Sink.
Throws: Exception
inline
~Sink ( void )
throw ( Exception ) | ~Sink |
[virtual]
Destructor.
Throws: Exception
bool
open ( void )
throw ( Exception ) | open |
[pure virtual]
Open the sink.
Returns: true if opening was successfull, false otherwise.
Throws: Exception
bool
isOpen ( void )
throw () | isOpen |
[const pure virtual]
Check if the Sink is open.
Returns: true if the Sink is open, false otherwise.
bool
canWrite ( unsigned int sec,
unsigned int usec )
throw ( Exception ) | canWrite |
[pure virtual]
Check if the Sink is ready to accept data. Blocks until the specified time for data to be available.
Parameters:
sec | the maximum seconds to block. |
usec | micro seconds to block after the full seconds. |
Returns: true if the Sink is ready to accept data, false otherwise.
Throws: Exception
unsigned int
write ( const void * buf,
unsigned int len )
throw ( Exception ) | write |
[pure virtual]
Write data to the Sink.
Parameters:
buf | the data to write. |
len | number of bytes to write from buf. |
Returns: the number of bytes written (may be less than len).
Throws: Exception
void
flush ( void )
throw ( Exception ) | flush |
[pure virtual]
Flush all data that was written to the Sink to the underlying construct.
Throws: Exception
void
close ( void )
throw ( Exception ) | close |
[pure virtual]
Close the Sink.
Throws: Exception