29#include <Ice/Handle.h>
59 class ComponentPlugin;
114 template <
class T,
class TPtr = IceInternal::Handle<T>>
117 const std::string& configName =
"",
118 const std::string& configDomain =
"ArmarX")
122 <<
", configDomain = " << configDomain <<
" of type "
125 ptr->createdByComponentCreate =
true;
130 if (configName ==
"")
132 ptr->initializeProperties(compPtr->getDefaultName(), properties, configDomain);
136 ptr->initializeProperties(configName, properties, configDomain);
139 compPtr->icePropertiesInitialized();
151 virtual void componentPropertiesUpdated(
const std::set<std::string>& changedProperties);
153 virtual void preOnInitComponent()
override;
154 virtual void preOnConnectComponent()
override;
164 void initializeProperties(
const std::string& configName,
166 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,
199 bool orderedPublishing =
false);
209 bool usingProxyFromProperty(
const std::string& propertyName,
210 const std::string& endpoints =
"");
219 template <
class TopicProxyType>
226 template <
class TopicProxyType>
240 template <
class ProxyType>
243 bool addToDependencies =
false,
244 const std::string& endpoints =
"",
245 bool throwOnProxyError =
true)
253 template <
class ProxyType>
256 const std::string& propertyName,
257 bool addToDependencies =
false,
258 const std::string& endpoints =
"",
259 bool throwOnProxyError =
true)
283 std::string getConfigDomain();
292 std::string getConfigName();
305 std::string getConfigIdentifier();
328 void icePropertiesUpdated(
const std::set<std::string>& changedProperties)
override final;
332 std::string configDomain;
333 std::string configName;
335 std::vector<PropertyUserPtr> additionalPropertyUsers;
342 bool createdByComponentCreate;
#define ARMARXCORE_IMPORT_EXPORT
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
friend class ArmarXManager
static TPtr create(Ice::PropertiesPtr properties=Ice::createProperties(), const std::string &configName="", const std::string &configDomain="ArmarX")
Factory method for a component.
TopicProxyType getTopicFromProperty(const std::string &propertyName)
Get a topic proxy whose name is specified by the given property.
ProxyType getProxyFromProperty(const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
Get a proxy whose name is specified by the given property.
void getProxyFromProperty(ProxyType &proxy, const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
virtual void icePropertiesInitialized()
Property< PropertyType > getProperty(const std::string &name)
void getTopicFromProperty(TopicProxyType &top, const std::string &propertyName)
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
ManagedIceObject(ManagedIceObject const &other)
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
PropertyDefinitionContainer(const std::string &prefix)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Property< PropertyType > getProperty(const std::string &name)
Property creation and retrieval.
#define ARMARX_DEBUG_S
The logging level for output that is only interesting while debugging.
Ice::PropertiesPtr createProperties()
::IceInternal::Handle<::Ice::Properties > PropertiesPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string GetTypeString(const std::type_info &tinf, bool withoutNamespaceSpecifier=false)
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceUtil::Handle< class PropertyUser > PropertyUserPtr
PropertyUser smart pointer type.
IceInternal::Handle< Component > ComponentPtr
Component smart pointer type.