dune-fem 2.8.0
|
abstract interface for an input stream More...
#include <dune/fem/io/streams/streams.hh>
Public Types | |
typedef TraitsImp | Traits |
type of the traits | |
typedef Traits::InStreamType | InStreamType |
type of the implementation (Barton-Nackman) | |
typedef ThisType | InStreamInterfaceType |
type of the interface | |
Public Member Functions | |
void | readDouble (double &value) |
read a double from the stream | |
double | readDouble () |
read a double from the stream | |
void | readFloat (float &value) |
read a float from the stream | |
float | readFloat () |
read a double from the stream | |
void | readInt (int &value) |
read an int from the stream | |
int | readInt () |
read an int from the stream | |
void | readChar (char &value) |
read a char from the stream | |
int | readChar () |
read a char from the stream | |
void | readBool (bool &value) |
read a bool from the stream | |
bool | readBool () |
read a bool from the stream | |
void | readString (std::string &s) |
read a string from the stream | |
void | readUnsignedInt (unsigned int &value) |
read an unsigned int from the stream | |
unsigned int | readUnsignedInt () |
read an unsigned int from the stream | |
void | readUnsignedInt64 (uint64_t &value) |
read an uint64_t from the stream | |
uint64_t | readUnsignedInt64 () |
read an uint64_t from the stream | |
Protected Member Functions | |
void | readError () const |
const Implementation & | asImp () const |
Implementation & | asImp () |
Static Protected Member Functions | |
static const Implementation & | asImp (const ThisType &other) |
static Implementation & | asImp (ThisType &other) |
static const TraitsImp::InStreamType & | asImp (const ThisType &other) |
static TraitsImp::InStreamType & | asImp (ThisType &other) |
Related Functions | |
(Note that these are not member functions.) | |
template<class StreamTraits , class Impl > | |
InStreamInterface< StreamTraits > & | operator>> (InStreamInterface< StreamTraits > &in, DiscreteFunctionInterface< Impl > &df) |
read a discrete function from an input stream | |
abstract interface for an input stream
An input stream provides methods to read the basic C++ types from the stream. Based on this information, more complicated types can be read from the stream by using these basic input operations.
Normally, the input methods of the stream are not used directly, but the operator >> ist used to read information from the stream. This operator should also be overloaded for all types that should be readable.
Unlike STL streams, dune-fem input streams throw a StreamError exception when a reading operation fails. Since the program is automatically aborted, if the exception is not caught, careless programming will not result in uninitialized objects. If the user catches the exception, he may not assume the object, that should be read, to be in a defined or even useful state.
typedef ThisType Dune::Fem::InStreamInterface< TraitsImp >::InStreamInterfaceType |
type of the interface
typedef Traits::InStreamType Dune::Fem::InStreamInterface< TraitsImp >::InStreamType |
type of the implementation (Barton-Nackman)
typedef TraitsImp Dune::Fem::InStreamInterface< TraitsImp >::Traits |
type of the traits
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
|
inlinestaticprotectedinherited |
|
inlinestaticprotected |
|
inlinestaticprotectedinherited |
|
inline |
read a bool from the stream
|
inline |
read a bool from the stream
[out] | value | reference to the variable to read from the stream |
|
inline |
read a char from the stream
|
inline |
read a char from the stream
[out] | value | reference to the variable to read from the stream |
|
inline |
read a double from the stream
|
inline |
read a double from the stream
[out] | value | reference to the variable to read from the stream |
|
inlineprotected |
|
inline |
read a double from the stream
|
inline |
read a float from the stream
[out] | value | reference to the variable to read from the stream |
|
inline |
read an int from the stream
|
inline |
read an int from the stream
[out] | value | reference to the variable to read from the stream |
|
inline |
read a string from the stream
[out] | s | reference to the string to read from the stream |
|
inline |
read an unsigned int from the stream
|
inline |
read an unsigned int from the stream
[out] | value | reference to the variable to read from the stream |
|
inline |
read an uint64_t from the stream
|
inline |
read an uint64_t from the stream
[out] | value | reference to the variable to read from the stream |
|
related |
read a discrete function from an input stream
[in] | in | stream to read from |
[out] | df | discrete function to read |