TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
OutputCommBuffer Class Reference

Tool class used exclusively by Schema_Comm. More...

#include <OutputCommBuffer.h>

Inheritance diagram for OutputCommBuffer:
[legend]
Collaboration diagram for OutputCommBuffer:
[legend]

Public Member Functions

 OutputCommBuffer ()
 ~OutputCommBuffer () override
void clear ()
const char * get_buffer ()
int get_buffer_size ()
ostringstream & get_stream ()
Public Member Functions inherited from Sortie
 Sortie ()
 Sortie (ostream &os)
 Sortie (const Sortie &os)
virtual ~Sortie ()
Sortieoperator= (ostream &os)
Sortieoperator= (Sortie &os)
void set_bin (bool bin) override
 Changes the write mode of the file.
ostream & get_ostream ()
const ostream & get_ostream () const
void set_col_width (int w)
Sortieoperator<< (ostream &(*f)(ostream &))
Sortieoperator<< (Sortie &(*f)(Sortie &))
Sortieoperator<< (ios &(*f)(ios &))
virtual Sortieflush ()
virtual Sortielockfile ()
virtual Sortieunlockfile ()
virtual Sortiesyncfile ()
virtual void setf (IOS_FORMAT)
virtual void precision (int)
template<typename T>
Sortieoperator<< (const TRUST_Ref< T > &)
Sortieoperator<< (const TRUST_Ref_Objet_U &)
virtual Sortieoperator<< (const Separateur &)
virtual Sortieoperator<< (const Objet_U &ob)
 Writes an object or variable.
virtual Sortieoperator<< (const int ob)
virtual Sortieoperator<< (const unsigned ob)
virtual Sortieoperator<< (const long ob)
virtual Sortieoperator<< (const long long ob)
virtual Sortieoperator<< (const unsigned long ob)
virtual Sortieoperator<< (const float ob)
virtual Sortieoperator<< (const double ob)
virtual Sortieoperator<< (const char *ob)
 Writes a character string.
virtual Sortieoperator<< (const std::string &str)
virtual int add_col (const double ob)
virtual int add_col (const char *ob)
virtual int put (const unsigned *ob, std::streamsize n, std::streamsize nb_colonnes=1)
virtual int put (const int *ob, std::streamsize n, std::streamsize nb_colonnes=1)
virtual int put (const float *ob, std::streamsize n, std::streamsize nb_colonnes=1)
virtual int put (const double *ob, std::streamsize n, std::streamsize nb_colonnes=1)
virtual int put (const long *ob, std::streamsize n, std::streamsize nb_colonnes=1)
virtual int put (const long long *ob, std::streamsize n, std::streamsize nb_colonnes=1)
bool has_ostream () const
Public Member Functions inherited from AbstractIO
bool is_64b () const
virtual void set_64b (bool is_64b)
bool is_bin ()
void set_avoid_conversion (bool avoid)
bool avoid_conversion ()

Additional Inherited Members

Protected Member Functions inherited from AbstractIO
 AbstractIO ()
virtual ~AbstractIO ()
template<typename _TYPE_>
bool must_convert () const
 Whether to convert an int into a long when reading/writing out data.
Protected Attributes inherited from Sortie
int col_width_
std::unique_ptr< ostream > ostream_
Protected Attributes inherited from AbstractIO
bool bin_ = false
 Is this a binary flux?
bool is_64b_
 Will we be reading/writing in 64b? (Init in ctor to avoid including arch.h probably).
bool avoid_conversion_ = false

Detailed Description

Tool class used exclusively by Schema_Comm.

This is a class derived from Entree whose stream is of type ostrstream (data is written via operator<< into an in-memory buffer). Usage: (1) write data with operator<< into the buffer: output_comm_buffer << x << y << string << ... ; (2) retrieve all written data as a contiguous memory block of size "get_buffer_size()" located at address "get_buffer()". (3) reset the buffer with "clear()" and repeat from (1).

Definition at line 35 of file OutputCommBuffer.h.

Constructor & Destructor Documentation

◆ OutputCommBuffer()

OutputCommBuffer::OutputCommBuffer ( )

Definition at line 18 of file OutputCommBuffer.cpp.

◆ ~OutputCommBuffer()

OutputCommBuffer::~OutputCommBuffer ( )
override

Definition at line 34 of file OutputCommBuffer.cpp.

Member Function Documentation

◆ clear()

void OutputCommBuffer::clear ( )

Definition at line 51 of file OutputCommBuffer.cpp.

◆ get_buffer()

const char * OutputCommBuffer::get_buffer ( )

Definition at line 39 of file OutputCommBuffer.cpp.

◆ get_buffer_size()

int OutputCommBuffer::get_buffer_size ( )

Definition at line 46 of file OutputCommBuffer.cpp.

◆ get_stream()

ostringstream & OutputCommBuffer::get_stream ( )
inline

Definition at line 43 of file OutputCommBuffer.h.


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