ENH: Added dictionary write functionality to DataEntry

This commit is contained in:
andy
2011-11-17 18:10:42 +00:00
parent f93ae77a86
commit 8b4fa16d8b
8 changed files with 81 additions and 17 deletions

View File

@ -118,12 +118,17 @@ public:
Type integrate(const scalar x1, const scalar x2) const;
//- Ostream Operator
friend Ostream& operator<< <Type>
(
Ostream&,
const Table<Type>&
);
// I/O
//- Ostream Operator
friend Ostream& operator<< <Type>
(
Ostream& os,
const Table<Type>& cnst
);
//- Write in dictionary format
virtual void writeData(Ostream& os) const;
};

View File

@ -59,4 +59,13 @@ Foam::Ostream& Foam::operator<<
}
template<class Type>
void Foam::Table<Type>::writeData(Ostream& os) const
{
DataEntry<Type>::writeData(os);
os << nl << indent << table_ << token::END_STATEMENT << nl;
}
// ************************************************************************* //