dune-fem 2.8.0
|
abstract interface for an output stream More...
#include <dune/fem/io/streams/streams.hh>
Public Types | |
typedef TraitsImp | Traits |
type of the traits | |
typedef Traits::OutStreamType | OutStreamType |
type of the implementation (Barton-Nackman) | |
typedef ThisType | OutStreamInterfaceType |
type of the interface | |
Public Member Functions | |
void | flush () |
flush the stream | |
void | writeDouble (const double value) |
write a double to the stream | |
void | writeFloat (const float value) |
write a float to the stream | |
void | writeInt (const int value) |
write an int to the stream | |
void | writeChar (const char value) |
write a char to the stream | |
void | writeBool (const bool value) |
write a bool to the stream | |
void | writeString (const std::string &s) |
write a string to the stream | |
void | writeUnsignedInt (unsigned int value) |
write an unsigned int to the stream | |
void | writeUnsignedInt64 (uint64_t value) |
write an uint64_t to the stream | |
Protected Member Functions | |
void | writeError () 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::OutStreamType & | asImp (const ThisType &other) |
static TraitsImp::OutStreamType & | asImp (ThisType &other) |
Related Functions | |
(Note that these are not member functions.) | |
template<class StreamTraits , class Impl > | |
OutStreamInterface< StreamTraits > & | operator<< (OutStreamInterface< StreamTraits > &out, const DiscreteFunctionInterface< Impl > &df) |
write a discrete function into an output stream | |
abstract interface for an output stream
An output stream provides methods to write the basic C++ types into the stream. Based on this information, more complicated types can be written to the stream by using these basic output operations.
Normally, the output methods of the stream are not used directly, but the operator << ist used to write information into the stream. This operator should also be overloaded for all types that should be writeable.
Unlike STL streams, dune-fem output streams throw a StreamError exception when a writing operation fails. Since the program is automatically aborted, if the exception is not caught, careless programming will not result in corrupted data files.
typedef ThisType Dune::Fem::OutStreamInterface< TraitsImp >::OutStreamInterfaceType |
type of the interface
typedef Traits::OutStreamType Dune::Fem::OutStreamInterface< TraitsImp >::OutStreamType |
type of the implementation (Barton-Nackman)
typedef TraitsImp Dune::Fem::OutStreamInterface< TraitsImp >::Traits |
type of the traits
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
|
inlinestaticprotectedinherited |
|
inlinestaticprotected |
|
inlinestaticprotectedinherited |
|
inline |
flush the stream
By calling the flush method, the user can ensure that the stream is actually transferred (e.g., written to disk)
|
inline |
write a bool to the stream
[in] | value | value to write to the stream |
|
inline |
write a char to the stream
[in] | value | value to write to the stream |
|
inline |
write a double to the stream
[in] | value | value to write to the stream |
|
inlineprotected |
|
inline |
write a float to the stream
[in] | value | value to write to the stream |
|
inline |
write an int to the stream
[in] | value | value to write to the stream |
|
inline |
write a string to the stream
[in] | s | string to write to the stream |
|
inline |
write an unsigned int to the stream
[in] | value | value to write to the stream |
|
inline |
write an uint64_t to the stream
[in] | value | value to write to the stream |
|
related |
write a discrete function into an output stream
[in] | out | stream to write to |
[in] | df | discrete function to write |