Added "= delete" to some disabled copy constructors and assignment operators

This commit is contained in:
Will Bainbridge
2020-07-31 14:58:32 +01:00
parent b8f9ed8062
commit b5ea22d339
19 changed files with 185 additions and 100 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -173,11 +173,6 @@ class SCOPE
// evaluated from the given equivalence ratio
tmp<volScalarField> Ma(const volScalarField& phi) const;
//- Construct as copy (not implemented)
SCOPE(const SCOPE&);
void operator=(const SCOPE&);
public:
@ -193,6 +188,9 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
SCOPE(const SCOPE&) = delete;
//- Destructor
~SCOPE();
@ -203,8 +201,14 @@ public:
//- Return the Markstein number
tmp<volScalarField> Ma() const;
// Member Operators
//- Return the laminar flame speed [m/s]
tmp<volScalarField> operator()() const;
//- Disallow default bitwise assignment
void operator=(const SCOPE&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -191,9 +191,6 @@ class blockMesh
void createCells() const;
void createPatches() const;
//- As copy (not implemented)
blockMesh(const blockMesh&);
public:
@ -213,6 +210,9 @@ public:
//- Construct from IOdictionary
blockMesh(const IOdictionary&, const word& regionName);
//- Disallow default bitwise copy construction
blockMesh(const blockMesh&) = delete;
//- Destructor
~blockMesh();
@ -286,6 +286,12 @@ public:
//- Writes edges of blockMesh in OBJ format.
void writeTopology(Ostream&) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const blockMesh&) = delete;
};

View File

@ -78,9 +78,6 @@ protected:
// Protected Member Functions
//- Construct as copy (not implemented)
basicThermo(const basicThermo&);
volScalarField& lookupOrConstruct
(
const fvMesh& mesh,
@ -130,6 +127,9 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
basicThermo(const basicThermo&) = delete;
// Selectors
@ -457,6 +457,12 @@ public:
//- Read thermophysical properties dictionary
virtual bool read();
// Member Operators
//- Disallow default bitwise assignment
void operator=(const basicThermo&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,9 +55,6 @@ class pureMixture
ThermoType mixture_;
//- Construct as copy (not implemented)
pureMixture(const pureMixture<ThermoType>&);
public:
@ -70,6 +67,9 @@ public:
//- Construct from dictionary, mesh and phase name
pureMixture(const dictionary&, const fvMesh&, const word&);
//- Disallow default bitwise copy construction
pureMixture(const pureMixture<ThermoType>&) = delete;
// Member Functions
@ -121,6 +121,12 @@ public:
//- Read dictionary
void read(const dictionary&);
// Member Operators
//- Disallow default bitwise assignment
void operator=(const pureMixture<ThermoType>&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,9 +57,6 @@ class hePsiThermo
//- Calculate the thermo variables
void calculate();
//- Construct as copy (not implemented)
hePsiThermo(const hePsiThermo<BasicPsiThermo, MixtureType>&);
public:
//- Runtime type information
@ -75,6 +72,9 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
hePsiThermo(const hePsiThermo<BasicPsiThermo, MixtureType>&) = delete;
//- Destructor
virtual ~hePsiThermo();
@ -84,6 +84,15 @@ public:
//- Update properties
virtual void correct();
// Member Operators
//- Disallow default bitwise assignment
void operator=
(
const hePsiThermo<BasicPsiThermo, MixtureType>&
) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,12 +63,6 @@ protected:
volScalarField mu_;
// Protected Member Functions
//- Construct as copy (not implemented)
psiThermo(const psiThermo&);
public:
//- Runtime type information
@ -95,6 +89,9 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
psiThermo(const psiThermo&) = delete;
//- Selector
static autoPtr<psiThermo> New
@ -134,6 +131,12 @@ public:
//- Dynamic viscosity of mixture for patch [kg/m/s]
virtual tmp<scalarField> mu(const label patchi) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const psiThermo&) = delete;
};

View File

@ -57,9 +57,6 @@ class heRhoThermo
//- Calculate the thermo variables
void calculate();
//- Construct as copy (not implemented)
heRhoThermo(const heRhoThermo<BasicRhoThermo, MixtureType>&);
public:
@ -76,6 +73,9 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
heRhoThermo(const heRhoThermo<BasicRhoThermo, MixtureType>&) = delete;
//- Destructor
virtual ~heRhoThermo();
@ -85,6 +85,15 @@ public:
//- Update properties
virtual void correct();
// Member Operators
//- Disallow default bitwise assignment
void operator=
(
const heRhoThermo<BasicRhoThermo, MixtureType>&
) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,12 +67,6 @@ protected:
volScalarField mu_;
// Protected Member Functions
//- Construct as copy (not implemented)
rhoThermo(const rhoThermo&);
public:
//- Runtime type information
@ -107,6 +101,9 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
rhoThermo(const rhoThermo&);
//- Selector
static autoPtr<rhoThermo> New
@ -148,6 +145,12 @@ public:
//- Dynamic viscosity of mixture for patch [kg/m/s]
virtual tmp<scalarField> mu(const label patchi) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const rhoThermo&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,8 +99,8 @@ public:
//- Construct from thermo
basicChemistryModel(const basicThermo& thermo);
//- Construct as copy (not implemented)
basicChemistryModel(const basicChemistryModel&);
//- Disallow default bitwise copy construction
basicChemistryModel(const basicChemistryModel&) = delete;
// Selectors

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,17 +93,13 @@ class Gulders
const volScalarField& phi
) const;
//- Construct as copy (not implemented)
Gulders(const Gulders&);
void operator=(const Gulders&);
public:
//- Runtime type information
TypeName("Gulders");
// Constructors
//- Construct from dictionary and psiuReactionThermo
@ -113,15 +109,21 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
Gulders(const Gulders&) = delete;
//- Destructor
virtual ~Gulders();
// Member Functions
// Member Operators
//- Return the laminar flame speed [m/s]
tmp<volScalarField> operator()() const;
//- Disallow default bitwise assignment
void operator=(const Gulders&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,17 +94,13 @@ class GuldersEGR
const volScalarField& egr
) const;
//- Construct as copy (not implemented)
GuldersEGR(const GuldersEGR&);
void operator=(const GuldersEGR&);
public:
//- Runtime type information
TypeName("GuldersEGR");
// Constructors
//- Construct from dictionary and psiuReactionThermo
@ -114,15 +110,21 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
GuldersEGR(const GuldersEGR&) = delete;
//- Destructor
virtual ~GuldersEGR();
// Member Functions
// Member Operators
//- Return the laminar flame speed [m/s]
tmp<volScalarField> operator()() const;
//- Disallow default bitwise assignment
void operator=(const GuldersEGR&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,16 +160,12 @@ class RaviPetersen
) const;
//- Construct as copy (not implemented)
RaviPetersen(const RaviPetersen&);
void operator=(const RaviPetersen&);
public:
//- Runtime type information
TypeName("RaviPetersen");
// Constructors
//- Construct from dictionary and psiuReactionThermo
@ -179,15 +175,21 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
RaviPetersen(const RaviPetersen&) = delete;
//- Destructor
virtual ~RaviPetersen();
// Member Functions
// Member Operators
//- Return the laminar flame speed [m/s]
tmp<volScalarField> operator()() const;
//- Disallow default bitwise assignment
void operator=(const RaviPetersen&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,18 +52,11 @@ class constant
:
public laminarFlameSpeed
{
// Const laminar flame speed
// Private Data
dimensionedScalar Su_;
// Private Member Functions
//- Construct as copy (not implemented)
constant(const constant&);
void operator=(const constant&);
public:
//- Runtime type information
@ -79,15 +72,21 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
constant(const constant&) = delete;
//- Destructor
virtual ~constant();
// Member Functions
// Member Operators
//- Return the laminar flame speed [m/s]
tmp<volScalarField> operator()() const;
//- Disallow default bitwise assignment
void operator=(const constant&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,6 @@ namespace Foam
class laminarFlameSpeed
{
protected:
// Protected data
@ -72,15 +71,6 @@ protected:
scalar equivalenceRatio_;
private:
// Private Member Functions
//- Construct as copy (not implemented)
laminarFlameSpeed(const laminarFlameSpeed&);
void operator=(const laminarFlameSpeed&);
public:
//- Runtime type information
@ -111,6 +101,9 @@ public:
const psiuReactionThermo&
);
//- Disallow default bitwise copy construction
laminarFlameSpeed(const laminarFlameSpeed&) = delete;
// Selector
@ -124,10 +117,13 @@ public:
virtual ~laminarFlameSpeed();
// Member Functions
// Member Operators
//- Return the laminar flame speed [m/s]
virtual tmp<volScalarField> operator()() const = 0;
//- Disallow default bitwise assignment
void operator=(const laminarFlameSpeed&) = delete;
};

View File

@ -73,9 +73,6 @@ class egrMixture
//- Residual gases
volScalarField& egr_;
//- Construct as copy (not implemented)
egrMixture(const egrMixture<ThermoType>&);
public:
@ -88,6 +85,9 @@ public:
//- Construct from dictionary, mesh and phaseName
egrMixture(const dictionary&, const fvMesh&, const word&);
//- Disallow default bitwise copy construction
egrMixture(const egrMixture<ThermoType>&) = delete;
//- Destructor
virtual ~egrMixture()
@ -176,6 +176,12 @@ public:
//- Return thermo based on index
const ThermoType& specieThermo(const label speciei) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const egrMixture<ThermoType>&) = delete;
};

View File

@ -61,9 +61,6 @@ class homogeneousMixture
mutable ThermoType mixture_;
//- Construct as copy (not implemented)
homogeneousMixture(const homogeneousMixture<ThermoType>&);
//- Regress variable
volScalarField& b_;
@ -79,6 +76,9 @@ public:
//- Construct from dictionary, mesh and phase name
homogeneousMixture(const dictionary&, const fvMesh&, const word&);
//- Disallow default bitwise copy construction
homogeneousMixture(const homogeneousMixture<ThermoType>&) = delete;
//- Destructor
virtual ~homogeneousMixture()
@ -134,6 +134,12 @@ public:
//- Return thermo based on index
const ThermoType& specieThermo(const label speciei) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const homogeneousMixture<ThermoType>&) = delete;
};

View File

@ -70,9 +70,6 @@ class inhomogeneousMixture
//- Regress variable
volScalarField& b_;
//- Construct as copy (not implemented)
inhomogeneousMixture(const inhomogeneousMixture<ThermoType>&);
public:
@ -85,6 +82,9 @@ public:
//- Construct from dictionary, mesh and phase name
inhomogeneousMixture(const dictionary&, const fvMesh&, const word&);
//- Disallow default bitwise copy construction
inhomogeneousMixture(const inhomogeneousMixture<ThermoType>&) = delete;
//- Destructor
virtual ~inhomogeneousMixture()
@ -165,6 +165,12 @@ public:
//- Return thermo based on index
const ThermoType& specieThermo(const label speciei) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const inhomogeneousMixture<ThermoType>&) = delete;
};

View File

@ -73,9 +73,6 @@ class veryInhomogeneousMixture
//- Regress variable
volScalarField& b_;
//- Construct as copy (not implemented)
veryInhomogeneousMixture(const veryInhomogeneousMixture<ThermoType>&);
public:
@ -93,6 +90,11 @@ public:
const word&
);
//- Disallow default bitwise copy construction
veryInhomogeneousMixture
(
const veryInhomogeneousMixture<ThermoType>&
) = delete;
//- Destructor
virtual ~veryInhomogeneousMixture()
@ -171,6 +173,12 @@ public:
//- Return thermo based on index
const ThermoType& specieThermo(const label speciei) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const veryInhomogeneousMixture<ThermoType>&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,6 @@ class heSolidThermo
//- Calculate the thermo variables
void calculate();
//- Construct as copy (not implemented)
heSolidThermo(const heSolidThermo<BasicSolidThermo, MixtureType>&);
public:
@ -83,6 +80,12 @@ public:
const word& phaseName
);
//- Disallow default bitwise copy construction
heSolidThermo
(
const heSolidThermo<BasicSolidThermo, MixtureType>&
) = delete;
//- Destructor
virtual ~heSolidThermo();
@ -110,6 +113,15 @@ public:
//- Anisotropic thermal conductivity [W/m/K]
virtual tmp<vectorField> Kappa(const label patchi) const;
// Member Operators
//- Disallow default bitwise assignment
void operator=
(
const heSolidThermo<BasicSolidThermo, MixtureType>&
) = delete;
};