From: Mathias Froehlich Date: Sun, 29 Jul 2012 14:16:20 +0000 (+0200) Subject: hla: Remove deprecated AttributeCallback. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed66c37de2223038bd003d89cc8cf104ad105bff;p=simgear.git hla: Remove deprecated AttributeCallback. --- diff --git a/simgear/hla/HLAObjectInstance.cxx b/simgear/hla/HLAObjectInstance.cxx index 456da1b6..f1b7fed0 100644 --- a/simgear/hla/HLAObjectInstance.cxx +++ b/simgear/hla/HLAObjectInstance.cxx @@ -492,8 +492,6 @@ HLAObjectInstance::deleteInstance(const RTIData& tag) void HLAObjectInstance::updateAttributeValues(const RTIData& tag) { - if (_attributeCallback.valid()) - _attributeCallback->updateAttributeValues(*this, tag); if (_updateCallback.valid()) { _updateCallback->updateAttributeValues(*this, tag); } else { @@ -505,8 +503,6 @@ HLAObjectInstance::updateAttributeValues(const RTIData& tag) void HLAObjectInstance::updateAttributeValues(const SGTimeStamp& timeStamp, const RTIData& tag) { - if (_attributeCallback.valid()) - _attributeCallback->updateAttributeValues(*this, tag); if (_updateCallback.valid()) { _updateCallback->updateAttributeValues(*this, timeStamp, tag); } else { @@ -668,16 +664,6 @@ HLAObjectInstance::_reflectAttributeValues(const HLAIndexList& indexList, const { if (_reflectCallback.valid()) { _reflectCallback->reflectAttributeValues(*this, indexList, tag); - } else if (_attributeCallback.valid()) { - reflectAttributeValues(indexList, tag); - - RTIIndexDataPairList dataPairList; - for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) { - dataPairList.push_back(RTIIndexDataPair()); - dataPairList.back().first = *i; - getAttributeData(*i, dataPairList.back().second); - } - _attributeCallback->reflectAttributeValues(*this, dataPairList, tag); } else { reflectAttributeValues(indexList, tag); } @@ -688,16 +674,6 @@ HLAObjectInstance::_reflectAttributeValues(const HLAIndexList& indexList, const { if (_reflectCallback.valid()) { _reflectCallback->reflectAttributeValues(*this, indexList, timeStamp, tag); - } else if (_attributeCallback.valid()) { - reflectAttributeValues(indexList, timeStamp, tag); - - RTIIndexDataPairList dataPairList; - for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) { - dataPairList.push_back(RTIIndexDataPair()); - dataPairList.back().first = *i; - getAttributeData(*i, dataPairList.back().second); - } - _attributeCallback->reflectAttributeValues(*this, dataPairList, timeStamp, tag); } else { reflectAttributeValues(indexList, timeStamp, tag); } diff --git a/simgear/hla/HLAObjectInstance.hxx b/simgear/hla/HLAObjectInstance.hxx index b84038bc..f99be834 100644 --- a/simgear/hla/HLAObjectInstance.hxx +++ b/simgear/hla/HLAObjectInstance.hxx @@ -127,25 +127,6 @@ public: const SGSharedPtr& getReflectCallback() const { return _reflectCallback; } - // deprecated. - class AttributeCallback : public SGReferenced { - public: - virtual ~AttributeCallback() {} - virtual void updateAttributeValues(HLAObjectInstance& objectInstance, const RTIData& tag) - { } - virtual void reflectAttributeValues(HLAObjectInstance& objectInstance, - const RTIIndexDataPairList& dataPairList, const RTIData& tag) - { } - virtual void reflectAttributeValues(HLAObjectInstance& objectInstance, const RTIIndexDataPairList& dataPairList, - const SGTimeStamp& timeStamp, const RTIData& tag) - { reflectAttributeValues(objectInstance, dataPairList, tag); } - }; - - void setAttributeCallback(const SGSharedPtr& attributeCallback) - { _attributeCallback = attributeCallback; } - const SGSharedPtr& getAttributeCallback() const - { return _attributeCallback; } - private: void _setRTIObjectInstance(RTIObjectInstance* rtiObjectInstance); void _clearRTIObjectInstance(); @@ -192,7 +173,6 @@ private: // Callback classes SGSharedPtr _updateCallback; SGSharedPtr _reflectCallback; - SGSharedPtr _attributeCallback; friend class HLAFederate; friend class HLAObjectClass;