Go to the documentation of this file.
33 #include <IceUtil/Handle.h>
34 #include <IceUtil/Shared.h>
44 class PropertyDefinitionContainer;
63 public virtual IceUtil::Shared
77 template <
typename PropertyType>
83 template <
typename PropertyType>
93 void getProperty(std::atomic<T>& val,
const std::string& name)
const;
101 template <
class ContainerT>
103 const std::string& name,
104 const std::string& splitBy =
",;",
105 bool trimElements =
true,
106 bool removeEmptyElements =
true);
110 const std::string& splitBy =
",;",
111 bool trimElements =
true,
112 bool removeEmptyElements =
true);
170 std::unique_ptr<Impl> impl;
178 template <
typename PropertyType>
199 val = getProperty<T>(name).getValue();
207 val = getProperty<T>(name).getValue();
210 template <
class ContainerT>
213 const std::string& name,
214 const std::string& splitBy,
216 bool removeEmptyElements)
219 using ValueT =
typename ContainerT::value_type;
220 const std::string csv = getProperty<std::string>(name);
221 if constexpr(std::is_same_v<ContainerT, std::vector<std::string>>)
223 val =
Split(csv, splitBy, trimElements, removeEmptyElements);
227 const auto strvec =
Split(csv, splitBy, trimElements, removeEmptyElements);
229 for (
const auto&
str : strvec)
231 if constexpr(std::is_same_v<ValueT, std::string>)
244 const std::string& name,
245 const std::string& splitBy,
247 bool removeEmptyElements)
virtual void icePropertiesUpdated(const std::set< std::string > &changedProperties)
This method is called when new Properties are set via setIceProperties().
void updateProxies(IceManagerPtr)
virtual void injectPropertyDefinitions(PropertyDefinitionsPtr &)
Called after createPropertyDefinitions by Component to inject propertes of ComponentPlugin.
std::vector< std::string > Split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
bool hasProperty(const std::string &name)
bool tryAddProperty(const std::string &propertyName, const std::string &value)
IceUtil::Handle< class PropertyUser > PropertyUserPtr
PropertyUser smart pointer type.
Property< PropertyType > getProperty(const std::string &name) const
Hack to allow using getProperty in const-modified methods.
std::vector< std::string > getComponentProxyNames()
void getPropertyAsCSV(ContainerT &val, const std::string &name, const std::string &splitBy=",;", bool trimElements=true, bool removeEmptyElements=true)
std::shared_ptr< Value > value()
std::vector< PropertyUserPtr > PropertyUserList
UserProperty list type.
std::vector< std::string > getTopicProxyNames()
Eigen::Vector3f Get(const Eigen::Vector3f &p1, const Eigen::Vector3f &p2, float t)
virtual void updateIceProperties(const std::map< std::string, std::string > &changes)
Provides access to Ice properties with extended capabilities.
virtual PropertyDefinitionsPtr createPropertyDefinitions()=0
Creates the property definition container.
Property< PropertyType > getProperty(const std::string &name)
Property creation and retrieval.
PropertyDefinitionsPtr getPropertyDefinitions()
Returns the component's property definition container.
Ice::PropertiesPtr getIceProperties() const
Returns the set of Ice properties.
Abstract PropertyUser class.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
virtual void setIceProperties(Ice::PropertiesPtr properties)
Sets the Ice properties.
auto emplace(Cont &cont, Params &&...params) -> decltype(cont.emplace_back(std::forward< Params >(params)...))
std::vector< std::string > getSubscribedTopicNames()
This file offers overloads of toIce() and fromIce() functions for STL container types.