Public Member Functions | Protected Attributes
rtc::InputHandler Class Reference

#include <rtcInputHandler.h>

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

List of all members.

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.
 InputHandler ()
 default constructor
 InputHandler (std::istream &is)
 construct from istream
virtual bool readName (const std::string &name)=0
 read the name of a name-data pair
virtual bool readSeparator ()=0
 read the separator of a name-data pair
std::istream & stream ()
 returns a reference to the stream
virtual void use (std::istream &is)
 indicate the input stream to be used
virtual ~InputHandler ()
 destructor
virtual bool read (std::string &data)=0
virtual bool read (double &data)=0
virtual bool read (float &data)=0
virtual bool read (int &data)=0
virtual bool read (unsigned int &data)=0
virtual bool read (char &data)=0
virtual bool read (unsigned char &data)=0
virtual bool read (bool &data)=0
virtual bool read (long &data)=0
virtual bool read (unsigned long &data)=0
virtual bool read (short &data)=0
virtual bool read (unsigned short &data)=0
virtual bool read (char *data, long n)=0

Protected Attributes

std::istream * inStream
 pointer to the input stream

Detailed Description

Base input handler class.

The input handler classes offer an abstract interface for the IOObject classes to read() them in different formats.

All InputHandlers are used as wrappers for std::istreams objects. Therefore, the abstract interface provides the virtual methods use() to indicate which stream has to be used.

Definition at line 39 of file rtcInputHandler.h.


Constructor & Destructor Documentation

default constructor

Definition at line 29 of file rtcInputHandler.cpp.

rtc::InputHandler::InputHandler ( std::istream &  is)

construct from istream

Definition at line 35 of file rtcInputHandler.cpp.

destructor

Definition at line 41 of file rtcInputHandler.cpp.


Member Function Documentation

virtual bool rtc::InputHandler::binary ( ) const [pure virtual]

returns if the data format is binary or ascii

Implemented in rtc::BinaryInputHandler, and rtc::ASCIIInputHandler.

bool rtc::InputHandler::good ( ) const

Check if the state of the stream is good for i/o operations.

Definition at line 58 of file rtcInputHandler.cpp.

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

read members for symbol-data pairs

Implemented in rtc::BinaryInputHandler, and rtc::ASCIIInputHandler.

virtual bool rtc::InputHandler::read ( double &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( float &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( int &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( unsigned int &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( char &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( unsigned char &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( bool &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( long &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( unsigned long &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( short &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( unsigned short &  data) [pure virtual]
virtual bool rtc::InputHandler::read ( char *  data,
long  n 
) [pure virtual]
virtual bool rtc::InputHandler::readName ( const std::string &  name) [pure virtual]

read the name of a name-data pair

Implemented in rtc::BinaryInputHandler, and rtc::ASCIIInputHandler.

virtual bool rtc::InputHandler::readSeparator ( ) [pure virtual]

read the separator of a name-data pair

Implemented in rtc::BinaryInputHandler, and rtc::ASCIIInputHandler.

std::istream & rtc::InputHandler::stream ( )

returns a reference to the stream

Definition at line 52 of file rtcInputHandler.cpp.

void rtc::InputHandler::use ( std::istream &  is) [virtual]

indicate the input stream to be used

Definition at line 46 of file rtcInputHandler.cpp.


Member Data Documentation

std::istream* rtc::InputHandler::inStream [protected]

pointer to the input stream

Definition at line 79 of file rtcInputHandler.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