#include <rtcOutputHandler.h>
Public Member Functions | |
virtual bool | binary () const =0 |
returns if the data format is binary or ascii | |
bool | good () const |
Check if the state of the stream is good for i/o operations. | |
OutputHandler () | |
default constructor | |
OutputHandler (std::ostream &os) | |
construct from ostream | |
std::ostream & | stream () |
Returns a reference to the stream. | |
virtual void | use (std::ostream &os) |
indicate the output stream to be used | |
virtual bool | writeEOL ()=0 |
write the EOL symbol | |
virtual bool | writeName (const std::string &name)=0 |
write the name of a name-data pair | |
virtual bool | writeSeparator ()=0 |
write the separator of a name-data pair | |
virtual | ~OutputHandler () |
destructor | |
virtual bool | write (const std::string &data)=0 |
virtual bool | write (const double &data)=0 |
virtual bool | write (const float &data)=0 |
virtual bool | write (const int &data)=0 |
virtual bool | write (const unsigned int &data)=0 |
virtual bool | write (const char &data)=0 |
virtual bool | write (const unsigned char &data)=0 |
virtual bool | write (const bool &data)=0 |
virtual bool | write (const long &data)=0 |
virtual bool | write (const unsigned long &data)=0 |
virtual bool | write (const short &data)=0 |
virtual bool | write (const unsigned short &data)=0 |
virtual bool | write (const char *data, long n)=0 |
Protected Attributes | |
std::ostream * | outStream |
pointer to the input stream |
Base output handler class.
The output handler classes offer an abstract interface for the IOObject classes to write() them in different formats.
All OutputHandlers are used as wrappers for std::ostream objects. Therefore, the abstract interface provides the virtual methods use() to indicate which stream has to be used.
Definition at line 40 of file rtcOutputHandler.h.
default constructor
Definition at line 29 of file rtcOutputHandler.cpp.
rtc::OutputHandler::OutputHandler | ( | std::ostream & | os | ) |
construct from ostream
Definition at line 35 of file rtcOutputHandler.cpp.
rtc::OutputHandler::~OutputHandler | ( | ) | [virtual] |
destructor
Definition at line 41 of file rtcOutputHandler.cpp.
virtual bool rtc::OutputHandler::binary | ( | ) | const [pure virtual] |
returns if the data format is binary or ascii
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
bool rtc::OutputHandler::good | ( | ) | const |
Check if the state of the stream is good for i/o operations.
Definition at line 58 of file rtcOutputHandler.cpp.
std::ostream & rtc::OutputHandler::stream | ( | ) |
Returns a reference to the stream.
returns a reference to the stream
Definition at line 52 of file rtcOutputHandler.cpp.
void rtc::OutputHandler::use | ( | std::ostream & | os | ) | [virtual] |
indicate the output stream to be used
Definition at line 46 of file rtcOutputHandler.cpp.
virtual bool rtc::OutputHandler::write | ( | const std::string & | data | ) | [pure virtual] |
write members for data
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const double & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const float & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const int & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const unsigned int & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const char & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const unsigned char & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const bool & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const long & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const unsigned long & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const short & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const unsigned short & | data | ) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::write | ( | const char * | data, |
long | n | ||
) | [pure virtual] |
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::writeEOL | ( | ) | [pure virtual] |
write the EOL symbol
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::writeName | ( | const std::string & | name | ) | [pure virtual] |
write the name of a name-data pair
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
virtual bool rtc::OutputHandler::writeSeparator | ( | ) | [pure virtual] |
write the separator of a name-data pair
Implemented in rtc::BinaryOutputHandler, and rtc::ASCIIOutputHandler.
std::ostream* rtc::OutputHandler::outStream [protected] |
pointer to the input stream
Definition at line 82 of file rtcOutputHandler.h.