]> git.mxchange.org Git - simgear.git/commitdiff
hla: Remove deprecated AttributeCallback.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 29 Jul 2012 14:16:20 +0000 (16:16 +0200)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 29 Jul 2012 15:33:19 +0000 (17:33 +0200)
simgear/hla/HLAObjectInstance.cxx
simgear/hla/HLAObjectInstance.hxx

index 456da1b6245dfa77c5e4506d49adab0a9226088a..f1b7fed07a52085103ae06422646bdf6b9f6c28f 100644 (file)
@@ -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);
     }
index b84038bc97021f2958ae342745b4f188eabce985..f99be8349803cd20018b57510a5a2c51c1ac709a 100644 (file)
@@ -127,25 +127,6 @@ public:
     const SGSharedPtr<ReflectCallback>& 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 = attributeCallback; }
-    const SGSharedPtr<AttributeCallback>& getAttributeCallback() const
-    { return _attributeCallback; }
-
 private:
     void _setRTIObjectInstance(RTIObjectInstance* rtiObjectInstance);
     void _clearRTIObjectInstance();
@@ -192,7 +173,6 @@ private:
     // Callback classes
     SGSharedPtr<UpdateCallback> _updateCallback;
     SGSharedPtr<ReflectCallback> _reflectCallback;
-    SGSharedPtr<AttributeCallback> _attributeCallback;
 
     friend class HLAFederate;
     friend class HLAObjectClass;