Go to the documentation of this file.
28 #include <ArmarXCore/interface/observers/ObserverInterface.h>
29 #include <ArmarXCore/interface/observers/DataFieldIdentifierBase.h>
35 #include <type_traits>
52 virtual public DatafieldRefBase
54 template <
class BaseClass,
class VariantClass>
59 DatafieldRef(
Observer* observer,
const std::string& channelName,
const std::string& datafieldName,
bool performValidation =
true);
61 DatafieldRef(ObserverInterfacePrx observerPrx,
const std::string& channelName,
const std::string& datafieldName,
bool performValidation =
true);
68 VariantDataClassPtr clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
69 std::string output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
70 VariantTypeId getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
71 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override;
100 typename std::enable_if_t < !std::is_base_of_v<VariantDataClass, T>,
T >
110 return var->get<
T>();
113 bool getBool(
const Ice::Current&
c = Ice::emptyCurrent)
const override
117 int getInt(
const Ice::Current&
c = Ice::emptyCurrent)
const override
121 long getLong(
const Ice::Current&
c = Ice::emptyCurrent)
const override
125 float getFloat(
const Ice::Current&
c = Ice::emptyCurrent)
const override
129 double getDouble(
const Ice::Current&
c = Ice::emptyCurrent)
const override
131 return get<double>();
133 std::string
getString(
const Ice::Current&
c = Ice::emptyCurrent)
const override
135 return get<std::string>();
155 stream << rhs->output();
160 void serialize(
const ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
161 void deserialize(
const ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
174 extern template class ::IceInternal::Handle<::armarx::DatafieldRef>;
std::enable_if_t< !std::is_base_of_v< VariantDataClass, T >, T > get() const
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
Baseclass for all ArmarX Observers.
std::string getString(const Ice::Current &c=Ice::emptyCurrent) const override
long getLong(const Ice::Current &c=Ice::emptyCurrent) const override
double getDouble(const Ice::Current &c=Ice::emptyCurrent) const override
IceInternal::Handle< DatafieldRef > DatafieldRefPtr
friend std::ostream & operator<<(std::ostream &stream, const DatafieldRefPtr &rhs)
stream operator for Ice shared pointer of DataFieldIdentifier
float getFloat(const Ice::Current &c=Ice::emptyCurrent) const override
int getInt(const Ice::Current &c=Ice::emptyCurrent) const override
friend std::ostream & operator<<(std::ostream &stream, const DatafieldRef &rhs)
stream operator for DataFieldIdentifier
The DatafieldRef class is similar to the ChannelRef, but points to a specific Datafield instead of to...
const VariantTypeId DatafieldRef
void validate(const std::vector< WaypointTarget > &path)
std::shared_ptr< Object > ObjectPtr
#define ARMARXCORE_IMPORT_EXPORT
This file offers overloads of toIce() and fromIce() functions for STL container types.
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
bool getBool(const Ice::Current &c=Ice::emptyCurrent) const override
std::enable_if_t< std::is_base_of_v< VariantDataClass, T >, IceInternal::Handle< T > > get() const