Orocos Real-Time Toolkit
2.6.0
|
This class is the most basic Attribute implementation (only suitable for reading a internal::DataSource), does not allow any assignment, just stores a internal::DataSourceBase, and returns it. More...
#include <rtt/Attribute.hpp>
Public Member Functions | |
Alias (const std::string &name, base::DataSourceBase::shared_ptr d) | |
template<class Owner > | |
Alias (const std::string &name, base::DataSourceBase::shared_ptr d, Owner owner) | |
Create an alias from a datasource with an owner. | |
base::DataSourceBase::shared_ptr | getDataSource () const |
Return a internal::DataSource which contains the same contents. | |
Alias * | clone () const |
Returns a clone of this AttributeBase. | |
Alias * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &replacements, bool) |
Returns a copy of this AttributeBase. | |
const std::string & | getName () const |
Get the name of this instance. | |
void | setName (std::string const &new_name) |
Get the name of this instance. | |
bool | ready () const |
Returns true if the Attribute was correctly initialised. | |
Protected Attributes | |
std::string | mname |
This class is the most basic Attribute implementation (only suitable for reading a internal::DataSource), does not allow any assignment, just stores a internal::DataSourceBase, and returns it.
This also makes it useful as an alias of temporary expressions like literal values, and rhs expressions.
Definition at line 375 of file Attribute.hpp.
RTT::Alias::Alias | ( | const std::string & | name, |
base::DataSourceBase::shared_ptr | d, | ||
Owner | owner | ||
) | [inline] |
Create an alias from a datasource with 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. |
d | The aliased data source. |
o | The owner, which has a function 'addAttribute(AttributeBase*)'. |
Definition at line 392 of file Attribute.hpp.
Alias * RTT::Alias::copy | ( | std::map< const base::DataSourceBase *, base::DataSourceBase * > & | replacements, |
bool | instantiate | ||
) | [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::base::AttributeBase.
Definition at line 84 of file Attribute.cpp.
const std::string & RTT::AttributeBase::getName | ( | ) | const [inherited] |
Get the name of this instance.
Definition at line 59 of file Attribute.cpp.
Referenced by RTT::ConfigurationInterface::getAttributeNames(), RTT::ConfigurationInterface::hasAttribute(), RTT::Attribute< T >::operator=(), RTT::Constant< T >::operator=(), RTT::ConfigurationInterface::removeValue(), and RTT::ConfigurationInterface::setValue().
void RTT::AttributeBase::setName | ( | std::string const & | new_name | ) | [inherited] |
Get the name of this instance.
Definition at line 64 of file Attribute.cpp.
Referenced by RTT::ConfigurationInterface::addAttribute(), and RTT::ConfigurationInterface::addConstant().