Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2951 for code/branches/netp2


Ignore:
Timestamp:
May 4, 2009, 4:03:02 PM (16 years ago)
Author:
scheusso
Message:

small fix for memberfunction calls with non-existing (or not anymore existing) objects (these calls are being ignored from now on)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/network/NetworkFunction.h

    r2948 r2951  
    144144    ~NetworkMemberFunction();
    145145   
    146     inline void call(uint32_t objectID){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID))); }
    147     inline void call(uint32_t objectID, const MultiType& mt1){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1); }
    148     inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2); }
    149     inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3); }
    150     inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4); }
    151     inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5){ (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4, mt5); }
     146    inline void call(uint32_t objectID)
     147    {
     148      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     149        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)));
     150    }
     151    inline void call(uint32_t objectID, const MultiType& mt1)
     152    {
     153      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     154        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1);
     155    }
     156    inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2)
     157    {
     158      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     159        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2);
     160    }
     161    inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
     162    {
     163      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     164        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3);
     165    }
     166    inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
     167    {
     168      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     169        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4);
     170    }
     171    inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
     172    {
     173      if ( Synchronisable::getSynchronisable(objectID)!=0 )
     174        (*this->functor_)(dynamic_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4, mt5);
     175    }
    152176   
    153177  private:
Note: See TracChangeset for help on using the changeset viewer.