DUNE-FEM (unstable)
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 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 | readSignedInt64 (int64_t &value) |
read an int64_t from the stream More... | |
int64_t | readSignedInt64 () |
read an int64_t 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... | |
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... | |
Detailed Description
class Dune::Fem::InStreamInterface< TraitsImp >
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.
Member Function Documentation
◆ readBool() [1/2]
|
inline |
read a bool from the stream
- Returns
- a bool read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readBool().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readBool().
◆ readBool() [2/2]
|
inline |
read a bool from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readBool().
◆ readChar() [1/2]
|
inline |
read a char from the stream
- Returns
- a char read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readChar().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readChar().
◆ readChar() [2/2]
|
inline |
read a char from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readChar().
◆ readDouble() [1/2]
|
inline |
read a double from the stream
- Returns
- a double read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readDouble().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readDouble().
◆ readDouble() [2/2]
|
inline |
read a double from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readDouble().
◆ readFloat() [1/2]
|
inline |
read a double from the stream
- Returns
- a double read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readFloat().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readFloat().
◆ readFloat() [2/2]
|
inline |
read a float from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readFloat().
◆ readInt() [1/2]
|
inline |
read an int from the stream
- Returns
- an int read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readInt().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readInt().
◆ readInt() [2/2]
|
inline |
read an int from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readInt().
◆ readSignedInt64() [1/2]
|
inline |
read an int64_t from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readSignedInt64().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readSignedInt64().
◆ readSignedInt64() [2/2]
|
inline |
read an int64_t from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readSignedInt64().
◆ readString()
|
inline |
read a string from the stream
- Parameters
-
[out] s reference to the string to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readString().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readString().
◆ readUnsignedInt() [1/2]
|
inline |
read an unsigned int from the stream
- Returns
- an unsigned int read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt().
◆ readUnsignedInt() [2/2]
|
inline |
read an unsigned int from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt().
◆ readUnsignedInt64() [1/2]
|
inline |
read an uint64_t from the stream
- Returns
- an uint64_t read from the stream
References Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt64().
Referenced by Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt64().
◆ readUnsignedInt64() [2/2]
|
inline |
read an uint64_t from the stream
- Parameters
-
[out] value reference to the variable to read from the stream
References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::InStreamInterface< TraitsImp >::readUnsignedInt64().
Friends And Related Function Documentation
◆ operator>>()
|
related |
read a discrete function from an input stream
- Parameters
-
[in] in stream to read from [out] df discrete function to read
- Returns
- the input stream (for concatenation)
References Dune::Fem::DiscreteFunctionInterface< Impl >::read().
The documentation for this class was generated from the following files:
- dune/fem/io/streams/streams.hh
- dune/fem/function/common/discretefunction_inline.hh