30 #include "../../logging/Logging.h"
32 #include <Ice/Initialize.h>
63 if (impl->propertyDefinitions.get() ==
nullptr)
69 impl->propertyDefinitions->setProperties(properties);
73 throw LocalException(
"Property prefix contains '..'. Did you call 'getProperty' in a Component constructor?");
77 return impl->propertyDefinitions;
93 std::set<std::string> changedPropertyNames;
94 for (
auto& prop : properties->getPropertiesForPrefix(
""))
96 auto propName = prop.first;
97 auto index = propName.find_last_of(
'.');
98 std::string name = propName.substr(
index + 1);
99 changedPropertyNames.insert(name);
101 this->properties = properties->clone();
102 if (impl->propertyDefinitions)
104 impl->propertyDefinitions->setProperties(this->properties);
117 std::unique_lock lock(impl->mutex);
119 std::set<std::string> changedPropertyNames;
120 for (
auto& prop : changes)
122 std::string propName = prop.first;
125 auto index = propName.find_last_of(
'.');
126 std::string name = propName.substr(
index + 1);
127 std::string prefix = propName.substr(0,
index + 1);
128 if (prefix != definitions->getPrefix())
132 if (!definitions->getDefinitionBase(name)->isConstant())
134 this->properties->setProperty(propName, prop.second);
135 changedPropertyNames.insert(name);
136 ARMARX_VERBOSE <<
"Updating MUTABLE Property: " << prop.first <<
" with value '" << prop.second <<
"'";
143 catch (
const armarx::LocalException& e)
167 std::vector<std::string>
170 std::vector<std::string> proxy_names;
175 proxy_names.push_back(getProperty<std::string>(prop_name).getValue());
182 std::vector<std::string>
185 std::vector<std::string> proxy_names;
190 proxy_names.push_back(getProperty<std::string>(prop_name).getValue());
197 std::vector<std::string>
200 std::vector<std::string> topic_names;
203 topic_names.push_back(getProperty<std::string>(prop_name));
211 if (properties->getProperty(propertyName).empty())
213 properties->setProperty(propertyName,
value);
224 (void) changedProperties;
233 return properties->clone();
245 return getPropertyDefinitions()->hasDefinition(name);