From 3980082fe2b8f9b21474c416be8710b6d9fc9614 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 29 May 2016 22:28:37 +0100 Subject: [PATCH] Added forward declaration of friend functions --- src/OSspecific/POSIX/memInfo/memInfo.H | 10 +++++++++- src/OpenFOAM/db/IOstreams/token/token.H | 2 ++ .../dictionary/dictionaryEntry/dictionaryEntry.H | 9 ++++++++- src/OpenFOAM/dimensionSet/dimensionSet.H | 4 +++- .../matrices/LUscalarMatrix/procLduInterface.H | 10 +++++++++- .../matrices/lduMatrix/lduMatrix/lduMatrix.H | 2 ++ src/OpenFOAM/meshes/boundBox/boundBox.H | 3 +++ src/OpenFOAM/meshes/lduMesh/lduMesh.H | 10 ++++++++++ src/OpenFOAM/primitives/strings/keyType/keyType.H | 8 ++++++++ .../polyTopoChanger/polyTopoChanger.H | 10 +++++++++- .../triSurface/surfaceLocation/surfaceLocation.H | 10 ++++++++++ .../sampledSurface/sampledSurface.H | 7 +++++++ src/surfMesh/surfZone/surfZone/surfZoneIOList.H | 9 +++++++-- src/surfMesh/surfaceFormats/stl/STLtriangle.H | 9 ++++++++- src/triSurface/tools/labelledTri/labelledTri.H | 10 +++++++++- .../triSurface/surfacePatch/surfacePatch.H | 9 ++++++++- .../triSurface/surfacePatch/surfacePatchIOList.H | 15 +++++++-------- src/triSurface/triSurface/triSurface.H | 8 ++++++++ 18 files changed, 127 insertions(+), 18 deletions(-) diff --git a/src/OSspecific/POSIX/memInfo/memInfo.H b/src/OSspecific/POSIX/memInfo/memInfo.H index 540ea9b6d..c86c07537 100644 --- a/src/OSspecific/POSIX/memInfo/memInfo.H +++ b/src/OSspecific/POSIX/memInfo/memInfo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,6 +47,14 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class memInfo; + +Istream& operator>>(Istream&, memInfo&); +Ostream& operator<<(Ostream&, const memInfo&); + + /*---------------------------------------------------------------------------*\ Class memInfo Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H index 23a04d1d3..7229e58b8 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.H +++ b/src/OpenFOAM/db/IOstreams/token/token.H @@ -58,9 +58,11 @@ namespace Foam // Forward declaration of friend functions and operators class token; + Istream& operator>>(Istream&, token&); Ostream& operator<<(Ostream&, const token&); + /*---------------------------------------------------------------------------*\ Class token Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H index c4271e396..7ac7670f2 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,6 +51,13 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class dictionaryEntry; + +Ostream& operator<<(Ostream&, const dictionaryEntry&); + + /*---------------------------------------------------------------------------*\ Class dictionaryEntry Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.H b/src/OpenFOAM/dimensionSet/dimensionSet.H index b4af80416..dd596cc6e 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.H +++ b/src/OpenFOAM/dimensionSet/dimensionSet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,6 +90,8 @@ dimensionSet inv(const dimensionSet&); // for transcendental functions dimensionSet trans(const dimensionSet&); +dimensionSet atan2(const dimensionSet&, const dimensionSet&); + // Return the argument; transformations do not change the dimensions dimensionSet transform(const dimensionSet&); diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H index d113a6b30..2f6035e3c 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H +++ b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,6 +45,14 @@ namespace Foam class lduInterfaceField; + +// Forward declaration of friend functions and operators + +class procLduInterface; + +Ostream& operator<<(Ostream&, const procLduInterface&); + + /*---------------------------------------------------------------------------*\ Class procLduInterface Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H index 771317ed7..575916f63 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H @@ -68,7 +68,9 @@ namespace Foam // Forward declaration of friend functions and operators class lduMatrix; + Ostream& operator<<(Ostream&, const lduMatrix&); +Ostream& operator<<(Ostream&, const InfoProxy&); /*---------------------------------------------------------------------------*\ diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H index a340a90c0..36bbcad65 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.H +++ b/src/OpenFOAM/meshes/boundBox/boundBox.H @@ -45,6 +45,9 @@ namespace Foam class boundBox; template class tmp; +bool operator==(const boundBox&, const boundBox&); +bool operator!=(const boundBox&, const boundBox&); + Istream& operator>>(Istream&, boundBox&); Ostream& operator<<(Ostream&, const boundBox&); diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.H b/src/OpenFOAM/meshes/lduMesh/lduMesh.H index f42413294..b871ee956 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.H +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.H @@ -45,6 +45,14 @@ namespace Foam class objectRegistry; + +// Forward declaration of friend functions and operators + +class lduMesh; + +Ostream& operator<<(Ostream&, const InfoProxy&); + + /*---------------------------------------------------------------------------*\ Class lduMesh Declaration \*---------------------------------------------------------------------------*/ @@ -90,6 +98,7 @@ public: const BinaryOp& bop ) const; + // Info //- Return info proxy. @@ -99,6 +108,7 @@ public: return *this; } + // Ostream operator friend Ostream& operator<<(Ostream&, const InfoProxy&); diff --git a/src/OpenFOAM/primitives/strings/keyType/keyType.H b/src/OpenFOAM/primitives/strings/keyType/keyType.H index 53ef756ee..f79332ff5 100644 --- a/src/OpenFOAM/primitives/strings/keyType/keyType.H +++ b/src/OpenFOAM/primitives/strings/keyType/keyType.H @@ -50,6 +50,14 @@ class Istream; class Ostream; +// Forward declaration of friend functions and operators + +class keyType; + +Istream& operator>>(Istream&, keyType&); +Ostream& operator<<(Ostream&, const keyType&); + + /*---------------------------------------------------------------------------*\ Class keyType Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.H b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.H index 9a8d91010..b9f4cbff2 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,6 +50,14 @@ class polyMesh; class mapPolyMesh; class polyBoundaryMesh; + +// Forward declaration of friend functions and operators + +class polyTopoChanger; + +Ostream& operator<<(Ostream&, const polyTopoChanger&); + + /*---------------------------------------------------------------------------*\ Class polyTopoChanger Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H index d9591b4d5..7bc2263f6 100644 --- a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H +++ b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H @@ -59,6 +59,16 @@ namespace Foam // Forward declaration of classes class triSurface; + +// Forward declaration of friend functions and operators + +class surfaceLocation; + +Istream& operator>>(Istream&, surfaceLocation&); +Ostream& operator<<(Ostream&, const surfaceLocation&); +Ostream& operator<<(Ostream&, const InfoProxy&); + + /*---------------------------------------------------------------------------*\ Class surfaceLocation Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H index 0507a6887..98db69744 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H @@ -71,6 +71,13 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class sampledSurface; + +Ostream& operator<<(Ostream&, const sampledSurface&); + + /*---------------------------------------------------------------------------*\ Class sampledSurface Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/surfMesh/surfZone/surfZone/surfZoneIOList.H b/src/surfMesh/surfZone/surfZone/surfZoneIOList.H index dc291846f..aab90ddf7 100644 --- a/src/surfMesh/surfZone/surfZone/surfZoneIOList.H +++ b/src/surfMesh/surfZone/surfZone/surfZoneIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,12 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward declaration of friend functions and operators + +class surfZoneIOList; + +Ostream& operator<<(Ostream&, const surfZoneIOList&); + /*---------------------------------------------------------------------------*\ Class surfZoneIOList Declaration diff --git a/src/surfMesh/surfaceFormats/stl/STLtriangle.H b/src/surfMesh/surfaceFormats/stl/STLtriangle.H index 348d77527..17783047f 100644 --- a/src/surfMesh/surfaceFormats/stl/STLtriangle.H +++ b/src/surfMesh/surfaceFormats/stl/STLtriangle.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,6 +44,13 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class STLtriangle; + +Ostream& operator<<(Ostream&, const STLtriangle&); + + /*---------------------------------------------------------------------------*\ Class STLtriangle Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/triSurface/tools/labelledTri/labelledTri.H b/src/triSurface/tools/labelledTri/labelledTri.H index 6f0c13065..a0fd5a90d 100644 --- a/src/triSurface/tools/labelledTri/labelledTri.H +++ b/src/triSurface/tools/labelledTri/labelledTri.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,14 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class labelledTri; + +Istream& operator>>(Istream&, labelledTri&); +Ostream& operator<<(Ostream&, const labelledTri&); + + /*---------------------------------------------------------------------------*\ Class labelledTri Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatch.H b/src/triSurface/triSurface/surfacePatch/surfacePatch.H index 03f8916d9..9e0b87869 100644 --- a/src/triSurface/triSurface/surfacePatch/surfacePatch.H +++ b/src/triSurface/triSurface/surfacePatch/surfacePatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,6 +45,13 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators + +class surfacePatch; + +Ostream& operator<<(Ostream&, const surfacePatch&); + + /*---------------------------------------------------------------------------*\ Class surfacePatch Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H index d2659b01b..085e03b0f 100644 --- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H +++ b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,12 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward declaration of friend functions and operators + +class surfacePatchIOList; + +Ostream& operator<<(Ostream&, const surfacePatchIOList&); + /*---------------------------------------------------------------------------*\ Class surfacePatchIOList Declaration @@ -96,12 +101,6 @@ public: bool writeData(Ostream&) const; - // Member Operators - - // Friend Functions - - // Friend Operators - // IOstream Operators friend Ostream& operator<<(Ostream&, const surfacePatchIOList&); diff --git a/src/triSurface/triSurface/triSurface.H b/src/triSurface/triSurface/triSurface.H index a66d9775d..2e9ce52d1 100644 --- a/src/triSurface/triSurface/triSurface.H +++ b/src/triSurface/triSurface/triSurface.H @@ -51,6 +51,14 @@ namespace Foam class Time; class IFstream; + +// Forward declaration of friend functions and operators + +class triSurface; + +Ostream& operator<<(Ostream&, const triSurface&); + + /*---------------------------------------------------------------------------*\ Class triSurface Declaration \*---------------------------------------------------------------------------*/