BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
IParameter ()=delete | |
IParameter (const std::string &name, T *data, const std::string &parent_name, const std::function< void()> &onChange) | |
virtual | ~IParameter ()=default |
virtual IParameter * | clone (const std::string &new_name="") const =0 |
virtual bool | isNull () const |
T & | getData () const |
void | setData (T &data) |
bool | hasSameData (const IParameter &other) |
const std::string & | getName () const |
Protected Member Functions | |
std::string | fullName () const |
Protected Attributes | |
const std::string | m_name |
T * | m_data |
const std::string | m_parent_name |
const std::function< void()> | m_onChange |
Pure virtual base class for parameter wrapper classes RealParameter, ComponentParameter.
Holds a pointer to the wrapped parameter, a name, and a callback function to be called when the parameter is changed. This class is templated on the data type of the wrapped parameter.
Definition at line 28 of file IParameter.h.
|
delete |
IParameter< T >::IParameter | ( | const std::string & | name, |
T * | data, | ||
const std::string & | parent_name, | ||
const std::function< void()> & | onChange | ||
) |
|
virtualdefault |
|
pure virtual |
Implemented in RealParameter.
|
inlinevirtual |
Returns true if wrapped parameter was not initialized with proper real value.
Definition at line 39 of file IParameter.h.
References IParameter< T >::m_data.
|
inline |
Definition at line 41 of file IParameter.h.
References IParameter< T >::m_data.
Referenced by IParameter< T >::hasSameData().
|
inline |
Definition at line 42 of file IParameter.h.
References IParameter< T >::m_data, and IParameter< T >::m_onChange.
bool IParameter< T >::hasSameData | ( | const IParameter< T > & | other | ) |
Returns true if two parameters are pointing to the same raw data.
Definition at line 72 of file IParameter.h.
References IParameter< T >::getData().
|
inline |
Definition at line 49 of file IParameter.h.
References IParameter< T >::m_name.
Referenced by ParameterPool::addParameter().
|
inlineprotected |
For use in error messages.
Definition at line 58 of file IParameter.h.
References IParameter< T >::m_name, and IParameter< T >::m_parent_name.
|
protected |
Definition at line 52 of file IParameter.h.
Referenced by IParameter< T >::fullName(), and IParameter< T >::getName().
|
protected |
Definition at line 53 of file IParameter.h.
Referenced by IParameter< T >::getData(), IParameter< T >::IParameter(), IParameter< T >::isNull(), and IParameter< T >::setData().
|
protected |
Definition at line 54 of file IParameter.h.
Referenced by IParameter< T >::fullName().
|
protected |
Definition at line 55 of file IParameter.h.
Referenced by IParameter< T >::setData().