csvTableReader< Type > Class Template Reference

Reads an interpolation table from a file - CSV-format. More...

Inheritance diagram for csvTableReader< Type >:
[legend]
Collaboration diagram for csvTableReader< Type >:
[legend]

Public Member Functions

 TypeName ("csv")
 Runtime type information. More...
 
 csvTableReader (const dictionary &dict)
 Construct from dictionary. More...
 
virtual autoPtr< tableReader< Type > > clone () const
 Construct and return a copy. More...
 
virtual ~csvTableReader ()
 Destructor. More...
 
virtual void operator() (const fileName &, List< Tuple2< scalar, Type >> &)
 Read the table. More...
 
virtual void operator() (const fileName &, List< Tuple2< scalar, List< Tuple2< scalar, Type >>>> &)
 Read 2D table. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from tableReader< Type >
static autoPtr< tableReaderNew (const dictionary &spec)
 Return a reference to the selected tableReader. More...
 

Detailed Description

template<class Type>
class Foam::csvTableReader< Type >

Reads an interpolation table from a file - CSV-format.

Source files

Definition at line 52 of file csvTableReader.H.

Constructor & Destructor Documentation

◆ csvTableReader()

csvTableReader ( const dictionary dict)

Construct from dictionary.

Definition at line 35 of file csvTableReader.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ ~csvTableReader()

~csvTableReader ( )
virtual

Destructor.

Definition at line 56 of file csvTableReader.C.

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 86 of file csvTableReader.H.

◆ operator()() [1/2]

void operator() ( const fileName fName,
List< Tuple2< scalar, Type >> &  data 
)
virtual

Read the table.

Implements tableReader< Type >.

Definition at line 105 of file csvTableReader.C.

References DynamicList< T, SizeMin >::append(), Foam::fileHandler(), ISstream::getLine(), IOstream::good(), Foam::pos(), dictionary::transfer(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ operator()() [2/2]

void operator() ( const fileName fName,
List< Tuple2< scalar, List< Tuple2< scalar, Type >>>> &  data 
)
virtual

Read 2D table.

Implements tableReader< Type >.

Definition at line 164 of file csvTableReader.C.

References NotImplemented.

◆ write()

void write ( Ostream os) const
virtual

Write the remaining parameters.

Reimplemented from tableReader< Type >.

Definition at line 174 of file csvTableReader.C.

References IOstreamOption::ASCII, IOstreamOption::BINARY, token::END_STATEMENT, IOstreamOption::format(), Foam::nl, tableReader< Type >::write(), Ostream::writeEntry(), and Ostream::writeKeyword().

Here is the call graph for this function:

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