dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::ASCIIOutStream Class Reference

output stream writing into an STL output stream using ASCII encoding More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/io/streams/asciistreams.hh>

Inheritance diagram for Dune::Fem::ASCIIOutStream:
Inheritance graph

Public Types

typedef ASCIIOutStreamTraits Traits
 type of the traits More...
 
typedef Traits::OutStreamType OutStreamType
 type of the implementation (Barton-Nackman) More...
 
typedef ThisType OutStreamInterfaceType
 type of the interface More...
 

Public Member Functions

 ASCIIOutStream (std::ostream &stream)
 constructor More...
 
 ASCIIOutStream (const std::string &filename)
 constructor More...
 
 ~ASCIIOutStream ()
 destructor More...
 
void flush ()
 flush the stream More...
 
void writeDouble (const double value)
 write a double to the stream More...
 
void writeFloat (const float value)
 write a float to the stream More...
 
void writeInt (const int value)
 write an int to the stream More...
 
void writeChar (const char value)
 write a char to the stream More...
 
void writeBool (const bool value)
 write a char to the stream More...
 
void writeString (const std::string &s)
 write a string to the stream More...
 
void writeUnsignedInt (unsigned int value)
 write an unsigned int to the stream More...
 
void writeUnsignedInt64 (uint64_t value)
 write an uint64_t to the stream More...
 

Protected Member Functions

bool valid () const
 
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)
 

Protected Attributes

std::ostream & stream_
 
bool mustFreeStream_
 

Detailed Description

output stream writing into an STL output stream using ASCII encoding

This writes the data into an STL output stream. The data is written in ASCII format, each basic type on a single line.

Newly added:

Member Typedef Documentation

type of the interface

type of the implementation (Barton-Nackman)

type of the traits

Constructor & Destructor Documentation

Dune::Fem::ASCIIOutStream::ASCIIOutStream ( std::ostream &  stream)
inlineexplicit

constructor

Parameters
[in]streamSTL output stream to write to
Dune::Fem::ASCIIOutStream::ASCIIOutStream ( const std::string &  filename)
inlineexplicit

constructor

Parameters
[in]filenamename of a file to write to
Dune::Fem::ASCIIOutStream::~ASCIIOutStream ( )
inline

destructor

Member Function Documentation

template<class Interface, class Implementation>
static const Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited
template<class Interface, class Implementation>
static Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited
template<class Interface, class Implementation>
const Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited
template<class Interface, class Implementation>
Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited
void Dune::Fem::ASCIIOutStream::flush ( )
inline

flush the stream

By calling the flush method, the user can ensure that the stream is actually transferred (e.g., written to disk)

bool Dune::Fem::ASCIIOutStream::valid ( ) const
inlineprotected
void Dune::Fem::ASCIIOutStream::writeBool ( const bool  value)
inline

write a char to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::ASCIIOutStream::writeChar ( const char  value)
inline

write a char to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::ASCIIOutStream::writeDouble ( const double  value)
inline

write a double to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::OutStreamInterface< ASCIIOutStreamTraits >::writeError ( ) const
inlineprotectedinherited
void Dune::Fem::ASCIIOutStream::writeFloat ( const float  value)
inline

write a float to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::ASCIIOutStream::writeInt ( const int  value)
inline

write an int to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::ASCIIOutStream::writeString ( const std::string &  s)
inline

write a string to the stream

Parameters
[in]sstring to write to the stream
Note
Strings containing newline characters will not be read back correctly.
void Dune::Fem::ASCIIOutStream::writeUnsignedInt ( unsigned int  value)
inline

write an unsigned int to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::ASCIIOutStream::writeUnsignedInt64 ( uint64_t  value)
inline

write an uint64_t to the stream

Parameters
[in]valuevalue to write to the stream

Member Data Documentation

bool Dune::Fem::ASCIIOutStream::mustFreeStream_
protected
std::ostream& Dune::Fem::ASCIIOutStream::stream_
protected

The documentation for this class was generated from the following file: