#include <rtt/Attribute.hpp>

| T | The type of data this attribute holds. |
Definition at line 55 of file Attribute.hpp.
Public Member Functions | |
| Attribute () | |
| Create an Attribute with no name and no value. | |
| Attribute (const std::string &name) | |
| Create an Attribute with a given name and a default value. | |
| Attribute (const std::string &name, T t) | |
| Create an Attribute with a name and a given value t. | |
| Attribute (const std::string &name, AssignableDataSource< T > *d) | |
| Create an Attribute which uses a DataSource d. | |
| Attribute (const Attribute< T > &a) | |
| Copy constructor copies both name and deep copy of the data. | |
| Attribute< T > & | operator= (const Attribute< T > &a) |
| Assignment copies both name and deep copy of the data. | |
| Attribute (AttributeBase *ab) | |
| Create an Attribute which mirrors a AttributeBase ab. | |
| Attribute< T > & | operator= (AttributeBase *ab) |
| Initialise an Attribute which mirrors an AttributeBase ab. | |
| T | get () const |
| Get the value of this Attribute. | |
| void | set (T t) |
| Set the value of this Attribute. | |
|
AssignableDataSource < T >::reference_t | set () |
| Set the value of this Attribute. | |
| DataSourceBase::shared_ptr | getDataSource () const |
| Return a DataSource which contains the same contents. | |
|
AssignableDataSource < T >::shared_ptr | getAssignableDataSource () const |
| Attribute< T > * | clone () const |
| Returns a clone of this AttributeBase. | |
| Attribute< T > * | copy (std::map< const DataSourceBase *, DataSourceBase * > &replacements, bool instantiate) |
| Returns a copy of this AttributeBase. | |
| const std::string & | getName () const |
| Get the name of this instance. | |
| bool | ready () const |
| Returns true if the Attribute was correctly initialised. | |
Protected Attributes | |
| std::string | mname |
| Attribute | ( | const std::string & | name | ) | [inline] |
Create an Attribute with a given name and a default value.
| name | The name of this instance. |
Definition at line 73 of file Attribute.hpp.
| Attribute | ( | const std::string & | name, | |
| T | t | |||
| ) | [inline, explicit] |
Create an Attribute with a name and a given value t.
| name | The name of this instance. | |
| t | The value for initialisation. |
Definition at line 84 of file Attribute.hpp.
| Attribute | ( | const std::string & | name, | |
| AssignableDataSource< T > * | d | |||
| ) | [inline] |
Create an Attribute which uses a DataSource d.
| name | The name | |
| d | The data source to read from and write to. |
Definition at line 96 of file Attribute.hpp.
| Attribute | ( | AttributeBase * | ab | ) | [inline] |
Create an Attribute which mirrors a AttributeBase ab.
If successful, this attribute will always have the same value as ab and vice versa.
| ab | The Attribute to mirror. |
Definition at line 131 of file Attribute.hpp.
| Attribute<T>& operator= | ( | AttributeBase * | ab | ) | [inline] |
Initialise an Attribute which mirrors an AttributeBase ab.
If successful, this attribute will always have the same value as ab and vice versa.
Definition at line 143 of file Attribute.hpp.
References Attribute::getAssignableDataSource(), AttributeBase::getName(), and AttributeBase::mname.
| Attribute<T>* copy | ( | std::map< const DataSourceBase *, DataSourceBase * > & | replacements, | |
| bool | instantiate | |||
| ) | [inline, virtual] |
Returns a copy of this AttributeBase.
Uses the given replacements to copy held DataSources.
| instantiate | Set to true to get a copy which will return itself on any future copy request. |
Implements AttributeBase.
Definition at line 194 of file Attribute.hpp.
References AttributeBase::mname.
| const std::string & getName | ( | ) | const [inherited] |
Get the name of this instance.
Definition at line 56 of file Attribute.cpp.
References AttributeBase::mname.
Referenced by AttributeRepository::getAttributes(), AttributeRepository::getValue(), AttributeRepository::hasAttribute(), Constant::operator=(), Attribute::operator=(), and AttributeRepository::removeValue().
1.5.3