Orocos Real-Time Toolkit
2.8.3
|
An attribute is a minimalistic, named placeholder for data. More...
#include <rtt/base/AttributeBase.hpp>
Public Member Functions | |
AttributeBase () | |
Create a nameless AttributeBase. More... | |
AttributeBase (const std::string &name) | |
Create an AttributeBase known by a name. More... | |
virtual | ~AttributeBase () |
const std::string & | getName () const |
Get the name of this instance. More... | |
void | setName (std::string const &new_name) |
Get the name of this instance. More... | |
bool | ready () const |
Returns true if the Attribute was correctly initialised. More... | |
virtual DataSourceBase::shared_ptr | getDataSource () const =0 |
Return a internal::DataSource which contains the same contents. More... | |
virtual AttributeBase * | clone () const =0 |
Returns a clone of this AttributeBase. More... | |
virtual AttributeBase * | copy (std::map< const DataSourceBase *, DataSourceBase * > &replacements, bool instantiate)=0 |
Returns a copy of this AttributeBase. More... | |
Protected Attributes | |
std::string | mname |
An attribute is a minimalistic, named placeholder for data.
It is a light-weight equivalent of a Property.
Definition at line 52 of file AttributeBase.hpp.
RTT::AttributeBase::AttributeBase | ( | ) |
Create a nameless AttributeBase.
Definition at line 46 of file Attribute.cpp.
RTT::AttributeBase::AttributeBase | ( | const std::string & | name | ) |
Create an AttributeBase known by a name.
name | The name. |
Definition at line 50 of file Attribute.cpp.
|
virtual |
Definition at line 55 of file Attribute.cpp.
|
pure virtual |
Returns a clone of this AttributeBase.
Implemented in RTT::Alias, RTT::Constant< T >, RTT::Attribute< T >, and RTT::scripting::SendHandleAlias.
Referenced by RTT::ConfigurationInterface::addAttribute(), RTT::ConfigurationInterface::addConstant(), RTT::scripting::FunctionGraph::FunctionGraph(), and RTT::scripting::ProgramGraphParser::parserUsed().
|
pure 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. |
Implemented in RTT::Alias, RTT::Constant< T >, RTT::Attribute< T >, and RTT::scripting::SendHandleAlias.
Referenced by RTT::scripting::FunctionGraph::copy().
|
pure virtual |
Return a internal::DataSource which contains the same contents.
Implemented in RTT::Alias, RTT::Constant< T >, RTT::Attribute< T >, and RTT::scripting::SendHandleAlias.
Referenced by RTT::ConfigurationInterface::addAttribute(), RTT::ConfigurationInterface::addConstant(), RTT::types::TypeInfo::construct(), RTT_corba_CConfigurationInterface_i::getAttribute(), RTT_corba_CConfigurationInterface_i::getAttributeDataSource(), RTT::scripting::ExpressionParser::getHandle(), RTT_corba_CConfigurationInterface_i::isAttributeAssignable(), RTT::Attribute< T >::operator=(), RTT::Constant< T >::operator=(), RTT::scripting::ProgramGraphParser::parserUsed(), RTT::scripting::FunctionFactory::produce(), RTT::internal::OperationCallerC::D::ret(), RTT::internal::OperationCallerC::ret(), RTT_corba_CConfigurationInterface_i::setAttribute(), RTT::ConfigurationInterface::setValue(), and RTT::scripting::ValueChangeParser::ValueChangeParser().
const std::string & RTT::AttributeBase::getName | ( | ) | const |
Get the name of this instance.
Definition at line 59 of file Attribute.cpp.
References mname.
Referenced by RTT::ConfigurationInterface::getAttributeNames(), RTT::ConfigurationInterface::getValue(), RTT::ConfigurationInterface::hasAttribute(), RTT::Attribute< T >::operator=(), RTT::Constant< T >::operator=(), RTT::ConfigurationInterface::removeValue(), and RTT::ConfigurationInterface::setValue().
|
inline |
Returns true if the Attribute was correctly initialised.
Definition at line 89 of file AttributeBase.hpp.
Referenced by RTT::ConfigurationInterface::addAttribute(), and RTT::ConfigurationInterface::addConstant().
void RTT::AttributeBase::setName | ( | std::string const & | new_name | ) |
Get the name of this instance.
Definition at line 64 of file Attribute.cpp.
References mname.
Referenced by RTT::ConfigurationInterface::addAttribute(), RTT::ConfigurationInterface::addConstant(), and RTT::scripting::ExpressionParser::getHandle().
|
protected |
Definition at line 55 of file AttributeBase.hpp.
Referenced by RTT::scripting::SendHandleAlias::clone(), RTT::Attribute< T >::clone(), RTT::Constant< T >::clone(), RTT::Alias::clone(), RTT::scripting::SendHandleAlias::copy(), RTT::Attribute< T >::copy(), RTT::Constant< T >::copy(), RTT::Alias::copy(), getName(), RTT::Attribute< T >::operator=(), RTT::Constant< T >::operator=(), and setName().