Orocos Real-Time Toolkit  2.9.0
Public Member Functions | Protected Attributes | List of all members
RTT::base::AttributeBase Class Referenceabstract

An attribute is a minimalistic, named placeholder for data. More...

#include <rtt/base/AttributeBase.hpp>

Inheritance diagram for RTT::base::AttributeBase:
RTT::Alias RTT::Attribute< T > RTT::Constant< T > RTT::scripting::SendHandleAlias

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 AttributeBaseclone () const =0
 Returns a clone of this AttributeBase. More...
virtual AttributeBasecopy (std::map< const DataSourceBase *, DataSourceBase * > &replacements, bool instantiate)=0
 Returns a copy of this AttributeBase. More...

Protected Attributes

std::string mname

Detailed Description

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.

Constructor & Destructor Documentation

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.

nameThe name.

Definition at line 50 of file Attribute.cpp.

RTT::AttributeBase::~AttributeBase ( )

Definition at line 55 of file Attribute.cpp.

Member Function Documentation

virtual AttributeBase* RTT::base::AttributeBase::clone ( ) const
pure virtual
virtual AttributeBase* RTT::base::AttributeBase::copy ( std::map< const DataSourceBase *, DataSourceBase * > &  replacements,
bool  instantiate 
pure virtual

Returns a copy of this AttributeBase.

Uses the given replacements to copy held DataSources.

instantiateSet 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().

virtual DataSourceBase::shared_ptr RTT::base::AttributeBase::getDataSource ( ) const
pure virtual
const std::string & RTT::AttributeBase::getName ( ) const
bool RTT::base::AttributeBase::ready ( ) const

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.

the name

Definition at line 64 of file Attribute.cpp.

References mname.

Referenced by RTT::ConfigurationInterface::addAttribute(), RTT::ConfigurationInterface::addConstant(), and RTT::scripting::ExpressionParser::getHandle().

Member Data Documentation

std::string RTT::base::AttributeBase::mname

The documentation for this class was generated from the following files: