As opposed to a Attribute, a Constant can not be assigned to a new value after creation. More...
#include <rtt/Attribute.hpp>
Public Member Functions | |
Constant (const std::string &name, T t) | |
Create a constant with a fixed value t. | |
Constant (const std::string &name, DataSource< T > *d) | |
Create a constant wich holds a DataSource d. | |
Constant (AttributeBase *ab) | |
Create a constant which mirrors an Attribute. | |
Constant< T > & | operator= (AttributeBase *ab) |
Initialise an Attribute which mirrors an AttributeBase. | |
T | get () const |
Get the value of this Constant. | |
DataSourceBase::shared_ptr | getDataSource () const |
Return a DataSource which contains the same contents. | |
Constant< T > * | clone () const |
Returns a clone of this AttributeBase. | |
Constant< 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. | |
Public Attributes | |
DataSource< T >::shared_ptr | data |
Protected Attributes | |
std::string | mname |
As opposed to a Attribute, a Constant can not be assigned to a new value after creation.
Definition at line 216 of file Attribute.hpp.
RTT::Constant< T >::Constant | ( | AttributeBase * | ab | ) | [inline] |
Create a constant which mirrors an Attribute.
If successful, this constant will always have the same value as ab. In case ab is non constant, it is not accepted.
Definition at line 247 of file Attribute.hpp.
Constant<T>* RTT::Constant< 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 RTT::AttributeBase.
Definition at line 294 of file Attribute.hpp.
const std::string& RTT::AttributeBase::getName | ( | ) | const [inherited] |
Get the name of this instance.
Constant<T>& RTT::Constant< T >::operator= | ( | AttributeBase * | ab | ) | [inline] |
Initialise an Attribute which mirrors an AttributeBase.
If successful, this constant will always have the same value as ab. In case ab is non constant, it is not accepted.
Definition at line 264 of file Attribute.hpp.