Go to the documentation of this file.
33 #include <SimoxUtility/algorithm/string/string_tools.h>
36 #include <Ice/Properties.h>
57 this->prefix =
prefix +
".";
92 for (
auto& [name, definition] :
proxies)
95 <<
"`" << name <<
"` must be in definitions and proxies";
98 const std::string proxy_name =
100 definition->write_proxy_to_setter(ice_manager, proxy_name);
105 std::map<std::string, ProxyPropertyDefinitionBase*>
111 std::vector<std::string>
135 throw armarx::LocalException(name +
" property is not defined.");
146 std::string definitionStr;
148 DefinitionContainer::iterator it =
definitions.begin();
149 Ice::PropertyDict propertiesMap;
157 definitionStr += it->second->toString(formatter,
getValue(it->first));
158 propertiesMap.erase(it->first);
168 for (Ice::PropertyDict::iterator property = propertiesMap.begin();
169 property != propertiesMap.end();
173 property->first,
"",
"",
"",
"",
"",
"",
"",
values, property->second);
176 return definitionStr;
207 return (selectedProperties.count(name) > 0);
223 std::map<std::string, std::string>
226 std::map<std::string, std::string> result;
259 std::stringstream ss;
261 ss <<
"(Format: Sequence of ";
270 ss <<
" numbers delimited by '" << delim <<
"'.)";
279 std::string class_name = splt.at(splt.size() - 1);
281 if (class_name ==
"ComponentInterface" and splt.size() >= 2)
288 class_name = splt.at(splt.size() - 2);
293 std::vector<std::string> trims = {
"InterfaceListener",
294 "_interface_listener",
299 for (
const std::string& suffix : trims)
303 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)