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;
namespace Module
{
class coordinateModification;
Ostream& operator<<(Ostream&, const coordinateModification&);
/*---------------------------------------------------------------------------*\
Class coordinateModification Declaration
......
......@@ -44,6 +44,8 @@ namespace Foam
{
namespace Module
{
class planeScaling;
Ostream& operator<<(Ostream&, const planeScaling&);
/*---------------------------------------------------------------------------*\
Class planeScaling Declaration
......
......@@ -46,6 +46,9 @@ namespace Foam
{
namespace Module
{
class cellListPMG;
inline Ostream& operator<<(Ostream&, const cellListPMG&);
inline Istream& operator>>(Istream&, cellListPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -103,9 +106,9 @@ public:
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
{
namespace Module
{
class faceListPMG;
inline Ostream& operator<<(Ostream&, const faceListPMG&);
inline Istream& operator>>(Istream&, faceListPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -118,9 +121,9 @@ public:
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
{
namespace Module
{
class pointFieldPMG;
inline Ostream& operator<<(Ostream&, const pointFieldPMG&);
inline Istream& operator>>(Istream&, pointFieldPMG&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -125,9 +128,9 @@ public:
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
{
namespace Module
{
class boundaryPatchBase;
Ostream& operator<<(Ostream&, const boundaryPatchBase&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -50,6 +50,9 @@ class Ostream;
namespace Module
{
class VRWGraph;
class meshSubset;
inline Ostream& operator<<(Ostream&, const meshSubset&);
inline Istream& operator>>(Istream&, meshSubset&);
/*---------------------------------------------------------------------------*\
class meshSubset Declaration
......@@ -161,8 +164,8 @@ public:
// IOstream operators
friend inline Ostream& operator<<(Ostream&, const meshSubset&);
friend inline Istream& operator>>(Istream&, meshSubset&);
inline friend Ostream& operator<<(Ostream&, const meshSubset&);
inline friend Istream& operator>>(Istream&, meshSubset&);
};
......
......@@ -48,6 +48,8 @@ class Ostream;
namespace Module
{
class partTet;
inline Ostream& operator<<(Ostream&, const partTet&);
/*---------------------------------------------------------------------------*\
class partTet Declaration
......@@ -155,7 +157,7 @@ public:
// IOstream operators
friend Ostream& operator<<(Ostream&, const partTet&);
inline friend Ostream& operator<<(Ostream&, const partTet&);
};
......
......@@ -50,7 +50,9 @@ namespace Module
{
class triSurf;
class VRWGraph;
class meshOctreeCube;
class meshOctreeSlot;
Ostream& operator<<(Ostream&, const meshOctreeCube&);
/*---------------------------------------------------------------------------*\
Class meshOctreeCube Declaration
......
......@@ -44,6 +44,9 @@ namespace Foam
{
namespace Module
{
class meshOctreeCubeBasic;
inline Ostream& operator<<(Ostream&, const meshOctreeCubeBasic&);
inline Istream& operator>>(Istream&, meshOctreeCubeBasic&);
/*---------------------------------------------------------------------------*\
Class meshOctreeCubeBasic Declaration
......@@ -126,13 +129,13 @@ public:
// Friend operators
friend inline Ostream& operator<<
inline friend Ostream& operator<<
(
Ostream&,
const meshOctreeCubeBasic&
);
friend inline Istream& operator>>
inline friend Istream& operator>>
(
Istream&,
meshOctreeCubeBasic&
......
......@@ -50,6 +50,9 @@ class boundBox;
namespace Module
{
class triSurf;
class meshOctreeCubeCoordinates;
inline Istream& operator>>(Istream&, meshOctreeCubeCoordinates&);
inline Ostream& operator<<(Ostream&, const meshOctreeCubeCoordinates&);
/*---------------------------------------------------------------------------*\
Class meshOctreeCubeCoordinates Declaration
......@@ -218,12 +221,12 @@ public:
inline bool operator<(const meshOctreeCubeCoordinates&) const;
inline bool operator>(const meshOctreeCubeCoordinates&) const;
friend inline Istream& operator>>
inline friend Istream& operator>>
(
Istream&,
meshOctreeCubeCoordinates&
);
friend inline Ostream& operator<<
inline friend Ostream& operator<<
(
Ostream&,
const meshOctreeCubeCoordinates&
......
......@@ -49,6 +49,8 @@ class boundBox;
namespace Module
{
class objectRefinement;
Ostream& operator<<(Ostream&, const objectRefinement&);
/*---------------------------------------------------------------------------*\
Class objectRefinement Declaration
......
......@@ -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_;
}
Foam::scalar Foam::Module::patchRefinement::cellSize() const
{
return cellSize_;
}
Foam::label
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)
......@@ -113,26 +113,25 @@ Foam::Ostream& Foam::Module::operator<<
}
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
bool Foam::Module::operator==
(
const Foam::Module::patchRefinement& p1,
const Foam::Module::patchRefinement& p2
const Foam::Module::patchRefinement& lhs,
const Foam::Module::patchRefinement& rhs
)
{
if (p1.patchName() == p2.patchName())
return true;
return false;
return (lhs.patchName() == rhs.patchName());
}
bool Foam::Module::operator!=
(
const Foam::Module::patchRefinement& p1,
const Foam::Module::patchRefinement& p2
const Foam::Module::patchRefinement& lhs,
const Foam::Module::patchRefinement& rhs
)
{
return !(p1 == p2);
return !(lhs == rhs);
}
......
......@@ -50,6 +50,9 @@ class Ostream;
namespace Module
{
class triSurf;
class patchRefinement;
Istream& operator>>(Istream& is, patchRefinement& pr);
Ostream& operator<<(Ostream& os, const patchRefinement& pr);
/*---------------------------------------------------------------------------*\
Class patchRefinement Declaration
......@@ -84,25 +87,29 @@ public:
// Member Functions
word patchName() const;
label patchInSurface(const triSurf&) const;
const word& patchName() const;
scalar cellSize() const;
label patchInSurface(const triSurf& ts) const;
// Operators
void operator=(const patchRefinement&);
friend Istream& operator>>(Istream&, patchRefinement&);
friend Ostream& operator<<(Ostream&, const patchRefinement&);
friend bool operator==(const patchRefinement&, const patchRefinement&);
friend bool operator!=(const patchRefinement&, const patchRefinement&);
friend Istream& operator>>(Istream& is, patchRefinement& pr);
friend Ostream& operator<<(Ostream& os, const patchRefinement& pr);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global Operators
bool operator==(const patchRefinement& lhs, const patchRefinement& rhs);
bool operator!=(const patchRefinement& lhs, const patchRefinement& rhs);
} // End namespace Module
} // End namespace Foam
......
......@@ -49,6 +49,8 @@ namespace Foam
{
namespace Module
{
// Forward declarations
class meshSurfaceEngineModifier;
/*---------------------------------------------------------------------------*\
Class meshSurfaceEngine Declaration
......
......@@ -44,6 +44,9 @@ namespace Foam
{
namespace Module
{
class parMapperHelper;
Ostream& operator<<(Ostream& os, const parMapperHelper& h);
Istream& operator>>(Istream& is, parMapperHelper& h);
/*---------------------------------------------------------------------------*\
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