Generic Attribute. More...
#include <xmmAttribute.hpp>
Public Types | |
typedef std::function< void(AttributeBase *)> | AttributeChangeCallback |
Public Member Functions | |
template<typename U , typename args , class ListenerClass > | |
void | onAttributeChange (U *owner, void(ListenerClass::*listenerMethod)(args)) |
Attribute (T const &value=T(), T const &limit_min=defaultLimitMin(), T const &limit_max=defaultLimitMax()) | |
Default Constructor. More... | |
Attribute (Attribute const &src) | |
Copy Constructor. More... | |
template<typename U > | |
Attribute & | operator= (Attribute< U > const &src) |
Assignment operator. More... | |
void | set (T const &value, bool silently=false) |
Set the attribute value. More... | |
T | get () const |
get the attribute's current value More... | |
void | setLimitMin (T const &limit_min=defaultLimitMin()) |
set the attribute's minimum value More... | |
void | setLimitMax (T const &limit_max=defaultLimitMax()) |
set the attribute's maximum value More... | |
void | setLimits (T const &limit_min=defaultLimitMin(), T const &limit_max=defaultLimitMax()) |
set the attribute's limit values More... | |
Public Attributes | |
bool | changed |
Defines if the value has been changed. More... | |
Protected Member Functions | |
template<> | |
xmm::GaussianDistribution::CovarianceMode | defaultLimitMax () |
template<> | |
GaussianDistribution::CovarianceMode | defaultLimitMax () |
template<> | |
xmm::HMM::TransitionMode | defaultLimitMax () |
template<> | |
xmm::HMM::RegressionEstimator | defaultLimitMax () |
template<> | |
HMM::TransitionMode | defaultLimitMax () |
template<> | |
HMM::RegressionEstimator | defaultLimitMax () |
Static Protected Member Functions | |
static T | defaultLimitMin () |
Attribute default minimum value. More... | |
static T | defaultLimitMax () |
Attribute default maximum value. More... | |
Protected Attributes | |
T | value_ |
Current value of the attribute. More... | |
T | limit_min_ |
Minimum value of the attribute. More... | |
T | limit_max_ |
Maximum value of the attribute. More... | |
AttributeChangeCallback | callback_ |
Callback function to be called on attribute change. More... | |
Generic Attribute.
T | attribute type |
typedef std::function<void(AttributeBase*)> xmm::Attribute< T >::AttributeChangeCallback |
|
inline |
Default Constructor.
value | attribute value |
limit_min | minimum limit |
limit_max | maximum limit |
|
inline |
Copy Constructor.
src | source attribute |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlinestaticprotected |
Attribute default maximum value.
|
protected |
|
protected |
|
inlinestaticprotected |
Attribute default minimum value.
|
inline |
get the attribute's current value
|
inline |
|
inline |
Assignment operator.
src | source attribute |
|
inline |
Set the attribute value.
value | requested value |
silently | if true, don't notify the listener object |
domain_error | exception if the value exceeds the limits |
runtime_error | exception if the limit checking are not implemented for the current type |
|
inline |
set the attribute's maximum value
limit_max | maximum value |
|
inline |
set the attribute's minimum value
limit_min | minimum value |
|
inline |
set the attribute's limit values
limit_min | minimum value |
limit_max | maximum value |
|
protected |
Callback function to be called on attribute change.
|
inherited |
Defines if the value has been changed.
|
protected |
Maximum value of the attribute.
|
protected |
Minimum value of the attribute.
|
protected |
Current value of the attribute.