Orocos Real-Time Toolkit  2.6.0
Public Member Functions | Protected Attributes
RTT::Alias Class Reference

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>

Inheritance diagram for RTT::Alias:
RTT::base::AttributeBase

List of all members.

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.
Aliasclone () const
 Returns a clone of this AttributeBase.
Aliascopy (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

Detailed Description

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.


Constructor & Destructor Documentation

template<class Owner >
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).

Parameters:
nameThe name of this instance.
dThe aliased data source.
oThe owner, which has a function 'addAttribute(AttributeBase*)'.

Definition at line 392 of file Attribute.hpp.


Member Function Documentation

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.

Parameters:
instantiateSet 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]
void RTT::AttributeBase::setName ( std::string const &  new_name) [inherited]

Get the name of this instance.

Returns:
the name

Definition at line 64 of file Attribute.cpp.

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


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