Go to the documentation of this file.
33 #include <SimoxUtility/algorithm/string/string_tools.h>
36 #include <Ice/Properties.h>
58 this->prefix =
prefix +
".";
96 for (
auto& [name, definition] :
proxies)
99 <<
"`" << name <<
"` must be in definitions and proxies";
102 const std::string proxy_name = getDefintion<std::string>(name)
104 definition->write_proxy_to_setter(ice_manager, proxy_name);
110 std::map<std::string, ProxyPropertyDefinitionBase*>
117 std::vector<std::string>
142 throw armarx::LocalException(name +
" property is not defined.");
153 std::string definitionStr;
155 DefinitionContainer::iterator it =
definitions.begin();
156 Ice::PropertyDict propertiesMap;
164 definitionStr += it->second->toString(formatter,
getValue(it->first));
165 propertiesMap.erase(it->first);
175 for (Ice::PropertyDict::iterator property = propertiesMap.begin(); property != propertiesMap.end(); property++)
189 return definitionStr;
215 return (selectedProperties.count(name) > 0);
232 std::map<std::string, std::string> result;
262 const std::string& description,
long size, std::string delim)
264 std::stringstream ss;
266 ss <<
"(Format: Sequence of ";
275 ss <<
" numbers delimited by '" << delim <<
"'.)";
283 std::string class_name = splt.at(splt.size() - 1);
285 if (class_name ==
"ComponentInterface" and splt.size() >= 2)
292 class_name = splt.at(splt.size() - 2);
297 std::vector<std::string> trims = {
298 "InterfaceListener",
"_interface_listener",
"Interface",
"_interface",
299 "Listener",
"_listener"
301 for (
const std::string& suffix : trims)
305 class_name.erase(class_name.length() - suffix.length());
void setPrefix(std::string prefix)
std::string getDescription() const
Returns the detailed description of the property user.
Ice::PropertiesPtr getProperties()
Common interface of any property definition.
void setProperties(Ice::PropertiesPtr properties)
void setDescription(const std::string &description)
Sets the detailed description of the property user.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
static std::string eigenVectorPropertyDescription(const std::string &description, long size, std::string delim)
std::vector< std::string > subscribedTopics
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
std::string getValue(const std::string &name)
std::string description
Property User description.
std::shared_ptr< Value > value()
DefinitionContainer definitions
Property definitions container.
virtual std::string getDefaultAsString()=0
std::map< std::string, ProxyPropertyDefinitionBase * > getProxyDefinitions()
std::map< std::string, ProxyPropertyDefinitionBase * > proxies
Ice::PropertiesPtr properties
PropertyDefinitionBase * getDefinitionBase(const std::string &name)
std::map< std::string, std::string > getPropertyValues(const std::string &prefix="") const
void writeProxyValues(IceManagerPtr)
std::vector< std::string > getSubscribedTopicDefinitions()
bool ends_with(const std::string &haystack, const std::string &needle)
bool isPropertySet(const std::string &name)
std::string PropertyDefinitionContainer_ice_class_name(std::string const &full_type_name)
~PropertyDefinitionContainer() override
PropertyDefinitionContainer(const std::string &prefix)
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string toString(PropertyDefinitionFormatter &formatter)
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)