#include <TCStream.h>
Public Types | |
enum | StreamErrorFlags { error_none, error_streamopen, error_streamclose, error_streamdirection, error_last } |
Enumeration which defines the TCStream error flags. More... | |
enum | StreamDirection { stream_dead, stream_read, stream_write, stream_readwrite } |
enumeration which defines different stream directions More... | |
enum | StreamPosition { POSITION_SET, POSITION_CURRENT, POSITION_END } |
Public Member Functions | |
virtual | ~Stream () |
virtual sint32 | GetStatus () const =0 |
virtual void | ResetStatus ()=0 |
Reset the error flag to error_none. | |
virtual bool | Error () const =0 |
virtual bool | IsOk () const =0 |
virtual void | EnableDisplayErrorMessages (bool displ)=0 |
Tell the stream if he should write out error messages or not. | |
virtual bool | SetPosition (uint32, StreamPosition pos)=0 |
virtual uint32 | GetPosition () const =0 |
virtual uint32 | ReadBytes (uint32 nBytes, void *bytes)=0 |
Methode for reading the bytes from the stream has to be implemented in each derived class. | |
virtual uint32 | WriteBytes (uint32 nBytes, const void *bytes)=0 |
Methode for writing the bytes to the stream has to be implemented in each derived class. | |
virtual uint32 | Read (sint16 &val)=0 |
Methode for reading one signed 16bit integer from the stream. | |
virtual uint32 | Read (uint16 &val)=0 |
Methode for reading one unsigned 16bit integer from the stream. | |
virtual uint32 | Read (sint32 &val)=0 |
Methode for reading one signed int 32bit integer the stream. | |
virtual uint32 | Read (uint32 &val)=0 |
Methode for reading one unsigned 32bit integer from the stream. | |
virtual uint32 | Read (sint64 &val)=0 |
Methode for reading one signed 64bit integer from the stream. | |
virtual uint32 | Read (uint64 &val)=0 |
Methode for reading one unsigned 64bit integer from the stream. | |
virtual uint32 | Read (float &val)=0 |
Methode for reading one float from the stream. | |
virtual uint32 | Read (double &val)=0 |
Methode for reading one double from the stream. | |
virtual uint32 | Read (char *val)=0 |
Methode for reading one string from the stream. | |
virtual uint32 | Read (std::string &val)=0 |
Methode for reading one std::string from the stream. | |
virtual uint32 | Read (char &val)=0 |
Methode for reading one char from the stream. | |
virtual uint32 | Read (uchar &val)=0 |
Methode for reading one unsigned char from the stream. | |
virtual uint32 | Write (sint16 val)=0 |
Methode for writing one signed 16bit integer to the stream. | |
virtual uint32 | Write (uint16 val)=0 |
Methode for writing one unsigned 16bit integer to the stream. | |
virtual uint32 | Write (sint32 val)=0 |
Methode for writing one signed 32bit integer to the stream. | |
virtual uint32 | Write (uint32 val)=0 |
Methode for writing one unsigned 32bit integer to the stream. | |
virtual uint32 | Write (sint64 val)=0 |
Methode for writing one signed 64bit integer to the stream. | |
virtual uint32 | Write (uint64 val)=0 |
Methode for writing one unsigned 64bit integer to the stream. | |
virtual uint32 | Write (float val)=0 |
Methode for writing one float to the stream. | |
virtual uint32 | Write (double val)=0 |
Methode for writing one double to the stream. | |
virtual uint32 | Write (const char *val)=0 |
Methode for writing one string to the stream. | |
virtual uint32 | Write (const std::string &val)=0 |
Methode for writing one std::string to the stream. | |
virtual uint32 | Write (char val)=0 |
Methode for writing one signed char to the stream. | |
virtual uint32 | Write (uchar val)=0 |
Methode for writing one unsigned char to the stream. | |
virtual uint32 | WriteEndOfLine ()=0 |
Writes the end of line characters if needed for the stream. | |
virtual uint32 | WriteSpace ()=0 |
Writes space to the stream if needed for the stream needed for separating words or numbers. | |
virtual void | Flush ()=0 |
flushes the stream if needed | |
virtual void | CloseStream ()=0 |
Closes the stream and sets the streamdirection to stream_dead. |
Definition at line 61 of file TCStream.h.
Enumeration which defines the TCStream error flags.
error_none | no error happened |
error_streamopen | Error openening the stream. |
error_streamclose | Error closing the stream. |
error_streamdirection | Using wrong stream direction. |
error_last | Last error flag. |
Definition at line 67 of file TCStream.h.
enumeration which defines different stream directions
Definition at line 84 of file TCStream.h.
virtual TC::Stream::~Stream | ( | ) | [inline, virtual] |
Definition at line 97 of file TCStream.h.
virtual sint32 TC::Stream::GetStatus | ( | ) | const [pure virtual] |
virtual void TC::Stream::ResetStatus | ( | ) | [pure virtual] |
Reset the error flag to error_none.
virtual bool TC::Stream::Error | ( | ) | const [pure virtual] |
virtual bool TC::Stream::IsOk | ( | ) | const [pure virtual] |
virtual void TC::Stream::EnableDisplayErrorMessages | ( | bool | displ | ) | [pure virtual] |
Tell the stream if he should write out error messages or not.
displ | true or false fro displaying error messages |
virtual bool TC::Stream::SetPosition | ( | uint32 | , | |
StreamPosition | pos | |||
) | [pure virtual] |
virtual uint32 TC::Stream::GetPosition | ( | ) | const [pure virtual] |
Methode for reading the bytes from the stream has to be implemented in each derived class.
nBytes | number of bytes to read | |
bytes | where to store the data which should be read |
Methode for writing the bytes to the stream has to be implemented in each derived class.
nBytes | number of bytes to written | |
bytes | where the bytes are stored which should be written |
Methode for reading one signed 16bit integer from the stream.
val | the short which should store the short |
Methode for reading one unsigned 16bit integer from the stream.
val | the short which should store the short |
Methode for reading one signed int 32bit integer the stream.
val | the int which should store the int |
Methode for reading one unsigned 32bit integer from the stream.
val | the int which should store the int |
Methode for reading one signed 64bit integer from the stream.
val | the long which should store the long |
Methode for reading one unsigned 64bit integer from the stream.
val | the long which should store the long |
virtual uint32 TC::Stream::Read | ( | float & | val | ) | [pure virtual] |
Methode for reading one float from the stream.
val | the float which should store the float |
virtual uint32 TC::Stream::Read | ( | double & | val | ) | [pure virtual] |
Methode for reading one double from the stream.
val | the double which should store the double |
virtual uint32 TC::Stream::Read | ( | char * | val | ) | [pure virtual] |
Methode for reading one string from the stream.
val | the string which should store the string |
virtual uint32 TC::Stream::Read | ( | std::string & | val | ) | [pure virtual] |
Methode for reading one std::string from the stream.
val | the string which should store the string |
virtual uint32 TC::Stream::Read | ( | char & | val | ) | [pure virtual] |
Methode for reading one char from the stream.
val | the char which should store the char |
Methode for reading one unsigned char from the stream.
val | the char which should store the char |
Methode for writing one signed 16bit integer to the stream.
val | the short which to write |
Methode for writing one unsigned 16bit integer to the stream.
val | the short which to write |
Methode for writing one signed 32bit integer to the stream.
val | the int which to write |
Methode for writing one unsigned 32bit integer to the stream.
val | the int which to write |
Methode for writing one signed 64bit integer to the stream.
val | the long which to write |
Methode for writing one unsigned 64bit integer to the stream.
val | the long which to write |
virtual uint32 TC::Stream::Write | ( | float | val | ) | [pure virtual] |
Methode for writing one float to the stream.
val | the float which to write |
virtual uint32 TC::Stream::Write | ( | double | val | ) | [pure virtual] |
Methode for writing one double to the stream.
val | the double which to write |
virtual uint32 TC::Stream::Write | ( | const char * | val | ) | [pure virtual] |
Methode for writing one string to the stream.
val | the string which to write |
virtual uint32 TC::Stream::Write | ( | const std::string & | val | ) | [pure virtual] |
Methode for writing one std::string to the stream.
val | the string which to write |
virtual uint32 TC::Stream::Write | ( | char | val | ) | [pure virtual] |
Methode for writing one signed char to the stream.
val | the char which to write |
Methode for writing one unsigned char to the stream.
val | the char which to write |
virtual uint32 TC::Stream::WriteEndOfLine | ( | ) | [pure virtual] |
Writes the end of line characters if needed for the stream.
virtual uint32 TC::Stream::WriteSpace | ( | ) | [pure virtual] |
Writes space to the stream if needed for the stream needed for separating words or numbers.
virtual void TC::Stream::Flush | ( | ) | [pure virtual] |
flushes the stream if needed
virtual void TC::Stream::CloseStream | ( | ) | [pure virtual] |
Closes the stream and sets the streamdirection to stream_dead.