From 7a848fd050da6735e4368fb76ff3ea2bc12ecbbd Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 18 Jun 2018 11:12:55 +0100 Subject: [PATCH] Remove swig support ifdefs --- src/dbns/basicNumericFlux/basicNumericFlux.H | 2 -- .../dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H | 2 -- .../fvsPatchFields/fvsPatchField/fvsPatchField.H | 5 +---- src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H | 2 -- src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H | 2 -- src/foam/containers/Lists/DynamicList/DynamicList.H | 2 -- src/foam/containers/Lists/FixedList/FixedList.H | 5 ----- src/foam/containers/Lists/List/List.H | 2 -- src/foam/containers/Lists/PtrList/PtrList.H | 2 -- src/foam/containers/Lists/UList/UList.H | 2 -- src/foam/containers/NamedEnum/NamedEnum.H | 2 -- .../coordinateRotation/coordinateRotation.H | 10 ++++------ src/foam/coordinateSystems/coordinateSystem.H | 7 ++----- src/foam/db/IOobjectList/IOobjectList.H | 4 ---- src/foam/db/IOstreams/token/token.H | 3 +-- src/foam/db/objectRegistry/objectRegistry.H | 4 ---- .../dimensionedTypes/dimensionedType/dimensionedType.H | 2 -- .../DimensionedField/DimensionedField.H | 7 ------- src/foam/fields/FieldFields/FieldField/FieldField.H | 2 -- src/foam/fields/Fields/Field/Field.H | 2 -- .../meshes/polyMesh/polyPatches/polyPatch/polyPatch.H | 2 -- src/foam/primitives/VectorN/vector4/tensor4I.H | 2 -- src/foam/primitives/VectorSpace/VectorSpace.H | 2 -- 23 files changed, 8 insertions(+), 67 deletions(-) diff --git a/src/dbns/basicNumericFlux/basicNumericFlux.H b/src/dbns/basicNumericFlux/basicNumericFlux.H index 71e2ecd1d..d4ed1ba22 100644 --- a/src/dbns/basicNumericFlux/basicNumericFlux.H +++ b/src/dbns/basicNumericFlux/basicNumericFlux.H @@ -77,7 +77,6 @@ public: //- Declare run-time constructor selection table -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -91,7 +90,6 @@ public: ), (p, U, T, thermo) ); -#endif // Constructors diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H b/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H index 89e1fdd92..0b27aceb0 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H +++ b/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H @@ -70,7 +70,6 @@ public: // Declare run-time constructor selection table -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -79,7 +78,6 @@ public: (const IOobject& io), (io) ); -#endif // Constructors diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index c2b6f0bf6..82320110d 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -103,7 +103,6 @@ public: // Declare run-time constructor selection tables -#ifndef SWIG declareRunTimeSelectionTable ( tmp, @@ -142,7 +141,7 @@ public: ), (p, iF, dict) ); -#endif + // Constructors @@ -391,13 +390,11 @@ public: // Ostream operator -#ifndef SWIG friend Ostream& operator<< ( Ostream&, const fvsPatchField& ); -#endif }; diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 4f299576a..ef5dfe236 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -470,7 +470,6 @@ public: // Friend operators -#ifndef SWIG friend tmp > operator& ( @@ -507,7 +506,6 @@ public: Ostream&, const fvMatrix& ); -#endif }; diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index 007131324..8bd855f17 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -149,7 +149,6 @@ public: // Declare run-time constructor selection tables -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -158,7 +157,6 @@ public: (const polyPatch& patch, const fvBoundaryMesh& bm), (patch, bm) ); -#endif // Constructors diff --git a/src/foam/containers/Lists/DynamicList/DynamicList.H b/src/foam/containers/Lists/DynamicList/DynamicList.H index f6f71f1ec..ca0b97e94 100644 --- a/src/foam/containers/Lists/DynamicList/DynamicList.H +++ b/src/foam/containers/Lists/DynamicList/DynamicList.H @@ -208,7 +208,6 @@ public: // IOstream operators -#ifndef SWIG // Write DynamicList to Ostream friend Ostream& operator<< ( @@ -222,7 +221,6 @@ public: Istream&, DynamicList& ); -#endif }; diff --git a/src/foam/containers/Lists/FixedList/FixedList.H b/src/foam/containers/Lists/FixedList/FixedList.H index 2a3ca86ea..9ff4f20d7 100644 --- a/src/foam/containers/Lists/FixedList/FixedList.H +++ b/src/foam/containers/Lists/FixedList/FixedList.H @@ -70,10 +70,8 @@ template class SLList; template class FixedList { -#ifndef SWIG //- Size must be positive (non-zero) and also fit as a signed value StaticAssert(Size && Size <= INT_MAX); -#endif // Private data @@ -340,8 +338,6 @@ public: // IOstream operators //- Read List from Istream, discarding contents of existing List. - -#ifndef SWIG friend Istream& operator>> (Istream&, FixedList&); @@ -351,7 +347,6 @@ public: Ostream&, const FixedList& ); -#endif }; diff --git a/src/foam/containers/Lists/List/List.H b/src/foam/containers/Lists/List/List.H index 88bfe6bdc..e4d6039cc 100644 --- a/src/foam/containers/Lists/List/List.H +++ b/src/foam/containers/Lists/List/List.H @@ -241,10 +241,8 @@ public: // Istream operator -#ifndef SWIG //- Read List from Istream, discarding contents of existing List. friend Istream& operator>> (Istream&, List&); -#endif }; diff --git a/src/foam/containers/Lists/PtrList/PtrList.H b/src/foam/containers/Lists/PtrList/PtrList.H index 0c663c941..56b391d61 100644 --- a/src/foam/containers/Lists/PtrList/PtrList.H +++ b/src/foam/containers/Lists/PtrList/PtrList.H @@ -293,13 +293,11 @@ public: // IOstream operator -#ifndef SWIG //- Read List from Istream, discarding contents of existing List. friend Istream& operator>> (Istream&, PtrList&); // Write List to Ostream. friend Ostream& operator<< (Ostream&, const PtrList&); -#endif }; diff --git a/src/foam/containers/Lists/UList/UList.H b/src/foam/containers/Lists/UList/UList.H index 85f8741e3..66c1a122f 100644 --- a/src/foam/containers/Lists/UList/UList.H +++ b/src/foam/containers/Lists/UList/UList.H @@ -344,13 +344,11 @@ public: // Ostream operator // Write UList to Ostream. -#ifndef SWIG friend Ostream& operator<< ( Ostream&, const UList& ); -#endif }; diff --git a/src/foam/containers/NamedEnum/NamedEnum.H b/src/foam/containers/NamedEnum/NamedEnum.H index 3f80f29ca..b3031ab99 100644 --- a/src/foam/containers/NamedEnum/NamedEnum.H +++ b/src/foam/containers/NamedEnum/NamedEnum.H @@ -61,10 +61,8 @@ class NamedEnum : public HashTable { -#ifndef SWIG //- nEnum must be positive (non-zero) StaticAssert(nEnum > 0); -#endif // Private Member Functions diff --git a/src/foam/coordinateSystems/coordinateRotation/coordinateRotation.H b/src/foam/coordinateSystems/coordinateRotation/coordinateRotation.H index 19d785723..4ce72a8a7 100644 --- a/src/foam/coordinateSystems/coordinateRotation/coordinateRotation.H +++ b/src/foam/coordinateSystems/coordinateRotation/coordinateRotation.H @@ -145,9 +145,9 @@ public: return autoPtr(new coordinateRotation(*this)); } + // Declare run-time constructor selection table -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -158,7 +158,6 @@ public: ), (dict) ); -#endif // Selectors @@ -170,10 +169,9 @@ public: ); - // Destructor - - virtual ~coordinateRotation() - {} + //- Destructor + virtual ~coordinateRotation() + {} // Member Functions diff --git a/src/foam/coordinateSystems/coordinateSystem.H b/src/foam/coordinateSystems/coordinateSystem.H index af19b8408..e223943fc 100644 --- a/src/foam/coordinateSystems/coordinateSystem.H +++ b/src/foam/coordinateSystems/coordinateSystem.H @@ -260,7 +260,6 @@ public: // Declare run-time constructor selection table -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -285,7 +284,6 @@ public: ), (name, origin, cr) ); -#endif // Selectors @@ -310,9 +308,8 @@ public: static autoPtr New(Istream& is); - // Destructor - - virtual ~coordinateSystem(); + //- Destructor + virtual ~coordinateSystem(); // Member Functions diff --git a/src/foam/db/IOobjectList/IOobjectList.H b/src/foam/db/IOobjectList/IOobjectList.H index cd151cc9a..bea4ecd29 100644 --- a/src/foam/db/IOobjectList/IOobjectList.H +++ b/src/foam/db/IOobjectList/IOobjectList.H @@ -50,11 +50,7 @@ namespace Foam class IOobjectList : -#ifndef SWIG public HashPtrTable -#else - public HashPtrTable -#endif { // Private Member Functions diff --git a/src/foam/db/IOstreams/token/token.H b/src/foam/db/IOstreams/token/token.H index 0fa631cd9..6a209e758 100644 --- a/src/foam/db/IOstreams/token/token.H +++ b/src/foam/db/IOstreams/token/token.H @@ -213,7 +213,6 @@ public: //- A templated class for holding compound tokens -#ifndef SWIG template class Compound : @@ -240,7 +239,7 @@ public: operator<<(os, static_cast(*this)); } }; -#endif + //- Static undefined token static token undefinedToken; diff --git a/src/foam/db/objectRegistry/objectRegistry.H b/src/foam/db/objectRegistry/objectRegistry.H index 5b0015c83..c6388dca2 100644 --- a/src/foam/db/objectRegistry/objectRegistry.H +++ b/src/foam/db/objectRegistry/objectRegistry.H @@ -51,11 +51,7 @@ namespace Foam class objectRegistry : public regIOobject, -#ifndef SWIG public HashTable -#else - public HashTable -#endif { // Private Data diff --git a/src/foam/dimensionedTypes/dimensionedType/dimensionedType.H b/src/foam/dimensionedTypes/dimensionedType/dimensionedType.H index 6b7c41c92..55d59a8b5 100644 --- a/src/foam/dimensionedTypes/dimensionedType/dimensionedType.H +++ b/src/foam/dimensionedTypes/dimensionedType/dimensionedType.H @@ -192,13 +192,11 @@ public: // IOstream operators -#ifndef SWIG friend Istream& operator>> (Istream&, dimensioned&); friend Ostream& operator<< (Ostream&, const dimensioned&); -#endif }; diff --git a/src/foam/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/foam/fields/DimensionedFields/DimensionedField/DimensionedField.H index 8d447462c..9c83b6312 100644 --- a/src/foam/fields/DimensionedFields/DimensionedField/DimensionedField.H +++ b/src/foam/fields/DimensionedFields/DimensionedField/DimensionedField.H @@ -173,13 +173,10 @@ public: ); //- Construct by transferring the DimensionedField - -#ifndef SWIG DimensionedField ( const Xfer >& ); -#endif //- Construct as copy of tmp deleting argument # ifdef ConstructFromTmp @@ -212,13 +209,11 @@ public: ); //- Construct by transferring the DimensionedField with a new name -#ifndef SWIG DimensionedField ( const word& newName, const Xfer >& ); -#endif //- Construct as copy resetting name # ifdef ConstructFromTmp @@ -325,7 +320,6 @@ public: // Ostream Operators -#ifndef SWIG friend Ostream& operator<< ( Ostream&, @@ -337,7 +331,6 @@ public: Ostream&, const tmp >& ); -#endif }; diff --git a/src/foam/fields/FieldFields/FieldField/FieldField.H b/src/foam/fields/FieldFields/FieldField/FieldField.H index 7fb2a3b9d..5c842ffe5 100644 --- a/src/foam/fields/FieldFields/FieldField/FieldField.H +++ b/src/foam/fields/FieldFields/FieldField/FieldField.H @@ -188,7 +188,6 @@ public: // IOstream operators -#ifndef SWIG friend Ostream& operator<< ( Ostream&, @@ -200,7 +199,6 @@ public: Ostream&, const tmp >& ); -#endif }; diff --git a/src/foam/fields/Fields/Field/Field.H b/src/foam/fields/Fields/Field/Field.H index 9d88ee96a..e5e7d5768 100644 --- a/src/foam/fields/Fields/Field/Field.H +++ b/src/foam/fields/Fields/Field/Field.H @@ -352,13 +352,11 @@ public: // IOstream operators -#ifndef SWIG friend Ostream& operator<< (Ostream&, const Field&); friend Ostream& operator<< (Ostream&, const tmp >&); -#endif }; diff --git a/src/foam/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/foam/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H index c834b274b..215659bc4 100644 --- a/src/foam/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/foam/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -237,7 +237,6 @@ public: // Declare run-time constructor selection tables -#ifndef SWIG declareRunTimeSelectionTable ( autoPtr, @@ -266,7 +265,6 @@ public: ), (name, dict, index, bm) ); -#endif // Constructors diff --git a/src/foam/primitives/VectorN/vector4/tensor4I.H b/src/foam/primitives/VectorN/vector4/tensor4I.H index 7b5f77ab0..215e8be8d 100644 --- a/src/foam/primitives/VectorN/vector4/tensor4I.H +++ b/src/foam/primitives/VectorN/vector4/tensor4I.H @@ -34,8 +34,6 @@ Description namespace Foam { -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/foam/primitives/VectorSpace/VectorSpace.H b/src/foam/primitives/VectorSpace/VectorSpace.H index a30b32216..16fd759b6 100644 --- a/src/foam/primitives/VectorSpace/VectorSpace.H +++ b/src/foam/primitives/VectorSpace/VectorSpace.H @@ -136,7 +136,6 @@ public: // IOstream Operators -#ifndef SWIG friend Istream& operator>> ( Istream&, @@ -148,7 +147,6 @@ public: Ostream&, const VectorSpace& ); -#endif };