Static Public Member Functions | Static Public Attributes | Friends | List of all members
nmx::Output Class Reference

The Output struct Hilfsklasse zur Erzeugung von Ausgabeströmen zum Schreiben in Dateien. More...

#include <xoutput.h>

Static Public Member Functions

static std::ofstream get_stream (const std::string &fname)
 get_output_stream Öffnen einer Ausgabedatei falls die Datei nicht geöffnet werden kann wird ein Fehler ausgeworfen More...
 
static std::ofstream get_stream (const std::string &dirname, const std::string &fname)
 get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis, Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen More...
 
static std::ofstream get_stream (const std::string &dirname, const Format &fmt)
 get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis. Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen More...
 
template<class T >
static std::ofstream get_stream (const std::string &dirname, const Format &fmt, const T &id)
 get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis. Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen More...
 
static const Formatarray ()
 array lese internes Formatierungsobjekt More...
 

Static Public Attributes

static const Format latex { "table", "&", "\\\\\n", "tex" }
 
static const Format plot { "plot", ",", "\n", "csv" }
 
static const Format terminal { "terminal", "\t", "\n", "out" }
 
static const Format csv { "csv", ",", "\n", "csv" }
 

Friends

std::ostream & operator<< (std::ostream &os, const Format &fmt)
 operator << überladener Ausgabeoperator internes Formatierungsobjekt wird gesetzt. More...
 

Detailed Description

The Output struct Hilfsklasse zur Erzeugung von Ausgabeströmen zum Schreiben in Dateien.

Definition at line 14 of file xoutput.h.

Member Function Documentation

◆ array()

static const Format& nmx::Output::array ( )
inlinestatic

array lese internes Formatierungsobjekt

Returns
Referens auf gespeichertes Formatierungsobjekt

Definition at line 118 of file xoutput.h.

◆ get_stream() [1/4]

static std::ofstream nmx::Output::get_stream ( const std::string &  fname)
inlinestatic

get_output_stream Öffnen einer Ausgabedatei falls die Datei nicht geöffnet werden kann wird ein Fehler ausgeworfen

Parameters
fnameName der Ausgabedatei
Returns
Ausgabestrom

Definition at line 29 of file xoutput.h.

◆ get_stream() [2/4]

static std::ofstream nmx::Output::get_stream ( const std::string &  dirname,
const std::string &  fname 
)
inlinestatic

get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis, Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen

Parameters
dirnameName des Unterverzeichnisses
fnameName der Ausgabedatei
Returns
Ausgabestrom

Definition at line 46 of file xoutput.h.

◆ get_stream() [3/4]

static std::ofstream nmx::Output::get_stream ( const std::string &  dirname,
const Format fmt 
)
inlinestatic

get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis. Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen

Parameters
dirnameName des Unterverzeichnisses
fmtFormatierungsanweisung für den Ausgabestrom, der Name der Datei erhält einen Zusatz abhängig von diesem Parameter
Returns
Ausgabestrom

Definition at line 63 of file xoutput.h.

◆ get_stream() [4/4]

template<class T >
static std::ofstream nmx::Output::get_stream ( const std::string &  dirname,
const Format fmt,
const T &  id 
)
inlinestatic

get_output_stream Öffnen einer Ausgabedatei in einem Unterverzeichnis. Falls die Datei nicht geöffnet werden kann, wird ein Fehler ausgeworfen

Parameters
dirnameName des Unterverzeichnisses oder der Datei
fmtFormatierungsanweisung für den Ausgabestrom, der Name der Datei erhält einen Zusatz abhängig von diesem Parameter
idNamenszusatz
Returns
Ausgabestrom

Definition at line 85 of file xoutput.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Format fmt 
)
friend

operator << überladener Ausgabeoperator internes Formatierungsobjekt wird gesetzt.

Parameters
osAusgabestrom
fmtFormatierungsobjekt
Returns
Referenz auf Ausgabestrom

Definition at line 128 of file xoutput.h.

Member Data Documentation

◆ csv

const Format nmx::Output::csv { "csv", ",", "\n", "csv" }
inlinestatic

Definition at line 20 of file xoutput.h.

◆ latex

const Format nmx::Output::latex { "table", "&", "\\\\\n", "tex" }
inlinestatic

Definition at line 17 of file xoutput.h.

◆ plot

const Format nmx::Output::plot { "plot", ",", "\n", "csv" }
inlinestatic

Definition at line 18 of file xoutput.h.

◆ terminal

const Format nmx::Output::terminal { "terminal", "\t", "\n", "out" }
inlinestatic

Definition at line 19 of file xoutput.h.


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