COMP: add missing include and clone() method to TableFile

This commit is contained in:
Mark Olesen
2020-09-28 09:44:38 +02:00
parent 43b9b63ab0
commit 245ac07312
2 changed files with 10 additions and 3 deletions

View File

@ -45,7 +45,7 @@ Foam::Function1Types::TableFile<Type>::TableFile
fileName expandedFile(fName_);
autoPtr<ISstream> isPtr(fileHandler().NewIFstream(expandedFile.expand()));
ISstream& is = isPtr();
ISstream& is = *isPtr;
if (!is.good())
{

View File

@ -60,6 +60,7 @@ SourceFiles
#define TableFile_H
#include "Function1.H"
#include "TableBase.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -80,7 +81,7 @@ class TableFile
{
// Private Data
//- File name for csv table (optional)
//- File name for table (mandatory)
fileName fName_;
@ -101,9 +102,15 @@ public:
//- Construct from entry name and "file" found in dictionary
TableFile(const word& entryName, const dictionary& dict);
//- Copy constructor
//- Copy construct
explicit TableFile(const TableFile<Type>& tbl);
//- Construct and return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new TableFile<Type>(*this));
}
//- Destructor
virtual ~TableFile() = default;