Function1: Simplified files
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user