Function1: Simplified files

This commit is contained in:
Henry Weller
2016-02-10 09:43:45 +00:00
parent c0f9781a61
commit cfc829dad9
16 changed files with 131 additions and 366 deletions

View File

@ -259,9 +259,43 @@ const Foam::fileName& Foam::Function1Types::CSV<Type>::fName() const
}
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
template<class Type>
void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
{
Function1<Type>::writeData(os);
os << token::END_STATEMENT << nl;
os << indent << word(this->name() + "Coeffs") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
#include "CSVIO.C"
// Note: for TableBase write the dictionary entries it needs but not
// the values themselves
TableBase<Type>::writeEntries(os);
os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT
<< nl;
os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl;
// Force writing labelList in ascii
os.writeKeyword("componentColumns");
if (os.format() == IOstream::BINARY)
{
os.format(IOstream::ASCII);
os << componentColumns_;
os.format(IOstream::BINARY);
}
else
{
os << componentColumns_;
}
os << token::END_STATEMENT << nl;
os.writeKeyword("separator") << string(separator_)
<< token::END_STATEMENT << nl;
os.writeKeyword("mergeSeparators") << mergeSeparators_
<< token::END_STATEMENT << nl;
os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
os << decrIndent << indent << token::END_BLOCK << endl;
}
// ************************************************************************* //