|
|
PropertyDefinitionContainer. More...
#include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h>
Inheritance diagram for PropertyDefinitionContainer: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. | |
| 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. | |
| 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. | |
| 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 (const PropertyType &getter, std::function< void(const PropertyType &)> setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant) |
| 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, const PropertyType &getter, std::function< void(const 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| DefinitionContainer | definitions |
| Property definitions container. | |
| std::string | description |
| Property User description. | |
| std::string | prefix |
| Prefix of the properties such as namespace, domain, component name, etc. | |
| Ice::PropertiesPtr | properties |
| std::map< std::string, ProxyPropertyDefinitionBase * > | proxies |
| std::vector< std::string > | subscribedTopics |
| typedef std::map<std::string, PropertyDefinitionBase*> DefinitionContainer |
| PropertyDefinitionContainer | ( | const std::string & | prefix | ) |
|
override |
| void component | ( | IceInternal::ProxyHandle< PropertyType > & | setter, |
| const std::string & | default_name = "", | ||
| const std::string & | property_name = "", | ||
| const std::string & | description = "" ) |
| PropertyDefinition< PropertyType > & defineOptionalProperty | ( | const std::string & | name, |
| PropertyType | defaultValue, | ||
| const std::string & | description = "", | ||
| PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant ) |
|
inline |
|
inline |
| 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:
| PropertyDefinition< PropertyType > & defineRequiredProperty | ( | const std::string & | name, |
| const std::string & | description = "", | ||
| PropertyDefinitionBase::PropertyConstness | constness = PropertyDefinitionBase::eConstant ) |
|
inline |
|
inline |
| 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:
|
static |
Parses string to an Eigen vector of type EigenVectorType.
| delim | The delimiter between coefficients. |
| std::bad_cast | If parsing string fails. |
|
static |
|
static |
| PropertyDefinitionBase * getDefinitionBase | ( | const std::string & | name | ) |
| PropertyDefinition< PropertyType > & getDefintion | ( | const std::string & | name | ) |
| std::string getDescription | ( | ) | const |
Returns the detailed description of the property user.
| 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 | ) |
|
inline |
| bool isPropertySet | ( | const std::string & | name | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setDescription | ( | const std::string & | description | ) |
Sets the detailed description of the property user.
| description | detailed description text |
| void setPrefix | ( | std::string | prefix | ) |
| void setProperties | ( | Ice::PropertiesPtr | properties | ) |
| 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.
| 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.
| std::string toString | ( | PropertyDefinitionFormatter & | formatter | ) |
| void writeProxyValues | ( | IceManagerPtr | ice_manager | ) |
| void writeValues | ( | ) |
|
protected |
PropertyUser brief description.
|
protected |
Property definitions container.
|
protected |
Property User description.
|
protected |
Prefix of the properties such as namespace, domain, component name, etc.
|
protected |
|
protected |
|
protected |