dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Related Functions | List of all members
Dune::Fem::BinaryFileOutStream Class Reference

#include <dune/fem/io/streams/binarystreams.hh>

Inheritance diagram for Dune::Fem::BinaryFileOutStream:
Inheritance graph

Public Types

typedef StandardOutStreamTraits 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

 BinaryFileOutStream (const std::string &filename)
 constructor
 
 ~BinaryFileOutStream ()
 destructor deleteing file stream
 
std::ostream & stream ()
 
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 char 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

std::ostream & openFile (const std::string &filename)
 
bool valid () const
 
template<class T >
void writePrimitive (const T &value)
 
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 Implementation & asImp (const ThisType &other)
 
static Implementation & asImp (ThisType &other)
 

Protected Attributes

std::ofstream * file_
 standard file stream
 
std::ostream & stream_
 

Related Functions

(Note that these are not member functions.)

OutStreamInterface< StreamTraits > & operator<< (OutStreamInterface< StreamTraits > &out, const DiscreteFunctionInterface< Impl > &df)
 write a discrete function into an output stream
 

Detailed Description

constructor

Parameters
[in]streamstd::ostream to write to

Member Typedef Documentation

◆ OutStreamInterfaceType

typedef ThisType Dune::Fem::OutStreamInterface< StandardOutStreamTraits >::OutStreamInterfaceType
inherited

type of the interface

◆ OutStreamType

type of the implementation (Barton-Nackman)

◆ Traits

type of the traits

Constructor & Destructor Documentation

◆ BinaryFileOutStream()

Dune::Fem::BinaryFileOutStream::BinaryFileOutStream ( const std::string &  filename)
inlineexplicit

constructor

Parameters
[in]filenamename of a file to write to

◆ ~BinaryFileOutStream()

Dune::Fem::BinaryFileOutStream::~BinaryFileOutStream ( )
inline

destructor deleteing file stream

Member Function Documentation

◆ asImp() [1/6]

Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/6]

const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited

◆ asImp() [3/6]

static const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [4/6]

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

◆ asImp() [5/6]

static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ asImp() [6/6]

template<class Interface , class Implementation >
static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ flush()

void Dune::Fem::StandardOutStream::flush ( )
inlineinherited

flush the stream

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

◆ openFile()

std::ostream & Dune::Fem::BinaryFileOutStream::openFile ( const std::string &  filename)
inlineprotected

◆ stream()

std::ostream & Dune::Fem::StandardOutStream::stream ( )
inlineinherited

return reference to internal ostream

◆ valid()

bool Dune::Fem::StandardOutStream::valid ( ) const
inlineprotectedinherited

◆ writeBool()

void Dune::Fem::StandardOutStream::writeBool ( const bool  value)
inlineinherited

write a char to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeChar()

void Dune::Fem::StandardOutStream::writeChar ( const char  value)
inlineinherited

write a char to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeDouble()

void Dune::Fem::StandardOutStream::writeDouble ( const double  value)
inlineinherited

write a double to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeError()

void Dune::Fem::OutStreamInterface< StandardOutStreamTraits >::writeError ( ) const
inlineprotectedinherited

◆ writeFloat()

void Dune::Fem::StandardOutStream::writeFloat ( const float  value)
inlineinherited

write a float to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeInt()

void Dune::Fem::StandardOutStream::writeInt ( const int  value)
inlineinherited

write an int to the stream

Parameters
[in]valuevalue to write to the stream

◆ writePrimitive()

template<class T >
void Dune::Fem::StandardOutStream::writePrimitive ( const T &  value)
inlineprotectedinherited

◆ writeString()

void Dune::Fem::StandardOutStream::writeString ( const std::string &  s)
inlineinherited

write a string to the stream

Parameters
[in]sstring to write to the stream

◆ writeUnsignedInt()

void Dune::Fem::StandardOutStream::writeUnsignedInt ( unsigned int  value)
inlineinherited

write an unsigned int to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeUnsignedInt64()

void Dune::Fem::StandardOutStream::writeUnsignedInt64 ( uint64_t  value)
inlineinherited

write an uint64_t to the stream

Parameters
[in]valuevalue to write to the stream

Friends And Related Function Documentation

◆ operator<<()

OutStreamInterface< StreamTraits > & operator<< ( OutStreamInterface< StreamTraits > &  out,
const DiscreteFunctionInterface< Impl > &  df 
)
related

write a discrete function into an output stream

Parameters
[in]outstream to write to
[in]dfdiscrete function to write
Returns
the output stream (for concatenation)

Member Data Documentation

◆ file_

std::ofstream* Dune::Fem::BinaryFileOutStream::file_
protected

standard file stream

◆ stream_

std::ostream& Dune::Fem::StandardOutStream::stream_
protectedinherited

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