Public Member Functions | Static Protected Attributes
rtc::ASCIIOutputHandler Class Reference

#include <rtcASCIIOutputHandler.h>

Inheritance diagram for rtc::ASCIIOutputHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ASCIIOutputHandler ()
 default constructor
 ASCIIOutputHandler (std::ostream &os)
 construct from ostream
virtual bool binary () const
 returns if the data format is binary or ascii
virtual bool writeEOL ()
 write the EOL symbol
virtual bool writeName (const std::string &name)
 write the name of a name-data pair
virtual bool writeSeparator ()
 write the separator of a name-data pair
virtual ~ASCIIOutputHandler ()
 destructor
virtual bool write (const std::string &data)
virtual bool write (const double &data)
virtual bool write (const float &data)
virtual bool write (const int &data)
virtual bool write (const unsigned int &data)
virtual bool write (const char &data)
virtual bool write (const unsigned char &data)
virtual bool write (const bool &data)
virtual bool write (const long &data)
virtual bool write (const unsigned long &data)
virtual bool write (const short &data)
virtual bool write (const unsigned short &data)
virtual bool write (const char *data, long n)

Static Protected Attributes

static const char SEPARATOR = ' '

Detailed Description

Ascii output handler.

The ASCIIOutputHandler class offers an interface for the functor parameters and other classes to write() them in a ascii format.

Example:

 // the ascii stream formatting object
 rtc::ASCIIOutputHandler bsh;

 // Write example:

 // open a stream in ascii mode
 std::ofstream out("testfile.txt");

 // tell the ascii stream handler to use the given stream
 bsh.use(out);

 rtc::write(bsh,5);
 rtc::write(bsh,"hello world");

 out.close();

Definition at line 54 of file rtcASCIIOutputHandler.h.


Constructor & Destructor Documentation

default constructor

Definition at line 29 of file rtcASCIIOutputHandler.cpp.

construct from ostream

Definition at line 35 of file rtcASCIIOutputHandler.cpp.

destructor

Definition at line 41 of file rtcASCIIOutputHandler.cpp.


Member Function Documentation

bool rtc::ASCIIOutputHandler::binary ( ) const [virtual]

returns if the data format is binary or ascii

Implements rtc::OutputHandler.

Definition at line 46 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const std::string &  data) [virtual]

write members for symbol-data pairs

Implements rtc::OutputHandler.

Definition at line 74 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const double &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 80 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const float &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 86 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const int &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 92 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const unsigned int &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 98 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const char &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 104 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const unsigned char &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 110 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const bool &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 116 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const long &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 125 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const unsigned long &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 131 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const short &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 137 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const unsigned short &  data) [virtual]

Implements rtc::OutputHandler.

Definition at line 143 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::write ( const char *  data,
long  n 
) [virtual]

Implements rtc::OutputHandler.

Definition at line 149 of file rtcASCIIOutputHandler.cpp.

write the EOL symbol

Implements rtc::OutputHandler.

Definition at line 67 of file rtcASCIIOutputHandler.cpp.

bool rtc::ASCIIOutputHandler::writeName ( const std::string &  name) [virtual]

write the name of a name-data pair

Implements rtc::OutputHandler.

Definition at line 52 of file rtcASCIIOutputHandler.cpp.

write the separator of a name-data pair

Implements rtc::OutputHandler.

Definition at line 59 of file rtcASCIIOutputHandler.cpp.


Member Data Documentation

const char rtc::ASCIIOutputHandler::SEPARATOR = ' ' [static, protected]

Definition at line 90 of file rtcASCIIOutputHandler.h.


The documentation for this class was generated from the following files:


rtc
Author(s): Benjamin Pitzer
autogenerated on Thu Jan 2 2014 11:04:54