Inheritance diagram for code::AIStream:
Public Member Functions | |
AIStream (std::istream &inp_stream, const std::string &separator) | |
Pass in the input stream to read from and the separator that separates items. | |
virtual AIStream & | operator>> (float &val) throw ( std::string ) |
Extract a float from the input stream. | |
virtual AIStream & | operator>> (double &val) throw ( std::string ) |
Extract a double from the input stream. | |
virtual AIStream & | operator>> (bool &val) throw ( std::string ) |
Extract a bool from the input stream. | |
virtual AIStream & | operator>> (char &val) throw ( std::string ) |
Extract a char from the input stream. | |
virtual AIStream & | operator>> (unsigned char &val) throw ( std::string ) |
Extract an unsigned char from the input stream. | |
virtual AIStream & | operator>> (int16_t &val) throw ( std::string ) |
Extract an int16_t from the input stream. | |
virtual AIStream & | operator>> (uint16_t &val) throw ( std::string ) |
Extract a uint16_t from the input stream. | |
virtual AIStream & | operator>> (int32_t &val) throw ( std::string ) |
Extract a int32_t from the input stream. | |
virtual AIStream & | operator>> (uint32_t &val) throw ( std::string ) |
Extract a uint32_t from the input stream. | |
virtual AIStream & | operator>> (int64_t &val) throw ( std::string ) |
Extract an int64_t from the input stream. | |
virtual AIStream & | operator>> (uint64_t &val) throw ( std::string ) |
Extract a uint64_t from the input stream. | |
virtual AIStream & | operator>> (std::string &) throw ( std::string ) |
Extract a std::string from the input stream. | |
virtual | ~AIStream () |
Virtual destructor for subclassing. | |
Protected Member Functions | |
virtual void | skip_sep () |
Function called by all the >> functions, to skip the separator. | |
Protected Attributes | |
std::istream & | is |
Stores reference to input stream. |
code::AIStream::AIStream | ( | std::istream & | inp_stream, | |
const std::string & | separator | |||
) |
Pass in the input stream to read from and the separator that separates items.
This separator may be "\n" or other white-space or it may be symbols such as pipes ("|")
virtual code::AIStream::~AIStream | ( | ) | [inline, virtual] |
Virtual destructor for subclassing.
virtual AIStream& code::AIStream::operator>> | ( | std::string & | ) | throw ( std::string ) [virtual] |
Extract a std::string from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | uint64_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a uint64_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | int64_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract an int64_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | uint32_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a uint32_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | int32_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a int32_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | uint16_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a uint16_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | int16_t & | val | ) | throw ( std::string ) [inline, virtual] |
Extract an int16_t from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | unsigned char & | val | ) | throw ( std::string ) [inline, virtual] |
Extract an unsigned char from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | char & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a char from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | bool & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a bool from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | double & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a double from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual AIStream& code::AIStream::operator>> | ( | float & | val | ) | throw ( std::string ) [inline, virtual] |
Extract a float from the input stream.
If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.
std::string |
Implements code::InputStream.
virtual void code::AIStream::skip_sep | ( | ) | [protected, virtual] |
Function called by all the >> functions, to skip the separator.
std::istream& code::AIStream::is [protected] |
Stores reference to input stream.