36 #include <Ice/Handle.h>
59 class ComponentPlugin;
118 template <
class T,
class TPtr = IceInternal::Handle<T>>
120 const std::string& configName =
"",
const std::string& configDomain =
"ArmarX")
124 <<
", configDomain = " << configDomain <<
" of type "
125 << GetTypeString<T>();
127 ptr->createdByComponentCreate =
true;
132 if (configName ==
"")
134 ptr->initializeProperties(compPtr->getDefaultName(), properties, configDomain);
138 ptr->initializeProperties(configName, properties, configDomain);
141 compPtr->icePropertiesInitialized();
153 virtual void componentPropertiesUpdated(
const std::set<std::string>& changedProperties);
155 virtual void preOnInitComponent()
override;
156 virtual void preOnConnectComponent()
override;
166 void initializeProperties(
const std::string& configName,
Ice::PropertiesPtr const& properties,
const std::string& configDomain);
175 void forceComponentCreatedByComponentCreateFunc();
178 std::vector<PropertyUserPtr> getAdditionalPropertyUsers()
const;
189 void offeringTopicFromProperty(
const std::string& propertyName);
198 void usingTopicFromProperty(
const std::string& propertyName,
bool orderedPublishing =
false);
208 bool usingProxyFromProperty(
const std::string& propertyName,
const std::string& endpoints =
"");
217 template <
class TopicProxyType>
220 return getTopic<TopicProxyType>(getProperty<std::string>(propertyName));
222 template <
class TopicProxyType>
225 top = getTopic<TopicProxyType>(getProperty<std::string>(propertyName));
235 template <
class ProxyType>
237 bool addToDependencies =
false,
238 const std::string& endpoints =
"",
239 bool throwOnProxyError =
true)
241 return getProxy<ProxyType>(getProperty<std::string>(propertyName),
242 addToDependencies, endpoints, throwOnProxyError);
244 template <
class ProxyType>
246 bool addToDependencies =
false,
247 const std::string& endpoints =
"",
248 bool throwOnProxyError =
true)
250 proxy = getProxy<ProxyType>(getProperty<std::string>(propertyName),
251 addToDependencies, endpoints, throwOnProxyError);
271 std::string getConfigDomain();
280 std::string getConfigName();
293 std::string getConfigIdentifier();
316 void icePropertiesUpdated(
const std::set<std::string>& changedProperties)
override final;
320 std::string configDomain;
321 std::string configName;
323 std::vector<PropertyUserPtr> additionalPropertyUsers;
330 bool createdByComponentCreate;