diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 857d4f6b48283b1188011ec852a7baa9a2c7d042..59c551b6f83b4099923ecb5a532dba612e66e0aa 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -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 @@ -29,12 +29,12 @@ License namespace Foam { -const char* const token::typeName = "token"; -token token::undefinedToken; + const char* const token::typeName = "token"; + token token::undefinedToken; -typedef token::compound tokenCompound; -defineTypeNameAndDebug(tokenCompound, 0); -defineRunTimeSelectionTable(tokenCompound, Istream); + typedef token::compound tokenCompound; + defineTypeNameAndDebug(tokenCompound, 0); + defineRunTimeSelectionTable(tokenCompound, Istream); } diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H index d2d9a39d7e5c32fa6f77696348c4e7b338830777..2f0383c9b25fd686e5a5c176a93f850ddd6c59b1 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenI.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H @@ -25,15 +25,9 @@ License #include <iostream> -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Clear any allocated storage (word or string) -inline void token::clear() +inline void Foam::token::clear() { if (type_ == WORD) { @@ -61,15 +55,14 @@ inline void token::clear() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct null -inline token::token() +inline Foam::token::token() : type_(UNDEFINED), lineNumber_(0) {} -// Construct as copy -inline token::token(const token& t) + +inline Foam::token::token(const token& t) : type_(t.type_), lineNumber_(t.lineNumber_) @@ -115,48 +108,48 @@ inline token::token(const token& t) } } -// Construct punctuation character token -inline token::token(punctuationToken p, label lineNumber) + +inline Foam::token::token(punctuationToken p, label lineNumber) : type_(PUNCTUATION), punctuationToken_(p), lineNumber_(lineNumber) {} -// Construct word token -inline token::token(const word& w, label lineNumber) + +inline Foam::token::token(const word& w, label lineNumber) : type_(WORD), wordTokenPtr_(new word(w)), lineNumber_(lineNumber) {} -// Construct string token -inline token::token(const string& s, label lineNumber) + +inline Foam::token::token(const string& s, label lineNumber) : type_(STRING), stringTokenPtr_(new string(s)), lineNumber_(lineNumber) {} -// Construct label token -inline token::token(const label l, label lineNumber) + +inline Foam::token::token(const label l, label lineNumber) : type_(LABEL), labelToken_(l), lineNumber_(lineNumber) {} -// Construct floatScalar token -inline token::token(const floatScalar s, label lineNumber) + +inline Foam::token::token(const floatScalar s, label lineNumber) : type_(FLOAT_SCALAR), floatScalarToken_(s), lineNumber_(lineNumber) {} -// Construct doubleScalar token -inline token::token(const doubleScalar s, label lineNumber) + +inline Foam::token::token(const doubleScalar s, label lineNumber) : type_(DOUBLE_SCALAR), doubleScalarToken_(s), @@ -166,8 +159,7 @@ inline token::token(const doubleScalar s, label lineNumber) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -// Delete token clearing the storage used by word or string -inline token::~token() +inline Foam::token::~token() { clear(); } @@ -175,37 +167,37 @@ inline token::~token() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline token::tokenType token::type() const +inline Foam::token::tokenType Foam::token::type() const { return type_; } -inline token::tokenType& token::type() +inline Foam::token::tokenType& Foam::token::type() { return type_; } -inline bool token::good() const +inline bool Foam::token::good() const { return (type_ != ERROR && type_ != UNDEFINED); } -inline bool token::undefined() const +inline bool Foam::token::undefined() const { return (type_ == UNDEFINED); } -inline bool token::error() const +inline bool Foam::token::error() const { return (type_ == ERROR); } -inline bool token::isPunctuation() const +inline bool Foam::token::isPunctuation() const { return (type_ == PUNCTUATION); } -inline token::punctuationToken token::pToken() const +inline Foam::token::punctuationToken Foam::token::pToken() const { if (type_ == PUNCTUATION) { @@ -218,12 +210,12 @@ inline token::punctuationToken token::pToken() const } } -inline bool token::isWord() const +inline bool Foam::token::isWord() const { return (type_ == WORD); } -inline const word& token::wordToken() const +inline const Foam::word& Foam::token::wordToken() const { if (type_ == WORD) { @@ -236,17 +228,17 @@ inline const word& token::wordToken() const } } -inline bool token::isVariable() const +inline bool Foam::token::isVariable() const { return (type_ == VARIABLE); } -inline bool token::isString() const +inline bool Foam::token::isString() const { return (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING); } -inline const string& token::stringToken() const +inline const Foam::string& Foam::token::stringToken() const { if (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING) { @@ -259,12 +251,12 @@ inline const string& token::stringToken() const } } -inline bool token::isLabel() const +inline bool Foam::token::isLabel() const { return (type_ == LABEL); } -inline label token::labelToken() const +inline Foam::label Foam::token::labelToken() const { if (type_ == LABEL) { @@ -277,12 +269,12 @@ inline label token::labelToken() const } } -inline bool token::isFloatScalar() const +inline bool Foam::token::isFloatScalar() const { return (type_ == FLOAT_SCALAR); } -inline floatScalar token::floatScalarToken() const +inline Foam::floatScalar Foam::token::floatScalarToken() const { if (type_ == FLOAT_SCALAR) { @@ -296,12 +288,12 @@ inline floatScalar token::floatScalarToken() const } -inline bool token::isDoubleScalar() const +inline bool Foam::token::isDoubleScalar() const { return (type_ == DOUBLE_SCALAR); } -inline doubleScalar token::doubleScalarToken() const +inline Foam::doubleScalar Foam::token::doubleScalarToken() const { if (type_ == DOUBLE_SCALAR) { @@ -315,12 +307,12 @@ inline doubleScalar token::doubleScalarToken() const } -inline bool token::isScalar() const +inline bool Foam::token::isScalar() const { return (type_ == FLOAT_SCALAR || type_ == DOUBLE_SCALAR); } -inline scalar token::scalarToken() const +inline Foam::scalar Foam::token::scalarToken() const { if (type_ == FLOAT_SCALAR) { @@ -337,12 +329,12 @@ inline scalar token::scalarToken() const } } -inline bool token::isNumber() const +inline bool Foam::token::isNumber() const { return (type_ == LABEL || isScalar()); } -inline scalar token::number() const +inline Foam::scalar Foam::token::number() const { if (type_ == LABEL) { @@ -359,12 +351,12 @@ inline scalar token::number() const } } -inline bool token::isCompound() const +inline bool Foam::token::isCompound() const { return (type_ == COMPOUND); } -inline const token::compound& token::compoundToken() const +inline const Foam::token::compound& Foam::token::compoundToken() const { if (type_ == COMPOUND) { @@ -378,18 +370,18 @@ inline const token::compound& token::compoundToken() const } -inline label token::lineNumber() const +inline Foam::label Foam::token::lineNumber() const { return lineNumber_; } -inline label& token::lineNumber() +inline Foam::label& Foam::token::lineNumber() { return lineNumber_; } -inline void token::setBad() +inline void Foam::token::setBad() { clear(); type_ = ERROR; @@ -398,7 +390,7 @@ inline void token::setBad() // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void token::operator=(const token& t) +inline void Foam::token::operator=(const token& t) { clear(); type_ = t.type_; @@ -446,59 +438,59 @@ inline void token::operator=(const token& t) lineNumber_ = t.lineNumber_; } -inline void token::operator=(const punctuationToken p) +inline void Foam::token::operator=(const punctuationToken p) { clear(); type_ = PUNCTUATION; punctuationToken_ = p; } -inline void token::operator=(word* wPtr) +inline void Foam::token::operator=(word* wPtr) { clear(); type_ = WORD; wordTokenPtr_ = wPtr; } -inline void token::operator=(const word& w) +inline void Foam::token::operator=(const word& w) { operator=(new word(w)); } -inline void token::operator=(string* sPtr) +inline void Foam::token::operator=(string* sPtr) { clear(); type_ = STRING; stringTokenPtr_ = sPtr; } -inline void token::operator=(const string& s) +inline void Foam::token::operator=(const string& s) { operator=(new string(s)); } -inline void token::operator=(const label l) +inline void Foam::token::operator=(const label l) { clear(); type_ = LABEL; labelToken_ = l; } -inline void token::operator=(const floatScalar s) +inline void Foam::token::operator=(const floatScalar s) { clear(); type_ = FLOAT_SCALAR; floatScalarToken_ = s; } -inline void token::operator=(const doubleScalar s) +inline void Foam::token::operator=(const doubleScalar s) { clear(); type_ = DOUBLE_SCALAR; doubleScalarToken_ = s; } -inline void token::operator=(token::compound* cPtr) +inline void Foam::token::operator=(Foam::token::compound* cPtr) { clear(); type_ = COMPOUND; @@ -506,7 +498,7 @@ inline void token::operator=(token::compound* cPtr) } -inline bool token::operator==(const token& t) const +inline bool Foam::token::operator==(const token& t) const { if (type_ != t.type_) { @@ -548,17 +540,17 @@ inline bool token::operator==(const token& t) const return false; } -inline bool token::operator==(const punctuationToken p) const +inline bool Foam::token::operator==(const punctuationToken p) const { return (type_ == PUNCTUATION && punctuationToken_ == p); } -inline bool token::operator==(const word& w) const +inline bool Foam::token::operator==(const word& w) const { return (type_ == WORD && wordToken() == w); } -inline bool token::operator==(const string& s) const +inline bool Foam::token::operator==(const string& s) const { return ( @@ -567,59 +559,55 @@ inline bool token::operator==(const string& s) const ); } -inline bool token::operator==(const label l) const +inline bool Foam::token::operator==(const label l) const { return (type_ == LABEL && labelToken_ == l); } -inline bool token::operator==(const floatScalar s) const +inline bool Foam::token::operator==(const floatScalar s) const { return (type_ == FLOAT_SCALAR && equal(floatScalarToken_, s)); } -inline bool token::operator==(const doubleScalar s) const +inline bool Foam::token::operator==(const doubleScalar s) const { return (type_ == DOUBLE_SCALAR && equal(doubleScalarToken_, s)); } -inline bool token::operator!=(const token& t) const +inline bool Foam::token::operator!=(const token& t) const { return !operator==(t); } -inline bool token::operator!=(const punctuationToken p) const +inline bool Foam::token::operator!=(const punctuationToken p) const { return !operator==(p); } -inline bool token::operator!=(const word& w) const +inline bool Foam::token::operator!=(const word& w) const { return !operator==(w); } -inline bool token::operator!=(const string& s) const +inline bool Foam::token::operator!=(const string& s) const { return !operator==(s); } -inline bool token::operator!=(const floatScalar s) const +inline bool Foam::token::operator!=(const floatScalar s) const { return !operator==(s); } -inline bool token::operator!=(const doubleScalar s) const +inline bool Foam::token::operator!=(const doubleScalar s) const { return !operator==(s); } -inline bool token::operator!=(const label l) const +inline bool Foam::token::operator!=(const label l) const { return !operator==(l); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/token/tokenList.H b/src/OpenFOAM/db/IOstreams/token/tokenList.H index a6f165cbbbd966645aa0a0131066168e93bbbf8d..5ee815ea781a40f20b9dcd78b25a7e965e107ce2 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenList.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenList.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 @@ -39,11 +39,9 @@ Description namespace Foam { - typedef List<token> tokenList; typedef List<token::tokenType> tokenTypeList; - -} // End namespace Foam +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H index 215a52542192b7bee0f78948776c35c48217b5e6..93147ece1d12c8d8a0e639d4ec847bbe3f11a267 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H @@ -63,7 +63,7 @@ inline Foam::SubDimensionedField<Type, GeoMesh>::SubDimensionedField const SubDimensionedField<Type, GeoMesh>& sfield ) : - refCount(), + tmp<SubDimensionedField<Type, GeoMesh>>::refCount(), SubField<Type>(sfield) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C index c26bdd03ac215d38f0d4d948dcb9ea4c719d51b7..2324b86e12217c14b3a7ab397de723c03eed4c1d 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C @@ -137,7 +137,7 @@ FieldField<Field, Type>::FieldField template<template<class> class Field, class Type> FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f) : - refCount(), + tmp<FieldField<Field, Type>>::refCount(), PtrList<Field<Type>>(f) {} @@ -145,7 +145,6 @@ FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f) template<template<class> class Field, class Type> FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reuse) : - refCount(), PtrList<Field<Type>>(f, reuse) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H index e63201e5b87ebd4a8e7d4b03ca23ac2f2b5c0696..40e3f2c24a2efc7c66f7e730e95d237717007e88 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H @@ -73,7 +73,7 @@ Ostream& operator<< template<template<class> class Field, class Type> class FieldField : - public refCount, + public tmp<FieldField<Field, Type>>::refCount, public PtrList<Field<Type>> { diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index e7e7479c1528326908307e22c4b85d676a188e59..4739e3fa3cfc03aaf9dd1286d92a0f9373758f62 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -196,7 +196,7 @@ Foam::Field<Type>::Field template<class Type> Foam::Field<Type>::Field(const Field<Type>& f) : - refCount(), + tmp<Field<Type>>::refCount(), List<Type>(f) {} diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index fd8a849c1d093db89388ede2c111f3e99ecc5587..1d69ef80da46a557538ae79eedddaca08ab32b15 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -77,7 +77,7 @@ class dictionary; template<class Type> class Field : - public refCount, + public tmp<Field<Type>>::refCount, public List<Type> { diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H index 4ebacc1feb500732ce7872c600d720a9d23d6163..ec3d1502953e76df15899dad93642a1d17e502fc 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubField.H +++ b/src/OpenFOAM/fields/Fields/Field/SubField.H @@ -58,7 +58,7 @@ template<class Type> class SubField; template<class Type> class SubField : - public refCount, + public tmp<SubField<Type>>::refCount, public SubList<Type> { diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H index e5ed14146dcea89c297dc1362381a1ca26f78b7d..796b2995c2260540d4c0050409aa57a1c76d7c05 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H @@ -74,7 +74,7 @@ inline Foam::SubField<Type>::SubField const SubField<Type>& sfield ) : - refCount(), + tmp<SubField<Type>>::refCount(), SubList<Type>(sfield) {} diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 72a49def8fea3f5a28e5cf07822cb265de0bd30b..bfa2e4abcff0a0a0c634d3647b95d6a83c31a809 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -77,6 +77,9 @@ class tmp public: + typedef Foam::refCount refCount; + + // Constructors //- Store object pointer diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index 33ef923403177c797f492720bf35ae384ffa2125..f369944c69efff40da3ed5b642c5324b00f59d22 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -157,8 +157,6 @@ class polyMesh; \*---------------------------------------------------------------------------*/ class mapPolyMesh -: - public refCount { // Private data diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H index ff8ea1f265096138ce561d37a3aafc2d9e21f28e..c8dcd8154bc907dffed17db67b7665e016afe00e 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H @@ -34,7 +34,6 @@ SourceFiles #ifndef mapSubsetMesh_H #define mapSubsetMesh_H -#include "refCount.H" #include "labelList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,8 +46,6 @@ namespace Foam \*---------------------------------------------------------------------------*/ class mapSubsetMesh -: - public refCount { // Private data diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C index 5b7cdafc0fee6d7c42478e984aab49b669a3241c..3654a7563e57b6b67e754c1c38768586199aec0e 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C @@ -31,7 +31,6 @@ License template<class Type> Foam::Function1<Type>::Function1(const word& entryName) : - refCount(), name_(entryName) {} @@ -39,7 +38,7 @@ Foam::Function1<Type>::Function1(const word& entryName) template<class Type> Foam::Function1<Type>::Function1(const Function1<Type>& de) : - refCount(), + tmp<Function1<Type>>::refCount(), name_(de.name_) {} @@ -62,9 +61,7 @@ const Foam::word& Foam::Function1<Type>::name() const template<class Type> void Foam::Function1<Type>::convertTimeBase(const Time&) -{ - // do nothing -} +{} template<class Type> diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H index a5c77c2527342131c2a710bfe54a06a83bbbe8cb..0e22404a44184dce094de817b755ed1a5e05b87f 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H @@ -61,7 +61,7 @@ template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&); template<class Type> class Function1 : - public refCount + public tmp<Function1<Type>>::refCount { // Private Member Functions diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index d3e257b0c2b59fb434ed1b630100550f3261344e..a3ba465414560a473682c7a5211a8925ad494e73 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -46,7 +46,7 @@ namespace fv template<class Type> convectionScheme<Type>::convectionScheme(const convectionScheme& cs) : - refCount(), + tmp<convectionScheme<Type>>::refCount(), mesh_(cs.mesh_) {} diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H index cab9dfdabdb7387233fc52513867e4583d8b1d3d..e0320fe74e7a346da8da8a84694d9ad5793871f5 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H @@ -64,7 +64,7 @@ namespace fv template<class Type> class convectionScheme : - public refCount + public tmp<convectionScheme<Type>>::refCount { // Private data diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H index afb104683335b5c0e75b401e00487bd45c0585cc..6d527df77191e32b4f95caaa1bbefa56a5b90cea 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H @@ -64,7 +64,7 @@ namespace fv template<class Type> class d2dt2Scheme : - public refCount + public tmp<d2dt2Scheme<Type>>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H index 3b42fef13429c1911bed73b548e3536074bd7c44..125ef04f6155f54669832c2bb0a86d83911a0896 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H @@ -64,7 +64,7 @@ namespace fv template<class Type> class ddtScheme : - public refCount + public tmp<ddtScheme<Type>>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H index 9ed6164477b3cccad54726028fa3b5a512a4ccd5..639d5c334f4cb731f1529eb5c125483f3ece29b9 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H @@ -64,7 +64,7 @@ namespace fv template<class Type> class divScheme : - public refCount + public tmp<divScheme<Type>>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H index 26522ce52fa72dc99aefc37636f86e4c18e24562..8abb81d5202ed23864b60a8207dec4b6f41b6466 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H @@ -60,7 +60,7 @@ namespace fv template<class Type> class gradScheme : - public refCount + public tmp<gradScheme<Type>>::refCount { // Private data diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H index a2c8431731da69a27b36960eac2a502d41803d93..a1c47c211c7ea5b9770df16b709a470cbec15dc5 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H @@ -65,7 +65,7 @@ namespace fv template<class Type, class GType> class laplacianScheme : - public refCount + public tmp<laplacianScheme<Type, GType>>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H index ae4dea3a1d99d47dffb139854e50cb1d5c8ec32d..a2a52e9a4dc64ece5e4fb061f687353c990d1383 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H @@ -60,7 +60,7 @@ namespace fv template<class Type> class snGradScheme : - public refCount + public tmp<snGradScheme<Type>>::refCount { // Private data @@ -70,6 +70,9 @@ class snGradScheme // Private Member Functions + //- Disallow copy construct + snGradScheme(const snGradScheme&); + //- Disallow default bitwise assignment void operator=(const snGradScheme&); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 799b5d2198863b7bfab9a0a72d3fdb19522d777c..41b7fae8a77c3671cbe811c72313318da58dd0e2 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -321,7 +321,7 @@ Foam::fvMatrix<Type>::fvMatrix template<class Type> Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm) : - refCount(), + tmp<fvMatrix<Type>>::refCount(), lduMatrix(fvm), psi_(fvm.psi_), dimensions_(fvm.dimensions_), @@ -351,7 +351,6 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm) template<class Type> Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm) : - refCount(), lduMatrix ( const_cast<fvMatrix<Type>&>(tfvm()), diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 6565f3a9b751d71f893124275ef1f52ecdf443c3..b06251fed52b02444ed90c40989624e4c3be250b 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -114,7 +114,7 @@ template<class T> class UIndirectList; template<class Type> class fvMatrix : - public refCount, + public tmp<fvMatrix<Type>>::refCount, public lduMatrix { // Private data diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H index 2279b55e1a20d7387eb4beed1127d443bf39becd..780fde611fd457707d1e4a60976b5234ee7df8b4 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H @@ -50,7 +50,7 @@ namespace Foam template<class Type> class multivariateSurfaceInterpolationScheme : - public refCount + public tmp<multivariateSurfaceInterpolationScheme<Type>>::refCount { public: diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H index 5f1e59f7167c582cb72591e9d67d83a4bdb888ed..4b1d0838a28922de57fcccc30f702a6af8488e44 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H @@ -55,7 +55,7 @@ class fvMesh; template<class Type> class surfaceInterpolationScheme : - public refCount + public tmp<surfaceInterpolationScheme<Type>>::refCount { // Private data