Generic Attribute.
More...
#include <attribute.hpp>
|
| 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 > |
Attribute & | operator= (Attribute< U > const &src) |
| Assignment operator. More...
|
|
virtual | ~Attribute () |
| Destructor.
|
|
void | set (T const &value, bool silently=false) |
| Set the attribute value. More...
|
|
T | get () const |
| get the attribute's current value More...
|
|
T | 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...
|
|
template<typename T>
class wavelet::Attribute< T >
Generic Attribute.
- Template Parameters
-
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
-
parent | parent attribute handler (notified at attribute changes) |
value | attribute value |
limit_min | minimum limit |
limit_max | maximum limit |
Copy Constructor.
- Parameters
-
- Warning
- Also copies the attribute's parent object
get the attribute's current value
- Returns
- the attribute's current value
get the parent to receive change notifications
- Returns
- parent object
get a copy of the attribute's current value
- Returns
- a copy of the attribute's current value
template<typename T>
template<typename U >
Assignment operator.
- Parameters
-
- Returns
- copy of the source Attribute object
- Warning
- Also copies the attribute's parent object
Set the attribute value.
- Parameters
-
value | requested value |
silently | if true, don't notify the parent object |
- Exceptions
-
domain_error | exception if the value exceeds the limits |
runtime_error | exception if the limit checking are not implemented for the current type |
set the attribute's maximum value
- Parameters
-
set the attribute's minimum value
- Parameters
-
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_min | minimum value |
limit_max | maximum value |
set the parent to receive change notifications
- Parameters
-
The documentation for this class was generated from the following file: