30 #include <Ice/Initialize.h>
36 #include "../../logging/Logging.h"
62 if (impl->propertyDefinitions.get() ==
nullptr)
68 impl->propertyDefinitions->setProperties(properties);
72 throw LocalException(
"Property prefix contains '..'. Did you call 'getProperty' in "
73 "a Component constructor?");
77 return impl->propertyDefinitions;
91 std::set<std::string> changedPropertyNames;
92 for (
auto& prop : properties->getPropertiesForPrefix(
""))
94 auto propName = prop.first;
95 auto index = propName.find_last_of(
'.');
96 std::string name = propName.substr(
index + 1);
97 changedPropertyNames.insert(name);
99 this->properties = properties->clone();
100 if (impl->propertyDefinitions)
102 impl->propertyDefinitions->setProperties(this->properties);
114 std::unique_lock lock(impl->mutex);
116 std::set<std::string> changedPropertyNames;
117 for (
auto& prop : changes)
119 std::string propName = prop.first;
122 auto index = propName.find_last_of(
'.');
123 std::string name = propName.substr(
index + 1);
124 std::string prefix = propName.substr(0,
index + 1);
125 if (prefix != definitions->getPrefix())
129 if (!definitions->getDefinitionBase(name)->isConstant())
131 this->properties->setProperty(propName, prop.second);
132 changedPropertyNames.insert(name);
133 ARMARX_VERBOSE <<
"Updating MUTABLE Property: " << prop.first <<
" with value '"
134 << prop.second <<
"'";
141 catch (
const armarx::LocalException& e)
162 std::vector<std::string>
165 std::vector<std::string> proxy_names;
170 proxy_names.push_back(getProperty<std::string>(prop_name).getValue());
176 std::vector<std::string>
179 std::vector<std::string> proxy_names;
184 proxy_names.push_back(getProperty<std::string>(prop_name).getValue());
190 std::vector<std::string>
193 std::vector<std::string> topic_names;
194 for (
const std::string& prop_name :
197 topic_names.push_back(getProperty<std::string>(prop_name));
205 if (properties->getProperty(propertyName).empty())
207 properties->setProperty(propertyName,
value);
217 (void)changedProperties;
225 return properties->clone();
236 return getPropertyDefinitions()->hasDefinition(name);