STYLE: adjust codeTemplates to use '= delete'

This commit is contained in:
Mark Olesen 2018-04-19 07:38:31 +02:00
parent 367ddb8f05
commit ef922b6917
4 changed files with 21 additions and 25 deletions

View File

@ -44,7 +44,7 @@ ${codeInclude}
namespace Foam
{
// Forward declaration of classes
// Forward declarations
class fvMesh;
/*---------------------------------------------------------------------------*\
@ -66,11 +66,11 @@ class ${typeName}FunctionObject
const fvMesh& mesh() const;
//- Disallow default bitwise copy construct
${typeName}FunctionObject(const ${typeName}FunctionObject&);
//- No copy construct
${typeName}FunctionObject(const ${typeName}FunctionObject&) = delete;
//- Disallow default bitwise assignment
void operator=(const ${typeName}FunctionObject&);
//- No copy assignment
void operator=(const ${typeName}FunctionObject&) = delete;
public:
@ -97,7 +97,7 @@ public:
// Member Functions
//- Read the system calls
virtual bool read(const dictionary&);
virtual bool read(const dictionary& dict);
//- Execute the "executeCalls" at each time-step
virtual bool execute();

View File

@ -91,10 +91,10 @@ class FUNCTIONOBJECT
// Private Member Functions
//- Disallow default bitwise copy construct
//- No copy construct
FUNCTIONOBJECT(const FUNCTIONOBJECT&);
//- Disallow default bitwise assignment
//- No copy assignment
void operator=(const FUNCTIONOBJECT&);
@ -122,7 +122,7 @@ public:
// Member Functions
//- Read the FUNCTIONOBJECT data
virtual bool read(const dictionary&);
virtual bool read(const dictionary& dict);
//- Execute, currently does nothing
virtual bool execute();

View File

@ -43,11 +43,10 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
// Forward declarations
class Istream;
class Ostream;
// Forward declaration of friend functions and operators
class CLASSNAME;
Istream& operator>>(Istream&, CLASSNAME&);
Ostream& operator<<(Ostream&, const CLASSNAME&);
@ -69,11 +68,11 @@ class CLASSNAME
// Private Member Functions
//- Disallow default bitwise copy construct
CLASSNAME(const CLASSNAME&);
//- No copy construct
CLASSNAME(const CLASSNAME&) = delete;
//- Disallow default bitwise assignment
void operator=(const CLASSNAME&);
//- No copy assignment
void operator=(const CLASSNAME&) = delete;
public:
@ -93,7 +92,7 @@ public:
CLASSNAME(const dataType& data);
//- Construct from Istream
CLASSNAME(Istream&);
CLASSNAME(Istream& is);
//- Construct as copy
CLASSNAME(const CLASSNAME&);

View File

@ -43,12 +43,9 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
// Forward declarations
class someClass;
// Forward declaration of friend functions and operators
template<TemplateClassArgument>
class CLASSNAME;
@ -75,11 +72,11 @@ class CLASSNAME
// Private Member Functions
//- Disallow default bitwise copy construct
CLASSNAME(const CLASSNAME<TemplateArgument>&);
//- No copy construct
CLASSNAME(const CLASSNAME<TemplateArgument>&) = delete;
//- Disallow default bitwise assignment
void operator=(const CLASSNAME<TemplateArgument>&);
//- No copy assignment
void operator=(const CLASSNAME<TemplateArgument>&) = delete;
public:
@ -99,7 +96,7 @@ public:
CLASSNAME(const dataType& data);
//- Construct from Istream
CLASSNAME(Istream&);
CLASSNAME(Istream& is);
//- Construct as copy
CLASSNAME(const CLASSNAME<TemplateArgument>&);