Csv< Type > Class Template Reference

Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The index of the first (x) column of the table is given by the refColumn entry, and is always scalar. The indices of the components of the second (y) column are given by the componentColumns entry. More...

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

Public Member Functions

 TypeName ("csv")
 Runtime type information. More...
 
 Csv (const dictionary &dict)
 Construct from dictionary. More...
 
virtual autoPtr< TableReader< Type > > clone () const
 Construct and return a copy. More...
 
virtual ~Csv ()
 Destructor. More...
 
virtual void write (Ostream &os) const
 Write the remaining parameters. More...
 
- Public Member Functions inherited from TableReader< Type >
 TypeName ("TableReader")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, TableReader, dictionary,(const dictionary &dict),(dict))
 
 TableReader (const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~TableReader ()
 Destructor. More...
 
template<class TableType >
void operator() (const fileName &, TableType &) const
 Read a table. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TableReader< Type >
static autoPtr< TableReader< Type > > New (const word &readerType, const dictionary &dict)
 

Detailed Description

template<class Type>
class Foam::TableReaders::Csv< Type >

Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The index of the first (x) column of the table is given by the refColumn entry, and is always scalar. The indices of the components of the second (y) column are given by the componentColumns entry.

Usage:

    nHeaderLine         4;          // number of header lines
    refColumn           0;          // reference column index
    componentColumns    (1 2 3);    // component column indices
    separator           ",";        // optional (defaults to ",")
    mergeSeparators     no;         // merge multiple separators
Source files

Definition at line 65 of file CsvTableReader.H.

Constructor & Destructor Documentation

◆ Csv()

Csv ( const dictionary dict)

Construct from dictionary.

Definition at line 215 of file CsvTableReader.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and List< T >::size().

Here is the call graph for this function:

◆ ~Csv()

~Csv ( )
virtual

Destructor.

Definition at line 237 of file CsvTableReader.C.

Referenced by Csv< Type >::clone().

Here is the caller graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "csv"  )

Runtime type information.

◆ clone()

virtual autoPtr<TableReader<Type> > clone ( ) const
inlinevirtual

Construct and return a copy.

Implements TableReader< Type >.

Definition at line 115 of file CsvTableReader.H.

References Csv< Type >::write(), and Csv< Type >::~Csv().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write the remaining parameters.

Reimplemented from TableReader< Type >.

Definition at line 242 of file CsvTableReader.C.

References IOstream::ASCII, IOstream::BINARY, IOstream::format(), TableReader< Type >::write(), and Foam::writeEntry().

Referenced by Csv< Type >::clone().

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

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