Skip to content

Commit

Permalink
COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
Browse files Browse the repository at this point in the history
Move `ITK_DISALLOW_COPY_AND_ASSIGN` calls to public section following
the discussion in
https://discourse.itk.org/t/noncopyable

If legacy (pre-macro) copy and assing methods existed, subsitute them
for the `ITK_DISALLOW_COPY_AND_ASSIGN` macro.
  • Loading branch information
Jon Haitz Legarreta authored and hjmjohnson committed Apr 14, 2018
1 parent 7e3d7df commit 3d07480
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
3 changes: 2 additions & 1 deletion include/itkErrorFunctionBase.h
Expand Up @@ -35,6 +35,8 @@ template<typename TMeasurementVector, typename TTargetVector>
class ErrorFunctionBase : public FunctionBase<TMeasurementVector, TTargetVector>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(ErrorFunctionBase);

/** Standard class type alias. */
using Self = ErrorFunctionBase;
using Superclass = FunctionBase<TMeasurementVector, TTargetVector>;
Expand Down Expand Up @@ -63,7 +65,6 @@ class ErrorFunctionBase : public FunctionBase<TMeasurementVector, TTargetVector>

private:

ITK_DISALLOW_COPY_AND_ASSIGN(ErrorFunctionBase);
};

} // end namespace itk
Expand Down
3 changes: 1 addition & 2 deletions include/itkInputFunctionBase.h
Expand Up @@ -34,6 +34,7 @@ template<typename TMeasurementVector, typename TTargetVector>
class InputFunctionBase : public FunctionBase<TMeasurementVector, TTargetVector>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(InputFunctionBase);

/** Standard class type alias. */
using Self = InputFunctionBase;
Expand Down Expand Up @@ -69,8 +70,6 @@ class InputFunctionBase : public FunctionBase<TMeasurementVector, TTargetVector>

private:

ITK_DISALLOW_COPY_AND_ASSIGN(InputFunctionBase);

};//class

} // end namespace Statistics
Expand Down
6 changes: 1 addition & 5 deletions include/itkNNetDistanceMetricBase.h
Expand Up @@ -34,6 +34,7 @@ template<typename TMeasurementVector>
class NNetDistanceMetricBase : public FunctionBase<TMeasurementVector, double>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(NNetDistanceMetricBase );

/** Standard class type alias. */
using Self = NNetDistanceMetricBase;
Expand Down Expand Up @@ -63,11 +64,6 @@ class NNetDistanceMetricBase : public FunctionBase<TMeasurementVector, double>
os << indent << "NNetDistanceMetricBase(" << this << ")" << std::endl;
Superclass::PrintSelf( os, indent );
}

private:

ITK_DISALLOW_COPY_AND_ASSIGN(NNetDistanceMetricBase );

};

} // end namespace Statistics
Expand Down
2 changes: 1 addition & 1 deletion include/itkRadialBasisFunctionBase.h
Expand Up @@ -35,6 +35,7 @@ template<typename ScalarType>
class RadialBasisFunctionBase : public FunctionBase<ScalarType,ScalarType>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(RadialBasisFunctionBase);

/** Standard class type alias. */
using Self = RadialBasisFunctionBase;
Expand Down Expand Up @@ -81,7 +82,6 @@ class RadialBasisFunctionBase : public FunctionBase<ScalarType,ScalarType>
ArrayType m_Center;
ScalarType m_Radius;

ITK_DISALLOW_COPY_AND_ASSIGN(RadialBasisFunctionBase);
};

} // end namespace Statistics
Expand Down
5 changes: 1 addition & 4 deletions include/itkSquaredDifferenceErrorFunction.h
Expand Up @@ -36,6 +36,7 @@ template<typename TMeasurementVector, typename ScalarType>
class ITK_TEMPLATE_EXPORT SquaredDifferenceErrorFunction : public ErrorFunctionBase<TMeasurementVector, ScalarType>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(SquaredDifferenceErrorFunction);

/** Standard class type alias. */
using Self = SquaredDifferenceErrorFunction;
Expand Down Expand Up @@ -64,10 +65,6 @@ class ITK_TEMPLATE_EXPORT SquaredDifferenceErrorFunction : public ErrorFunctionB
~SquaredDifferenceErrorFunction() override;

void PrintSelf( std::ostream& os, Indent indent ) const override;

private:
ITK_DISALLOW_COPY_AND_ASSIGN(SquaredDifferenceErrorFunction);

};

} // end namespace Statistics
Expand Down
2 changes: 1 addition & 1 deletion include/itkTransferFunctionBase.h
Expand Up @@ -35,6 +35,7 @@ template<typename ScalarType>
class TransferFunctionBase : public FunctionBase<ScalarType, ScalarType>
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(TransferFunctionBase);

/** Standard class type alias. */
using Self = TransferFunctionBase;
Expand Down Expand Up @@ -71,7 +72,6 @@ class TransferFunctionBase : public FunctionBase<ScalarType, ScalarType>

private:

ITK_DISALLOW_COPY_AND_ASSIGN(TransferFunctionBase);
};

} // end namespace Statistics
Expand Down

0 comments on commit 3d07480

Please sign in to comment.