dune-fem
2.4.1-rc
|
abstract interface for an input stream More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/io/streams/streams.hh>
Public Types | |
typedef TraitsImp | Traits |
type of the traits More... | |
typedef Traits::InStreamType | InStreamType |
type of the implementation (Barton-Nackman) More... | |
typedef ThisType | InStreamInterfaceType |
type of the interface More... | |
Public Member Functions | |
void | readDouble (double &value) |
read a double from the stream More... | |
double | readDouble () |
read a double from the stream More... | |
void | readFloat (float &value) |
read a float from the stream More... | |
float | readFloat () |
read a double from the stream More... | |
void | readInt (int &value) |
read an int from the stream More... | |
int | readInt () |
read an int from the stream More... | |
void | readChar (char &value) |
read a char from the stream More... | |
int | readChar () |
read a char from the stream More... | |
void | readBool (bool &value) |
read a bool from the stream More... | |
bool | readBool () |
read a bool from the stream More... | |
void | readString (std::string &s) |
read a string from the stream More... | |
void | readUnsignedInt (unsigned int &value) |
read an unsigned int from the stream More... | |
unsigned int | readUnsignedInt () |
read an unsigned int from the stream More... | |
void | readUnsignedInt64 (uint64_t &value) |
read an uint64_t from the stream More... | |
uint64_t | readUnsignedInt64 () |
read an uint64_t from the stream More... | |
Protected Member Functions | |
void | readError () const |
const TraitsImp::InStreamType & | asImp () const |
TraitsImp::InStreamType & | asImp () |
Static Protected Member Functions | |
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 More... | |
template<class StreamTraits , class VectorTraits > | |
InStreamInterface< StreamTraits > & | operator>> (InStreamInterface< StreamTraits > &in, VectorInterface< VectorTraits > &v) |
read a vector from an input stream More... | |
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
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inline |
read a bool from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>().
|
inline |
read a bool from the stream
|
inline |
read a char from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>().
|
inline |
read a char from the stream
|
inline |
read a double from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readDouble().
|
inline |
read a double from the stream
|
inlineprotected |
|
inline |
read a float from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readFloat().
|
inline |
read a double from the stream
|
inline |
read an int from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readInt().
|
inline |
read an int from the stream
|
inline |
read a string from the stream
[out] | s | reference to the string to read from the stream |
Referenced by Dune::Fem::operator>>(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readString().
|
inline |
read an unsigned int from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>(), Dune::Fem::DiscreteFunctionDefault< Impl >::read(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readUnsignedInt().
|
inline |
read an unsigned int from the stream
|
inline |
read an uint64_t from the stream
[out] | value | reference to the variable to read from the stream |
Referenced by Dune::Fem::operator>>(), Dune::Fem::SelectUnsignedLongInteger< ulongint, uint64 >::read(), and Dune::Fem::VirtualInStreamWrapper< Traits >::readUnsignedInt64().
|
inline |
read an uint64_t from the stream
|
related |
read a vector from an input stream
[in] | in | stream to read from |
[out] | v | vector to read |
|
related |
read a discrete function from an input stream
[in] | in | stream to read from |
[out] | df | discrete function to read |