#include <Attribute.hpp>
Public Member Functions | |
Constant< T > * | clone () const |
Constant () | |
Constant (const std::string &name, T t) | |
template<class Owner > | |
Constant (const std::string &name, T t, Owner owner) | |
Constant (const std::string &name, internal::DataSource< T > *d) | |
Constant (base::AttributeBase *ab) | |
Constant< T > * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &replacements, bool instantiate) |
T | get () const |
base::DataSourceBase::shared_ptr | getDataSource () const |
Constant< T > & | operator= (base::AttributeBase *ab) |
Public Attributes | |
internal::DataSource< T > ::shared_ptr | data |
As opposed to a Attribute, a Constant can not be assigned to a new value after creation.
Definition at line 249 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | ) | [inline] |
Create a Constant with no name and no value.
Definition at line 258 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | const std::string & | name, |
T | t | ||
) | [inline] |
Create a constant with a fixed value t.
name | The name of this instance. |
t | The value for initialisation. |
Definition at line 267 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | const std::string & | name, |
T | t, | ||
Owner | owner | ||
) | [inline] |
Create a constant with a fixed value t and an owner. The owner is used to register this attribute to and is supposed to be a pointer (or shared pointer).
name | The name of this instance. |
t | The value for initialisation. |
o | The owner, which has a function 'addAttribute(AttributeBase*)'. |
Definition at line 283 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | const std::string & | name, |
internal::DataSource< T > * | d | ||
) | [inline] |
Create a constant wich holds a internal::DataSource d.
Definition at line 293 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | base::AttributeBase * | ab | ) | [inline] |
Create a constant which mirrors an Attribute. If successful, this constant will always have the same value as ab.
ab | The attribute to mirror. If null, this will clear this attribute and clear its name. |
Definition at line 307 of file Attribute.hpp.
Constant<T>* RTT::Constant< T >::clone | ( | ) | const [inline, virtual] |
Returns a clone of this AttributeBase.
Implements RTT::base::AttributeBase.
Definition at line 354 of file Attribute.hpp.
Constant<T>* RTT::Constant< T >::copy | ( | std::map< const base::DataSourceBase *, base::DataSourceBase * > & | replacements, |
bool | instantiate | ||
) | [inline] |
Definition at line 359 of file Attribute.hpp.
T RTT::Constant< T >::get | ( | ) | const [inline] |
Get the value of this Constant.
Definition at line 344 of file Attribute.hpp.
base::DataSourceBase::shared_ptr RTT::Constant< T >::getDataSource | ( | ) | const [inline, virtual] |
Return a internal::DataSource which contains the same contents.
Implements RTT::base::AttributeBase.
Definition at line 349 of file Attribute.hpp.
Constant<T>& RTT::Constant< T >::operator= | ( | base::AttributeBase * | ab | ) | [inline] |
Initialise an Attribute which mirrors an AttributeBase. If successful, this constant will always have the same value as ab.
ab | The attribute to mirror. If null, this will clear this attribute and clear its name. |
Definition at line 321 of file Attribute.hpp.
internal::DataSource<T>::shared_ptr RTT::Constant< T >::data |
Definition at line 253 of file Attribute.hpp.