Public Member Functions | List of all members
csvTableReader< Type > Class Template Reference

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

Inheritance diagram for csvTableReader< Type >:
Inheritance graph
[legend]
Collaboration diagram for csvTableReader< Type >:
Collaboration graph
[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 50 of file csvTableReader.H.

Constructor & Destructor Documentation

◆ csvTableReader()

csvTableReader ( const dictionary dict)

Construct from dictionary.

Definition at line 33 of file csvTableReader.C.

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

Here is the call graph for this function:

◆ ~csvTableReader()

~csvTableReader ( )
virtual

Destructor.

Definition at line 54 of file csvTableReader.C.

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

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

Here is the call graph for this function:
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 84 of file csvTableReader.H.

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

Here is the call graph for this function:

◆ operator()() [1/2]

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

Read the table.

Implements tableReader< Type >.

Definition at line 106 of file csvTableReader.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), Foam::fileHandler(), ISstream::getLine(), IOstream::good(), Foam::pos(), Foam::readScalar(), List< T >::size(), and dictionary::transfer().

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

Here is the call graph for this function:
Here is the caller 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 165 of file csvTableReader.C.

References NotImplemented.

◆ write()

void write ( Ostream os) const
virtual

Write the remaining parameters.

Reimplemented from tableReader< Type >.

Definition at line 175 of file csvTableReader.C.

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

Referenced by csvTableReader< 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: