Skip to content
Snippets Groups Projects
Commit c370d1fa authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: Parameter can't be instanciated anymore, HasValue() pure virtual

parent cfd3987b
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,6 @@ public:
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Defining ::New() static method */
itkNewMacro(Self);
/** RTTI support */
itkTypeMacro(Parameter, itk::Object);
......@@ -151,14 +148,11 @@ public:
{
}
virtual bool HasValue() const
{
itkExceptionMacro(<<"HasValue() method must be re-implemented by sub-classes.");
}
virtual bool HasValue() const = 0;
virtual bool HasUserValue() const
{
return HasValue() && m_UserValue;
return this->HasValue() && m_UserValue;
}
virtual void SetUserValue(bool isUserValue)
......
......@@ -70,6 +70,11 @@ public:
return m_Target;
}
bool HasValue() const override
{
return m_Target.first.IsNotNull();
}
protected:
ProxyParameter() {}
~ProxyParameter() ITK_OVERRIDE {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment