diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index c406271fb6..a31166200b 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -94,4 +94,13 @@ void Foam::thermophysicalFunction::write(Ostream& os, const word& name) const } +// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // + +Foam::Ostream& Foam::operator<<(Ostream& os, const thermophysicalFunction& f) +{ + f.write(os); + return os; +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.H b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.H index b787b9c200..ac0b6452e5 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.H +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.H @@ -44,6 +44,10 @@ Description namespace Foam { +// Forward declaration of friend functions and operators +class thermophysicalFunction; +Ostream& operator<<(Ostream& os, const thermophysicalFunction& l); + /*---------------------------------------------------------------------------*\ Class thermophysicalFunction Declaration \*---------------------------------------------------------------------------*/ @@ -102,11 +106,11 @@ public: // Ostream Operator - friend Ostream& operator<<(Ostream& os, const thermophysicalFunction& f) - { - f.write(os); - return os; - } + friend Ostream& operator<< + ( + Ostream& os, + const thermophysicalFunction& f + ); };