csvSetWriter< Type > Class Template Reference

Write set in csv format. More...

Inheritance diagram for csvSetWriter< Type >:
Collaboration diagram for csvSetWriter< Type >:

Public Member Functions

 TypeName ("csv")
 Runtime type information. More...
 
 csvSetWriter ()
 Construct null. More...
 
virtual ~csvSetWriter ()
 Destructor. More...
 
virtual fileName getFileName (const coordSet &, const wordList &) const
 Generate file name with correct extension. More...
 
virtual void write (const coordSet &, const wordList &, const List< const Field< Type > *> &, Ostream &) const
 General entry point for writing. More...
 
virtual void write (const bool writeTracks, const PtrList< coordSet > &, const wordList &valueSetNames, const List< List< Field< Type >>> &, Ostream &) const
 General entry point for writing of multiple coordSets. More...
 
- Public Member Functions inherited from setWriter< Type >
 TypeName ("setWriter")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, setWriter, word,(),())
 
 setWriter ()
 Construct null. More...
 
virtual ~setWriter ()=0
 Destructor. More...
 
virtual void write (const coordSet &, const wordList &, const List< Field< Type >> &, Ostream &) const
 General entry point for writing. More...
 
virtual Ostreamwrite (const scalar, Ostream &) const
 Write scalar as ascii. More...
 
template<class VSType >
OstreamwriteVS (const VSType &, Ostream &) const
 
virtual Ostreamwrite (const vector &, Ostream &) const
 Write vector. Tab separated ascii. More...
 
virtual Ostreamwrite (const sphericalTensor &, Ostream &) const
 Write sphericalTensor. Tab separated ascii. More...
 
virtual Ostreamwrite (const symmTensor &, Ostream &) const
 Write symmTensor. Tab separated ascii. More...
 
virtual Ostreamwrite (const tensor &, Ostream &) const
 Write tensor. Tab separated ascii. More...
 
template<class VSType >
Foam::OstreamwriteVS (const VSType &value, Ostream &os) const
 

Protected Member Functions

virtual void writeSeparator (Ostream &) const
 Writes a separator. Used by write functions. More...
 
- Protected Member Functions inherited from setWriter< Type >
fileName getBaseName (const coordSet &, const wordList &) const
 Generates filename from coordSet and sampled fields. More...
 
void writeCoord (const coordSet &, const label sampleI, Ostream &) const
 
void writeTable (const coordSet &, const List< Type > &, Ostream &) const
 Writes single-column ascii write. Column 1 is coordSet coordinate,. More...
 
void writeTable (const coordSet &, const List< const List< Type > *> &, Ostream &os) const
 Writes multi-column ascii write. Column 1 is coordSet coordinate,. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from setWriter< Type >
static autoPtr< setWriterNew (const word &writeFormat)
 Return a reference to the selected setWriter. More...
 

Detailed Description

template<class Type>
class Foam::csvSetWriter< Type >

Write set in csv format.

Source files

Definition at line 49 of file csvSetWriter.H.

Constructor & Destructor Documentation

◆ csvSetWriter()

Construct null.

Definition at line 34 of file csvSetWriter.C.

◆ ~csvSetWriter()

~csvSetWriter ( )
virtual

Destructor.

Definition at line 43 of file csvSetWriter.C.

References csvSetWriter< Type >::getFileName().

Here is the call graph for this function:

Member Function Documentation

◆ writeSeparator()

void writeSeparator ( Ostream os) const
protectedvirtual

Writes a separator. Used by write functions.

Reimplemented from setWriter< Type >.

Definition at line 120 of file csvSetWriter.C.

References coordSet::axis(), token::COMMA, forAll, coordSet::hasVectorAxis(), and Foam::nl.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "csv"  )

Runtime type information.

◆ getFileName()

Foam::fileName getFileName ( const coordSet ,
const wordList  
) const
virtual

Generate file name with correct extension.

Implements setWriter< Type >.

Definition at line 51 of file csvSetWriter.C.

References setWriter< Type >::getBaseName(), and csvSetWriter< Type >::write().

Referenced by csvSetWriter< Type >::~csvSetWriter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [1/2]

void write ( const coordSet ,
const wordList ,
const List< const Field< Type > *> &  ,
Ostream  
) const
virtual

General entry point for writing.

The data is organised in a set of point with one or more values per point

Implements setWriter< Type >.

Definition at line 62 of file csvSetWriter.C.

References forAll, and setWriter< Type >::writeTable().

Referenced by csvSetWriter< Type >::getFileName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [2/2]

void write ( const bool  writeTracks,
const PtrList< coordSet > &  ,
const wordList valueSetNames,
const List< List< Field< Type >>> &  ,
Ostream  
) const
virtual

General entry point for writing of multiple coordSets.

Each coordSet (track) has same data variables. The data is per variable, per track, per point of track. If writeTracks adds connecting lines (wherever applicable)

Implements setWriter< Type >.

Definition at line 85 of file csvSetWriter.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, List< T >::size(), and setWriter< Type >::writeTable().

Here is the call graph for this function:

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