hla: Remove deprecated AttributeCallback.

This commit is contained in:
Mathias Froehlich
2012-07-29 16:16:20 +02:00
parent a5c6f8023b
commit ed66c37de2
2 changed files with 0 additions and 44 deletions

View 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);
}

View 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;