33 #include <IceUtil/Exception.h>
37 template class ::IceInternal::Handle<::armarx::DatafieldRef>;
53 channelRef =
new ChannelRef(observer, channelName);
54 this->datafieldName = datafieldName;
56 if (performValidation)
59 ARMARX_WARNING_S <<
"Could not validate ChannelRef for " << getDataFieldIdentifier()->getIdentifierStr();
63 DatafieldRef::DatafieldRef(ObserverInterfacePrx observerPrx,
const std::string& channelName,
const std::string& datafieldName,
bool performValidation)
65 channelRef =
new ChannelRef(observerPrx, channelName);
66 this->datafieldName = datafieldName;
68 if (performValidation)
71 ARMARX_WARNING_S <<
"Could not validate ChannelRef for " << getDataFieldIdentifier()->getIdentifierStr();
82 this->channelRef = channelRef;
83 this->datafieldName = datafieldName;
85 if (performValidation)
88 ARMARX_WARNING_S <<
"Could not validate ChannelRef for " << getDataFieldIdentifier()->getIdentifierStr();
104 id = getChannelRef()->getDataFieldIdentifier(datafieldName);
112 return getChannelRef()->getDataField(datafieldName);
118 return ChannelRefPtr::dynamicCast(channelRef);
135 s <<
"Reference to datafield " << DataFieldIdentifierPtr::dynamicCast(getDataFieldIdentifier())->getIdentifierStr();
148 if (!getChannelRef())
153 if (!getChannelRef()->hasDatafield(datafieldName))
158 if (!getChannelRef()->getDataField(datafieldName)->getInitialized())
170 channelRef->serialize(serializer);
171 obj->setString(
"datafieldName", datafieldName);
178 channelRef->deserialize(serializer,
c);
179 datafieldName = obj->getString(
"datafieldName");