DatafieldRef Class Reference

The DatafieldRef class is similar to the ChannelRef, but points to a specific Datafield instead of to a complete channel. It can be used to query (getDataField()) the data of the datafield from the Observer. More...

#include <ArmarXCore/observers/variant/DatafieldRef.h>

+ Inheritance diagram for DatafieldRef:

Public Member Functions

VariantDataClassPtr clone (const Ice::Current &c=Ice::emptyCurrent) const override
 
 DatafieldRef (ChannelRefPtr channelRef, const std::string &datafieldName, bool performValidation=true)
 
 DatafieldRef (Observer *observer, const std::string &channelName, const std::string &datafieldName, bool performValidation=true)
 
 DatafieldRef (ObserverInterfacePrx observerPrx, const std::string &channelName, const std::string &datafieldName, bool performValidation=true)
 
void deserialize (const ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
 
template<typename T >
std::enable_if_t< std::is_base_of_v< VariantDataClass, T >, IceInternal::Handle< T > > get () const
 
template<typename T >
std::enable_if_t< !std::is_base_of_v< VariantDataClass, T >, Tget () const
 
bool getBool (const Ice::Current &c=Ice::emptyCurrent) const override
 
ChannelRefPtr getChannelRef () const
 
TimedVariantPtr getDataField () const
 Retrieves the value of the datafield from the Observer. More...
 
DataFieldIdentifierPtr getDataFieldIdentifier () const
 
double getDouble (const Ice::Current &c=Ice::emptyCurrent) const override
 
float getFloat (const Ice::Current &c=Ice::emptyCurrent) const override
 
int getInt (const Ice::Current &c=Ice::emptyCurrent) const override
 
long getLong (const Ice::Current &c=Ice::emptyCurrent) const override
 
std::string getString (const Ice::Current &c=Ice::emptyCurrent) const override
 
VariantTypeId getType (const Ice::Current &c=Ice::emptyCurrent) const override
 
Ice::ObjectPtr ice_clone () const override
 
std::string output (const Ice::Current &c=Ice::emptyCurrent) const override
 
void serialize (const ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
 
bool validate (const Ice::Current &c=Ice::emptyCurrent) override
 
 ~DatafieldRef () override
 

Protected Member Functions

 DatafieldRef ()
 

Friends

template<class BaseClass , class VariantClass >
class GenericFactory
 
std::ostream & operator<< (std::ostream &stream, const DatafieldRef &rhs)
 stream operator for DataFieldIdentifier More...
 
std::ostream & operator<< (std::ostream &stream, const DatafieldRefPtr &rhs)
 stream operator for Ice shared pointer of DataFieldIdentifier More...
 

Detailed Description

The DatafieldRef class is similar to the ChannelRef, but points to a specific Datafield instead of to a complete channel. It can be used to query (getDataField()) the data of the datafield from the Observer.

Definition at line 51 of file DatafieldRef.h.

Constructor & Destructor Documentation

◆ DatafieldRef() [1/4]

DatafieldRef ( )
protected

Definition at line 46 of file DatafieldRef.cpp.

◆ DatafieldRef() [2/4]

DatafieldRef ( Observer observer,
const std::string &  channelName,
const std::string &  datafieldName,
bool  performValidation = true 
)

Definition at line 51 of file DatafieldRef.cpp.

+ Here is the call graph for this function:

◆ DatafieldRef() [3/4]

DatafieldRef ( ObserverInterfacePrx  observerPrx,
const std::string &  channelName,
const std::string &  datafieldName,
bool  performValidation = true 
)

Definition at line 63 of file DatafieldRef.cpp.

+ Here is the call graph for this function:

◆ DatafieldRef() [4/4]

DatafieldRef ( ChannelRefPtr  channelRef,
const std::string &  datafieldName,
bool  performValidation = true 
)

Definition at line 75 of file DatafieldRef.cpp.

+ Here is the call graph for this function:

◆ ~DatafieldRef()

~DatafieldRef ( )
inlineoverride

Definition at line 63 of file DatafieldRef.h.

Member Function Documentation

◆ clone()

VariantDataClassPtr clone ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 125 of file DatafieldRef.cpp.

◆ deserialize()

void deserialize ( const ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 174 of file DatafieldRef.cpp.

◆ get() [1/2]

std::enable_if_t<std::is_base_of_v<VariantDataClass, T>, IceInternal::Handle<T> > get ( ) const
inline

Definition at line 87 of file DatafieldRef.h.

◆ get() [2/2]

std::enable_if_t< !std::is_base_of_v<VariantDataClass, T>, T > get ( ) const
inline

Definition at line 101 of file DatafieldRef.h.

◆ getBool()

bool getBool ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 113 of file DatafieldRef.h.

◆ getChannelRef()

ChannelRefPtr getChannelRef ( ) const

Definition at line 116 of file DatafieldRef.cpp.

◆ getDataField()

TimedVariantPtr getDataField ( ) const

Retrieves the value of the datafield from the Observer.

Returns
Variant with the type and value of the datafield.

Definition at line 110 of file DatafieldRef.cpp.

◆ getDataFieldIdentifier()

DataFieldIdentifierPtr getDataFieldIdentifier ( ) const

Definition at line 100 of file DatafieldRef.cpp.

+ Here is the caller graph for this function:

◆ getDouble()

double getDouble ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 129 of file DatafieldRef.h.

◆ getFloat()

float getFloat ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 125 of file DatafieldRef.h.

◆ getInt()

int getInt ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 117 of file DatafieldRef.h.

◆ getLong()

long getLong ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 121 of file DatafieldRef.h.

◆ getString()

std::string getString ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 133 of file DatafieldRef.h.

◆ getType()

VariantTypeId getType ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 140 of file DatafieldRef.cpp.

◆ ice_clone()

Ice::ObjectPtr ice_clone ( ) const
override

Definition at line 92 of file DatafieldRef.cpp.

◆ output()

std::string output ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 132 of file DatafieldRef.cpp.

+ Here is the call graph for this function:

◆ serialize()

void serialize ( const ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  = Ice::emptyCurrent 
) const
override

Definition at line 166 of file DatafieldRef.cpp.

◆ validate()

bool validate ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 145 of file DatafieldRef.cpp.

Friends And Related Function Documentation

◆ GenericFactory

friend class GenericFactory
friend

Definition at line 55 of file DatafieldRef.h.

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const DatafieldRef rhs 
)
friend

stream operator for DataFieldIdentifier

Definition at line 144 of file DatafieldRef.h.

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  stream,
const DatafieldRefPtr rhs 
)
friend

stream operator for Ice shared pointer of DataFieldIdentifier

Definition at line 153 of file DatafieldRef.h.


The documentation for this class was generated from the following files: