|
PropertyDefinitionContainer. More...
#include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h>
Public Types | |
typedef std::map< std::string, PropertyDefinitionBase * > | DefinitionContainer |
Public Member Functions | |
template<typename PropertyType > | |
void | component (IceInternal::ProxyHandle< PropertyType > &setter, const std::string &default_name="", const std::string &property_name="", const std::string &description="") |
template<typename PropertyType > | |
PropertyDefinition< PropertyType > & | defineOptionalProperty (const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineOptionalPropertyVector (const std::string &name, EigenVectorType defaultValue, const std::string &description, char delimiter) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineOptionalPropertyVector (const std::string &name, EigenVectorType defaultValue, const std::string &description, char delimiter, PropertyDefinitionBase::PropertyConstness constness) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineOptionalPropertyVector (const std::string &name, EigenVectorType defaultValue, const std::string &description="", const std::string &delimiter=" ", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
Define a required property for an Eigen vector type. More... | |
template<typename PropertyType > | |
PropertyDefinition< PropertyType > & | defineRequiredProperty (const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineRequiredPropertyVector (const std::string &name, const std::string &description, char delimiter) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineRequiredPropertyVector (const std::string &name, const std::string &description, char delimiter, PropertyDefinitionBase::PropertyConstness constness) |
template<typename EigenVectorType > | |
PropertyDefinition< EigenVectorType > & | defineRequiredPropertyVector (const std::string &name, const std::string &description="", const std::string &delimiter=" ", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
Define a required property for an Eigen vector type. More... | |
PropertyDefinitionBase * | getDefinitionBase (const std::string &name) |
template<typename PropertyType > | |
PropertyDefinition< PropertyType > & | getDefintion (const std::string &name) |
std::string | getDescription () const |
Returns the detailed description of the property user. More... | |
std::string | getPrefix () |
Ice::PropertiesPtr | getProperties () |
std::map< std::string, std::string > | getPropertyValues (const std::string &prefix="") const |
std::map< std::string, ProxyPropertyDefinitionBase * > | getProxyDefinitions () |
std::vector< std::string > | getSubscribedTopicDefinitions () |
std::string | getValue (const std::string &name) |
bool | hasDefinition (const std::string &name) const |
bool | isPropertySet (const std::string &name) |
template<typename PropertyType > | |
decltype(auto) | optional (PropertyType &setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
PropertyDefinitionContainer (const std::string &prefix) | |
template<typename PropertyType > | |
decltype(auto) | required (PropertyType &setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
template<typename PropertyType > | |
decltype(auto) | requiredOrOptional (bool isRequired, PropertyType &setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
void | setDescription (const std::string &description) |
Sets the detailed description of the property user. More... | |
void | setPrefix (std::string prefix) |
void | setProperties (Ice::PropertiesPtr properties) |
template<typename PropertyType > | |
void | topic (IceInternal::ProxyHandle< PropertyType > &setter, const std::string &default_name="", const std::string &property_name="", const std::string &description="") |
Define a property to set the name of a topic which is subscribed to. More... | |
template<typename PropertyType > | |
void | topic (std::string default_name="", std::string property_name="", std::string description="") |
Define a topic which is offered from the component via the template parameter. More... | |
std::string | toString (PropertyDefinitionFormatter &formatter) |
void | writeProxyValues (IceManagerPtr) |
void | writeValues () |
~PropertyDefinitionContainer () override | |
Static Public Member Functions | |
template<typename EigenVectorType > | |
static EigenVectorType | eigenVectorFactoryFunction (std::string string, std::string delim) |
Parses string to an Eigen vector of type EigenVectorType . More... | |
static std::string | eigenVectorPropertyDescription (const std::string &description, long size, std::string delim) |
template<typename EigenVectorType > | |
static std::string | eigenVectorToString (const EigenVectorType &vector, std::string delim) |
Protected Attributes | |
std::string | briefDescription |
PropertyUser brief description. More... | |
DefinitionContainer | definitions |
Property definitions container. More... | |
std::string | description |
Property User description. More... | |
std::string | prefix |
Prefix of the properties such as namespace, domain, component name, etc. More... | |
Ice::PropertiesPtr | properties |
std::map< std::string, ProxyPropertyDefinitionBase * > | proxies |
std::vector< std::string > | subscribedTopics |
Definition at line 53 of file PropertyDefinitionContainer.h.
typedef std::map<std::string, PropertyDefinitionBase*> DefinitionContainer |
Definition at line 58 of file PropertyDefinitionContainer.h.
PropertyDefinitionContainer | ( | const std::string & | prefix | ) |
Definition at line 54 of file PropertyDefinitionContainer.cpp.
|
override |
Definition at line 62 of file PropertyDefinitionContainer.cpp.
void component | ( | IceInternal::ProxyHandle< PropertyType > & | setter, |
const std::string & | default_name = "" , |
||
const std::string & | property_name = "" , |
||
const std::string & | description = "" |
||
) |
Definition at line 404 of file PropertyDefinitionContainer.h.
PropertyDefinition< PropertyType > & defineOptionalProperty | ( | const std::string & | name, |
PropertyType | defaultValue, | ||
const std::string & | description = "" , |
||
PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant |
||
) |
Definition at line 533 of file PropertyDefinitionContainer.h.
|
inline |
Definition at line 248 of file PropertyDefinitionContainer.h.
|
inline |
Definition at line 241 of file PropertyDefinitionContainer.h.
PropertyDefinition< EigenVectorType > & defineOptionalPropertyVector | ( | const std::string & | name, |
EigenVectorType | defaultValue, | ||
const std::string & | description = "" , |
||
const std::string & | delimiter = " " , |
||
PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant |
||
) |
Define a required property for an Eigen vector type.
The EigenVectorType can be any Eigen::Vector type, (Vector3f, VectorXd, ...).
delimiter | the delimiter between vector coefficients in the string representation |
Usage example:
Definition at line 581 of file PropertyDefinitionContainer.h.
PropertyDefinition< PropertyType > & defineRequiredProperty | ( | const std::string & | name, |
const std::string & | description = "" , |
||
PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant |
||
) |
Definition at line 516 of file PropertyDefinitionContainer.h.
|
inline |
Definition at line 194 of file PropertyDefinitionContainer.h.
|
inline |
Definition at line 187 of file PropertyDefinitionContainer.h.
PropertyDefinition< EigenVectorType > & defineRequiredPropertyVector | ( | const std::string & | name, |
const std::string & | description = "" , |
||
const std::string & | delimiter = " " , |
||
PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant |
||
) |
Define a required property for an Eigen vector type.
The EigenVectorType can be any Eigen::Vector type, (Vector3f, VectorXd, ...).
delimiter | the delimiter between vector coefficients in the string representation |
Usage example:
Definition at line 555 of file PropertyDefinitionContainer.h.
|
static |
Parses string
to an Eigen vector of type EigenVectorType
.
delim | The delimiter between coefficients. |
std::bad_cast | If parsing string fails. |
Definition at line 645 of file PropertyDefinitionContainer.h.
|
static |
Definition at line 261 of file PropertyDefinitionContainer.cpp.
|
static |
Definition at line 686 of file PropertyDefinitionContainer.h.
PropertyDefinitionBase * getDefinitionBase | ( | const std::string & | name | ) |
Definition at line 137 of file PropertyDefinitionContainer.cpp.
PropertyDefinition< PropertyType > & getDefintion | ( | const std::string & | name | ) |
Definition at line 610 of file PropertyDefinitionContainer.h.
std::string getDescription | ( | ) | const |
Returns the detailed description of the property user.
Definition at line 192 of file PropertyDefinitionContainer.cpp.
std::string getPrefix | ( | ) |
Definition at line 207 of file PropertyDefinitionContainer.cpp.
Ice::PropertiesPtr getProperties | ( | ) |
Definition at line 124 of file PropertyDefinitionContainer.cpp.
std::map< std::string, std::string > getPropertyValues | ( | const std::string & | prefix = "" | ) | const |
Definition at line 230 of file PropertyDefinitionContainer.cpp.
std::map< std::string, ProxyPropertyDefinitionBase * > getProxyDefinitions | ( | ) |
Definition at line 111 of file PropertyDefinitionContainer.cpp.
std::vector< std::string > getSubscribedTopicDefinitions | ( | ) |
Definition at line 118 of file PropertyDefinitionContainer.cpp.
std::string getValue | ( | const std::string & | name | ) |
Definition at line 218 of file PropertyDefinitionContainer.cpp.
|
inline |
Definition at line 259 of file PropertyDefinitionContainer.h.
bool isPropertySet | ( | const std::string & | name | ) |
Definition at line 212 of file PropertyDefinitionContainer.cpp.
|
inline |
Definition at line 84 of file PropertyDefinitionContainer.h.
|
inline |
Definition at line 74 of file PropertyDefinitionContainer.h.
decltype(auto) requiredOrOptional | ( | bool | isRequired, |
PropertyType & | setter, | ||
const std::string & | name, | ||
const std::string & | description = "" , |
||
PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant |
||
) |
void setDescription | ( | const std::string & | description | ) |
Sets the detailed description of the property user.
description | detailed description text |
Definition at line 197 of file PropertyDefinitionContainer.cpp.
void setPrefix | ( | std::string | prefix | ) |
Definition at line 202 of file PropertyDefinitionContainer.cpp.
void setProperties | ( | Ice::PropertiesPtr | properties | ) |
Definition at line 130 of file PropertyDefinitionContainer.cpp.
void topic | ( | IceInternal::ProxyHandle< PropertyType > & | setter, |
const std::string & | default_name = "" , |
||
const std::string & | property_name = "" , |
||
const std::string & | description = "" |
||
) |
Define a property to set the name of a topic which is subscribed to.
This defines property to set the name of a topic of the given type from setter. Before Component::onInitComponent()
, the component will subscribe to this topic, and before Component::onConnectComponent()
, the topic proxy will be written into setter
.
Definition at line 416 of file PropertyDefinitionContainer.h.
void topic | ( | std::string | default_name = "" , |
std::string | property_name = "" , |
||
std::string | description = "" |
||
) |
Define a topic which is offered from the component via the template parameter.
Sane defaults will be chosen for the property name and the default values depending on the template parameter, but these values can all be overridden with the parameters.
Definition at line 428 of file PropertyDefinitionContainer.h.
std::string toString | ( | PropertyDefinitionFormatter & | formatter | ) |
Definition at line 150 of file PropertyDefinitionContainer.cpp.
void writeProxyValues | ( | IceManagerPtr | ice_manager | ) |
Definition at line 92 of file PropertyDefinitionContainer.cpp.
void writeValues | ( | ) |
Definition at line 79 of file PropertyDefinitionContainer.cpp.
|
protected |
PropertyUser brief description.
Definition at line 343 of file PropertyDefinitionContainer.h.
|
protected |
Property definitions container.
Definition at line 323 of file PropertyDefinitionContainer.h.
|
protected |
Property User description.
Definition at line 338 of file PropertyDefinitionContainer.h.
|
protected |
Prefix of the properties such as namespace, domain, component name, etc.
Definition at line 333 of file PropertyDefinitionContainer.h.
|
protected |
Definition at line 345 of file PropertyDefinitionContainer.h.
|
protected |
Definition at line 325 of file PropertyDefinitionContainer.h.
|
protected |
Definition at line 327 of file PropertyDefinitionContainer.h.