27 #include <type_traits>
30 #include <ArmarXCore/interface/observers/DataFieldIdentifierBase.h>
31 #include <ArmarXCore/interface/observers/ObserverInterface.h>
53 template <
class BaseClass,
class VariantClass>
61 const std::string& channelName,
62 const std::string& datafieldName,
63 bool performValidation =
true);
66 const std::string& channelName,
67 const std::string& datafieldName,
68 bool performValidation =
true);
70 const std::string& datafieldName,
71 bool performValidation =
true);
80 VariantDataClassPtr clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
81 std::string output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
82 VariantTypeId getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
83 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override;
108 return var->get<
T>();
111 template <
typename T>
112 typename std::enable_if_t<!std::is_base_of_v<VariantDataClass, T>,
T>
123 return var->get<
T>();
127 getBool(
const Ice::Current&
c = Ice::emptyCurrent)
const override
133 getInt(
const Ice::Current&
c = Ice::emptyCurrent)
const override
139 getLong(
const Ice::Current&
c = Ice::emptyCurrent)
const override
145 getFloat(
const Ice::Current&
c = Ice::emptyCurrent)
const override
151 getDouble(
const Ice::Current&
c = Ice::emptyCurrent)
const override
153 return get<double>();
157 getString(
const Ice::Current&
c = Ice::emptyCurrent)
const override
159 return get<std::string>();
180 stream << rhs->output();
185 void serialize(
const ObjectSerializerBasePtr& serializer,
186 const ::Ice::Current& = Ice::emptyCurrent)
const override;
187 void deserialize(
const ObjectSerializerBasePtr& serializer,
188 const ::Ice::Current& = Ice::emptyCurrent)
override;
201 extern template class ::IceInternal::Handle<::armarx::DatafieldRef>;