codeTemplates/BC: Updated constructors to disallow copy without setting internal field reference
This commit is contained in:
@ -74,7 +74,7 @@ CONSTRUCT
|
|||||||
:
|
:
|
||||||
PARENT(p, iF),
|
PARENT(p, iF),
|
||||||
scalarData_(dict.lookup<scalar>("scalarData")),
|
scalarData_(dict.lookup<scalar>("scalarData")),
|
||||||
data_(pTraits<TYPE>(dict.lookup("data"))),
|
data_(dict.lookup<TYPE>("data")),
|
||||||
fieldData_("fieldData", dict, p.size()),
|
fieldData_("fieldData", dict, p.size()),
|
||||||
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
||||||
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
|
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
|
||||||
@ -121,24 +121,6 @@ CONSTRUCT
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::CLASS::
|
|
||||||
CONSTRUCT
|
|
||||||
(
|
|
||||||
const CLASS& ptf
|
|
||||||
)
|
|
||||||
:
|
|
||||||
PARENT(ptf),
|
|
||||||
scalarData_(ptf.scalarData_),
|
|
||||||
data_(ptf.data_),
|
|
||||||
fieldData_(ptf.fieldData_),
|
|
||||||
timeVsData_(ptf.timeVsData_, false),
|
|
||||||
wordData_(ptf.wordData_),
|
|
||||||
labelData_(-1),
|
|
||||||
boolData_(ptf.boolData_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::CLASS::
|
Foam::CLASS::
|
||||||
CONSTRUCT
|
CONSTRUCT
|
||||||
|
|||||||
@ -161,16 +161,7 @@ public:
|
|||||||
CONSTRUCT
|
CONSTRUCT
|
||||||
(
|
(
|
||||||
const CLASS&
|
const CLASS&
|
||||||
);
|
) = delete;
|
||||||
|
|
||||||
//- Construct and return a clone
|
|
||||||
virtual tmp<FVPATCHF> clone() const
|
|
||||||
{
|
|
||||||
return tmp<FVPATCHF>
|
|
||||||
(
|
|
||||||
new CLASS(*this)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Copy constructor setting internal field reference
|
//- Copy constructor setting internal field reference
|
||||||
CONSTRUCT
|
CONSTRUCT
|
||||||
|
|||||||
Reference in New Issue
Block a user