#include <rtcASCIIInputHandler.h>
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) |
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.
default constructor
Definition at line 29 of file rtcASCIIInputHandler.cpp.
rtc::ASCIIInputHandler::ASCIIInputHandler | ( | std::istream & | is | ) |
construct from istream
Definition at line 35 of file rtcASCIIInputHandler.cpp.
rtc::ASCIIInputHandler::ASCIIInputHandler | ( | const char * | filename | ) |
construct from filename
rtc::ASCIIInputHandler::~ASCIIInputHandler | ( | ) | [virtual] |
destructor
Definition at line 41 of file rtcASCIIInputHandler.cpp.
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.
bool rtc::ASCIIInputHandler::readSeparator | ( | ) | [virtual] |
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.