Wavelet - A library for online estimation of the Continuous Wavelet Transform  0.1-alpha
All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
wavelet::Attribute< T > Class Template Reference

Generic Attribute. More...

#include <attribute.hpp>

Public Member Functions

 Attribute (AttributeHandler *parent=nullptr, T const &value=T(), T const &limit_min=default_limit_min(), T const &limit_max=default_limit_max())
 Default Constructor. More...
 
 Attribute (Attribute const &src)
 Copy Constructor. More...
 
template<typename U >
Attributeoperator= (Attribute< U > const &src)
 Assignment operator. More...
 
virtual ~Attribute ()
 Destructor.
 
void set (T const &value, bool silently=false)
 Set the attribute value. More...
 
get () const
 get the attribute's current value More...
 
getCopy () const
 get a copy of the attribute's current value More...
 
void set_limit_min (T const &limit_min=default_limit_min())
 set the attribute's minimum value More...
 
void set_limit_max (T const &limit_max=default_limit_max())
 set the attribute's maximum value More...
 
void set_limits (T const &limit_min=default_limit_min(), T const &limit_max=default_limit_max())
 set the attribute's limit values More...
 
void set_parent (AttributeHandler *parent)
 set the parent to receive change notifications More...
 
AttributeHandler * get_parent () const
 get the parent to receive change notifications More...
 

Detailed Description

template<typename T>
class wavelet::Attribute< T >

Generic Attribute.

Template Parameters
Tattribute type

Constructor & Destructor Documentation

template<typename T>
wavelet::Attribute< T >::Attribute ( AttributeHandler *  parent = nullptr,
T const &  value = T(),
T const &  limit_min = default_limit_min(),
T const &  limit_max = default_limit_max() 
)
inline

Default Constructor.

Parameters
parentparent attribute handler (notified at attribute changes)
valueattribute value
limit_minminimum limit
limit_maxmaximum limit
template<typename T>
wavelet::Attribute< T >::Attribute ( Attribute< T > const &  src)
inline

Copy Constructor.

Parameters
srcsource attribute
Warning
Also copies the attribute's parent object

Member Function Documentation

template<typename T>
T wavelet::Attribute< T >::get ( ) const
inline

get the attribute's current value

Returns
the attribute's current value
template<typename T>
AttributeHandler* wavelet::Attribute< T >::get_parent ( ) const
inline

get the parent to receive change notifications

Returns
parent object
template<typename T>
T wavelet::Attribute< T >::getCopy ( ) const
inline

get a copy of the attribute's current value

Returns
a copy of the attribute's current value
template<typename T>
template<typename U >
Attribute& wavelet::Attribute< T >::operator= ( Attribute< U > const &  src)
inline

Assignment operator.

Parameters
srcsource attribute
Returns
copy of the source Attribute object
Warning
Also copies the attribute's parent object
template<typename T>
void wavelet::Attribute< T >::set ( T const &  value,
bool  silently = false 
)
inline

Set the attribute value.

Parameters
valuerequested value
silentlyif true, don't notify the parent object
Exceptions
domain_errorexception if the value exceeds the limits
runtime_errorexception if the limit checking are not implemented for the current type
template<typename T>
void wavelet::Attribute< T >::set_limit_max ( T const &  limit_max = default_limit_max())
inline

set the attribute's maximum value

Parameters
limit_maxmaximum value
template<typename T>
void wavelet::Attribute< T >::set_limit_min ( T const &  limit_min = default_limit_min())
inline

set the attribute's minimum value

Parameters
limit_minminimum value
template<typename T>
void wavelet::Attribute< T >::set_limits ( T const &  limit_min = default_limit_min(),
T const &  limit_max = default_limit_max() 
)
inline

set the attribute's limit values

Parameters
limit_minminimum value
limit_maxmaximum value
template<typename T>
void wavelet::Attribute< T >::set_parent ( AttributeHandler *  parent)
inline

set the parent to receive change notifications

Parameters
parentparent object

The documentation for this class was generated from the following file: