Commit 7fb146a2 authored by Mark Olesen's avatar Mark Olesen

COMP: add forward declarations for friend operators (eg, gcc-4.9)

parent 3b91ceb0
...@@ -50,6 +50,8 @@ class plane; ...@@ -50,6 +50,8 @@ class plane;
namespace Module namespace Module
{ {
class coordinateModification;
Ostream& operator<<(Ostream&, const coordinateModification&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class coordinateModification Declaration Class coordinateModification Declaration
......
...@@ -44,6 +44,8 @@ namespace Foam ...@@ -44,6 +44,8 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class planeScaling;
Ostream& operator<<(Ostream&, const planeScaling&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class planeScaling Declaration Class planeScaling Declaration
......
...@@ -46,6 +46,9 @@ namespace Foam ...@@ -46,6 +46,9 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class cellListPMG;
inline Ostream& operator<<(Ostream&, const cellListPMG&);
inline Istream& operator>>(Istream&, cellListPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -103,9 +106,9 @@ public: ...@@ -103,9 +106,9 @@ public:
inline void operator=(const cellList&); inline void operator=(const cellList&);
friend inline Ostream& operator<<(Ostream&, const cellListPMG&); inline friend Ostream& operator<<(Ostream&, const cellListPMG&);
friend inline Istream& operator>>(Istream&, cellListPMG&); inline friend Istream& operator>>(Istream&, cellListPMG&);
}; };
......
...@@ -46,6 +46,9 @@ namespace Foam ...@@ -46,6 +46,9 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class faceListPMG;
inline Ostream& operator<<(Ostream&, const faceListPMG&);
inline Istream& operator>>(Istream&, faceListPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -118,9 +121,9 @@ public: ...@@ -118,9 +121,9 @@ public:
inline void operator=(const faceList&); inline void operator=(const faceList&);
friend inline Ostream& operator<<(Ostream&, const faceListPMG&); inline friend Ostream& operator<<(Ostream&, const faceListPMG&);
friend inline Istream& operator>>(Istream&, faceListPMG&); inline friend Istream& operator>>(Istream&, faceListPMG&);
}; };
......
...@@ -46,6 +46,9 @@ namespace Foam ...@@ -46,6 +46,9 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class pointFieldPMG;
inline Ostream& operator<<(Ostream&, const pointFieldPMG&);
inline Istream& operator>>(Istream&, pointFieldPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -125,9 +128,9 @@ public: ...@@ -125,9 +128,9 @@ public:
inline void operator=(const pointField&); inline void operator=(const pointField&);
friend inline Ostream& operator<<(Ostream&, const pointFieldPMG&); inline friend Ostream& operator<<(Ostream&, const pointFieldPMG&);
friend inline Istream& operator>>(Istream&, pointFieldPMG&); inline friend Istream& operator>>(Istream&, pointFieldPMG&);
}; };
......
...@@ -47,6 +47,8 @@ namespace Foam ...@@ -47,6 +47,8 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class boundaryPatchBase;
Ostream& operator<<(Ostream&, const boundaryPatchBase&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -50,6 +50,9 @@ class Ostream; ...@@ -50,6 +50,9 @@ class Ostream;
namespace Module namespace Module
{ {
class VRWGraph; class VRWGraph;
class meshSubset;
inline Ostream& operator<<(Ostream&, const meshSubset&);
inline Istream& operator>>(Istream&, meshSubset&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
class meshSubset Declaration class meshSubset Declaration
...@@ -161,8 +164,8 @@ public: ...@@ -161,8 +164,8 @@ public:
// IOstream operators // IOstream operators
friend inline Ostream& operator<<(Ostream&, const meshSubset&); inline friend Ostream& operator<<(Ostream&, const meshSubset&);
friend inline Istream& operator>>(Istream&, meshSubset&); inline friend Istream& operator>>(Istream&, meshSubset&);
}; };
......
...@@ -48,6 +48,8 @@ class Ostream; ...@@ -48,6 +48,8 @@ class Ostream;
namespace Module namespace Module
{ {
class partTet;
inline Ostream& operator<<(Ostream&, const partTet&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
class partTet Declaration class partTet Declaration
...@@ -155,7 +157,7 @@ public: ...@@ -155,7 +157,7 @@ public:
// IOstream operators // IOstream operators
friend Ostream& operator<<(Ostream&, const partTet&); inline friend Ostream& operator<<(Ostream&, const partTet&);
}; };
......
...@@ -50,7 +50,9 @@ namespace Module ...@@ -50,7 +50,9 @@ namespace Module
{ {
class triSurf; class triSurf;
class VRWGraph; class VRWGraph;
class meshOctreeCube;
class meshOctreeSlot; class meshOctreeSlot;
Ostream& operator<<(Ostream&, const meshOctreeCube&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class meshOctreeCube Declaration Class meshOctreeCube Declaration
......
...@@ -44,6 +44,9 @@ namespace Foam ...@@ -44,6 +44,9 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class meshOctreeCubeBasic;
inline Ostream& operator<<(Ostream&, const meshOctreeCubeBasic&);
inline Istream& operator>>(Istream&, meshOctreeCubeBasic&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class meshOctreeCubeBasic Declaration Class meshOctreeCubeBasic Declaration
...@@ -126,13 +129,13 @@ public: ...@@ -126,13 +129,13 @@ public:
// Friend operators // Friend operators
friend inline Ostream& operator<< inline friend Ostream& operator<<
( (
Ostream&, Ostream&,
const meshOctreeCubeBasic& const meshOctreeCubeBasic&
); );
friend inline Istream& operator>> inline friend Istream& operator>>
( (
Istream&, Istream&,
meshOctreeCubeBasic& meshOctreeCubeBasic&
......
...@@ -50,6 +50,9 @@ class boundBox; ...@@ -50,6 +50,9 @@ class boundBox;
namespace Module namespace Module
{ {
class triSurf; class triSurf;
class meshOctreeCubeCoordinates;
inline Istream& operator>>(Istream&, meshOctreeCubeCoordinates&);
inline Ostream& operator<<(Ostream&, const meshOctreeCubeCoordinates&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class meshOctreeCubeCoordinates Declaration Class meshOctreeCubeCoordinates Declaration
...@@ -218,12 +221,12 @@ public: ...@@ -218,12 +221,12 @@ public:
inline bool operator<(const meshOctreeCubeCoordinates&) const; inline bool operator<(const meshOctreeCubeCoordinates&) const;
inline bool operator>(const meshOctreeCubeCoordinates&) const; inline bool operator>(const meshOctreeCubeCoordinates&) const;
friend inline Istream& operator>> inline friend Istream& operator>>
( (
Istream&, Istream&,
meshOctreeCubeCoordinates& meshOctreeCubeCoordinates&
); );
friend inline Ostream& operator<< inline friend Ostream& operator<<
( (
Ostream&, Ostream&,
const meshOctreeCubeCoordinates& const meshOctreeCubeCoordinates&
......
...@@ -49,6 +49,8 @@ class boundBox; ...@@ -49,6 +49,8 @@ class boundBox;
namespace Module namespace Module
{ {
class objectRefinement;
Ostream& operator<<(Ostream&, const objectRefinement&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class objectRefinement Declaration Class objectRefinement Declaration
......
...@@ -53,12 +53,18 @@ Foam::Module::patchRefinement::patchRefinement(Istream& is) ...@@ -53,12 +53,18 @@ Foam::Module::patchRefinement::patchRefinement(Istream& is)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::word Foam::Module::patchRefinement::patchName() const const Foam::word& Foam::Module::patchRefinement::patchName() const
{ {
return patchName_; return patchName_;
} }
Foam::scalar Foam::Module::patchRefinement::cellSize() const
{
return cellSize_;
}
Foam::label Foam::label
Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const
{ {
...@@ -75,12 +81,6 @@ Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const ...@@ -75,12 +81,6 @@ Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const
} }
Foam::scalar Foam::Module::patchRefinement::cellSize() const
{
return cellSize_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::Module::patchRefinement::operator=(const patchRefinement& pr) void Foam::Module::patchRefinement::operator=(const patchRefinement& pr)
...@@ -113,26 +113,25 @@ Foam::Ostream& Foam::Module::operator<< ...@@ -113,26 +113,25 @@ Foam::Ostream& Foam::Module::operator<<
} }
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
bool Foam::Module::operator== bool Foam::Module::operator==
( (
const Foam::Module::patchRefinement& p1, const Foam::Module::patchRefinement& lhs,
const Foam::Module::patchRefinement& p2 const Foam::Module::patchRefinement& rhs
) )
{ {
if (p1.patchName() == p2.patchName()) return (lhs.patchName() == rhs.patchName());
return true;
return false;
} }
bool Foam::Module::operator!= bool Foam::Module::operator!=
( (
const Foam::Module::patchRefinement& p1, const Foam::Module::patchRefinement& lhs,
const Foam::Module::patchRefinement& p2 const Foam::Module::patchRefinement& rhs
) )
{ {
return !(p1 == p2); return !(lhs == rhs);
} }
......
...@@ -50,6 +50,9 @@ class Ostream; ...@@ -50,6 +50,9 @@ class Ostream;
namespace Module namespace Module
{ {
class triSurf; class triSurf;
class patchRefinement;
Istream& operator>>(Istream& is, patchRefinement& pr);
Ostream& operator<<(Ostream& os, const patchRefinement& pr);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class patchRefinement Declaration Class patchRefinement Declaration
...@@ -84,25 +87,29 @@ public: ...@@ -84,25 +87,29 @@ public:
// Member Functions // Member Functions
word patchName() const; const word& patchName() const;
label patchInSurface(const triSurf&) const;
scalar cellSize() const; scalar cellSize() const;
label patchInSurface(const triSurf& ts) const;
// Operators // Operators
void operator=(const patchRefinement&); void operator=(const patchRefinement&);
friend Istream& operator>>(Istream&, patchRefinement&);
friend Ostream& operator<<(Ostream&, const patchRefinement&); friend Istream& operator>>(Istream& is, patchRefinement& pr);
friend bool operator==(const patchRefinement&, const patchRefinement&); friend Ostream& operator<<(Ostream& os, const patchRefinement& pr);
friend bool operator!=(const patchRefinement&, const patchRefinement&);
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global Operators
bool operator==(const patchRefinement& lhs, const patchRefinement& rhs);
bool operator!=(const patchRefinement& lhs, const patchRefinement& rhs);
} // End namespace Module } // End namespace Module
} // End namespace Foam } // End namespace Foam
......
...@@ -49,6 +49,8 @@ namespace Foam ...@@ -49,6 +49,8 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
// Forward declarations
class meshSurfaceEngineModifier;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class meshSurfaceEngine Declaration Class meshSurfaceEngine Declaration
......
...@@ -44,6 +44,9 @@ namespace Foam ...@@ -44,6 +44,9 @@ namespace Foam
{ {
namespace Module namespace Module
{ {
class parMapperHelper;
Ostream& operator<<(Ostream& os, const parMapperHelper& h);
Istream& operator>>(Istream& is, parMapperHelper& h);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class parMapperHelper Declaration Class parMapperHelper Declaration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment