Public Member Functions
rtc::ASCIIInputHandler Class Reference

#include <rtcASCIIInputHandler.h>

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

List of all members.

Public Member Functions

 ASCIIInputHandler ()
 default constructor
 ASCIIInputHandler (std::istream &is)
 construct from istream
 ASCIIInputHandler (const char *filename)
 construct from filename
virtual bool binary () const
 returns if the data format is binary or ascii
virtual bool readName (const std::string &name)
 read the name of a name-data pair
virtual bool readSeparator ()
 read the separator of a name-data pair
virtual ~ASCIIInputHandler ()
 destructor
virtual bool read (std::string &data)
virtual bool read (double &data)
virtual bool read (float &data)
virtual bool read (int &data)
virtual bool read (unsigned int &data)
virtual bool read (char &data)
virtual bool read (unsigned char &data)
virtual bool read (bool &data)
virtual bool read (long &data)
virtual bool read (unsigned long &data)
virtual bool read (short &data)
virtual bool read (unsigned short &data)
virtual bool read (char *data, long n)

Detailed Description

ASCII input handler.

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

Example:

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

 // Read example

 // Open a stream in binary mode
 std::ifstream in("testfile.txt");

 bsh.use(in);
 int i;
 rtc::read(bsh,i);

 std::string str;
 rtc::read(bsh,str);

 in.close();

Definition at line 54 of file rtcASCIIInputHandler.h.


Constructor & Destructor Documentation

default constructor

Definition at line 29 of file rtcASCIIInputHandler.cpp.

construct from istream

Definition at line 35 of file rtcASCIIInputHandler.cpp.

rtc::ASCIIInputHandler::ASCIIInputHandler ( const char *  filename)

construct from filename

destructor

Definition at line 41 of file rtcASCIIInputHandler.cpp.


Member Function Documentation

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

returns if the data format is binary or ascii

Implements rtc::InputHandler.

Definition at line 46 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( std::string &  data) [virtual]

read members for symbol-data pairs

Implements rtc::InputHandler.

Definition at line 70 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( double &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 76 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( float &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 82 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( int &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 88 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( unsigned int &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 94 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( char &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 100 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( unsigned char &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 106 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( bool &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 112 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( long &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 124 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( unsigned long &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 130 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( short &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 136 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( unsigned short &  data) [virtual]

Implements rtc::InputHandler.

Definition at line 142 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::read ( char *  data,
long  n 
) [virtual]

Implements rtc::InputHandler.

Definition at line 148 of file rtcASCIIInputHandler.cpp.

bool rtc::ASCIIInputHandler::readName ( const std::string &  name) [virtual]

read the name of a name-data pair

Implements rtc::InputHandler.

Definition at line 52 of file rtcASCIIInputHandler.cpp.

read the separator of a name-data pair

read the seperator of a name-data pair

Implements rtc::InputHandler.

Definition at line 65 of file rtcASCIIInputHandler.cpp.


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


rtc
Author(s): Benjamin Pitzer
autogenerated on Mon Oct 6 2014 10:07:35