A class for keeping track of Attribute, Constant and Property objects of a TaskContext. It allows plugins and remote components to browse the attributes and properties of a TaskContext.
More...
#include <ConfigurationInterface.hpp>
|
bool | chkPtr (const std::string &where, const std::string &name, const void *ptr) |
|
A class for keeping track of Attribute, Constant and Property objects of a TaskContext. It allows plugins and remote components to browse the attributes and properties of a TaskContext.
Definition at line 60 of file ConfigurationInterface.hpp.
RTT::ConfigurationInterface::ConfigurationInterface |
( |
| ) |
|
RTT::ConfigurationInterface::~ConfigurationInterface |
( |
| ) |
|
template<class T >
bool RTT::ConfigurationInterface::addAttribute |
( |
const std::string & |
name, |
|
|
T & |
attr |
|
) |
| |
|
inline |
Adds a variable of any type as read/write attribute to the configuration interface. An Alias is created which causes contents of the attr variable always to be in sync with the contents of the attribute object in the interface.
- Parameters
-
name | The name of this attribute |
attr | The variable that will be aliased. |
Definition at line 101 of file ConfigurationInterface.hpp.
template<class T >
Attribute<T>& RTT::ConfigurationInterface::addAttribute |
( |
const std::string & |
name, |
|
|
Attribute< T > & |
attr |
|
) |
| |
|
inline |
Adds an existing attribute object to the configuration interface.
- Parameters
-
name | The name of this attribute. attr will be initialized with this name. |
attr | The attribute to add |
- Returns
- the Attribute object by reference, which you can further query or use.
- Postcondition
- attr.ready() == true
Definition at line 115 of file ConfigurationInterface.hpp.
Add an base::AttributeBase which remains owned by the user. This is a low-level function that can be used if you already created an Attribute object that does not belong yet to a service.
- Parameters
-
a | remains owned by the user, and becomes served by the repository. |
Definition at line 204 of file ConfigurationInterface.hpp.
template<class T >
bool RTT::ConfigurationInterface::addConstant |
( |
const std::string & |
name, |
|
|
const T & |
cnst |
|
) |
| |
|
inline |
Adds a variable of any type as read-only attribute to the configuration interface. An Alias is created which causes contents of the attribute always to be in sync with the contents of cnst, but it can only be read through the interface.
- Parameters
-
name | The name of this attribute |
cnst | The variable that will be aliased. |
Definition at line 135 of file ConfigurationInterface.hpp.
template<class T >
Constant<T>& RTT::ConfigurationInterface::addConstant |
( |
const std::string & |
name, |
|
|
Constant< T > & |
cnst |
|
) |
| |
|
inline |
Adds an existing constant object to the configuration interface.
- Parameters
-
name | The name of this constant. cnst will be initialized with this name. |
cnst | The constant to add. If cnst has not been initialized, it will be initialized to T(). You can change it later-on using the Constant's API. |
- Returns
- the Constant object by reference, which you can further query or use.
- Postcondition
- cnst.ready() == true
Definition at line 150 of file ConfigurationInterface.hpp.
template<class T >
Property<T>& RTT::ConfigurationInterface::addProperty |
( |
const std::string & |
name, |
|
|
T & |
prop |
|
) |
| |
|
inline |
Adds a variable of any type as a property to the configuration interface. A Property is created which causes contents of the property always to be in sync with the contents of prop.
- Parameters
-
name | The name of this property |
prop | The variable that will be aliased. |
- Returns
- the Property object by reference, which you can further query or document.
Definition at line 171 of file ConfigurationInterface.hpp.
template<class T >
Property<T>& RTT::ConfigurationInterface::addProperty |
( |
const std::string & |
name, |
|
|
Property< T > & |
prop |
|
) |
| |
|
inline |
Adds an existing property object to the configuration interface.
- Parameters
-
name | The name of this property. prop will be initialized with this name. |
prop | The property to add |
- Returns
- the Property object by reference, which you can further query or document.
- Postcondition
- prop.ready() == true
Definition at line 184 of file ConfigurationInterface.hpp.
bool RTT::ConfigurationInterface::chkPtr |
( |
const std::string & |
where, |
|
|
const std::string & |
name, |
|
|
const void * |
ptr |
|
) |
| |
|
protected |
void RTT::ConfigurationInterface::clear |
( |
| ) |
|
Return a new copy of this repository with the copy operation semantics.
- Parameters
-
instantiate | set to true if you want a copy which will upon any future copy return the same DataSources, thus 'fixating' or 'instantiating' the DataSources. |
- See also
- base::ActionInterface
- Note
- this does not copy the properties() within this repository.
Definition at line 60 of file ConfigurationInterface.cpp.
base::AttributeBase* RTT::ConfigurationInterface::getAttribute |
( |
const std::string & |
name | ) |
const |
|
inline |
std::vector< std::string > RTT::ConfigurationInterface::getAttributeNames |
( |
| ) |
const |
base::AttributeBase* RTT::ConfigurationInterface::getConstant |
( |
const std::string & |
name | ) |
const |
|
inline |
base::PropertyBase* RTT::ConfigurationInterface::getProperty |
( |
const std::string & |
name | ) |
const |
|
inline |
Get a Property with name name.
- Parameters
-
name | The name of the property to search for. |
- Returns
- The PropertyBase with this name, zero if it does not exist.
Definition at line 275 of file ConfigurationInterface.hpp.
AttributeBase * RTT::ConfigurationInterface::getValue |
( |
const std::string & |
name | ) |
const |
bool RTT::ConfigurationInterface::hasAttribute |
( |
const std::string & |
name | ) |
const |
bool RTT::ConfigurationInterface::hasProperty |
( |
const std::string & |
name | ) |
const |
void RTT::ConfigurationInterface::loadValues |
( |
AttributeObjects const & |
new_values | ) |
|
PropertyBag * RTT::ConfigurationInterface::properties |
( |
| ) |
|
void RTT::ConfigurationInterface::removeAttribute |
( |
const std::string & |
name | ) |
|
bool RTT::ConfigurationInterface::removeValue |
( |
const std::string & |
name | ) |
|
Transfer the ownership of an attribute to the repository.
- Parameters
-
ab | The attribute which becomes owned by this repository. |
- Returns
- false if an Attribute with the same name already present.
Definition at line 78 of file ConfigurationInterface.cpp.
map_t RTT::ConfigurationInterface::values |
|
protected |
The documentation for this class was generated from the following files: