Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10478


Ignore:
Timestamp:
May 25, 2015, 5:37:15 PM (10 years ago)
Author:
landauf
Message:

callStaticNetworkFunction() and callMemberNetworkFunction() are now template functions instead of macros.
simplified function call interface: always pass five MultiType-references. Check if MultiType.null() evaluates to true to see if the argument was defined.
moved references to NetworkFunctionManager to NetworkFunctionIncludes.cc.
this also fixed a linker error in MSVC by including NetworkFunctionIncludes.h in a build-unit inside the network library.

Location:
code/branches/core7/src
Files:
1 added
17 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/network/CMakeLists.txt

    r10477 r10478  
    3434  MasterServerComm.cc
    3535  NetworkFunction.cc
     36  NetworkFunctionIncludes.cc
    3637  NetworkFunctionManager.cc
    3738  Host.cc
  • code/branches/core7/src/libraries/network/FunctionCall.cc

    r10475 r10478  
    6969}
    7070
    71 void FunctionCall::setCall( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){
     71void FunctionCall::setCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5){
    7272
    7373  // first determine the size that has to be reserved for this call
    7474  uint32_t callsize = 3*sizeof(uint32_t); //size for network-function-id and nrOfArguments and the objectID
    7575  uint32_t nrOfArguments = 0;
    76   if(mt1)
     76  if(!mt1.null())
    7777  {
    7878    nrOfArguments++;
    79     callsize += mt1->getNetworkSize();
    80     this->arguments_.push_back(*mt1);
    81     if(mt2)
     79    callsize += mt1.getNetworkSize();
     80    this->arguments_.push_back(mt1);
     81    if(!mt2.null())
    8282    {
    8383      nrOfArguments++;
    84       callsize += mt2->getNetworkSize();
    85       this->arguments_.push_back(*mt2);
    86       if(mt3)
     84      callsize += mt2.getNetworkSize();
     85      this->arguments_.push_back(mt2);
     86      if(!mt3.null())
    8787      {
    8888        nrOfArguments++;
    89         callsize += mt3->getNetworkSize();
    90         this->arguments_.push_back(*mt3);
    91         if(mt4)
     89        callsize += mt3.getNetworkSize();
     90        this->arguments_.push_back(mt3);
     91        if(!mt4.null())
    9292        {
    9393          nrOfArguments++;
    94           callsize += mt4->getNetworkSize();
    95           this->arguments_.push_back(*mt4);
    96           if(mt5)
     94          callsize += mt4.getNetworkSize();
     95          this->arguments_.push_back(mt4);
     96          if(!mt5.null())
    9797          {
    9898            nrOfArguments++;
    99             callsize += mt5->getNetworkSize();
    100             this->arguments_.push_back(*mt5);
     99            callsize += mt5.getNetworkSize();
     100            this->arguments_.push_back(mt5);
    101101          }
    102102        }
  • code/branches/core7/src/libraries/network/FunctionCall.h

    r10473 r10478  
    5252  bool execute();
    5353
    54   void setCall( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
     54  void setCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
    5555 
    5656  void saveData( uint8_t*& mem );
  • code/branches/core7/src/libraries/network/FunctionCallManager.cc

    r10473 r10478  
    4040
    4141
    42 void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID)
    43 {
    44   if(sPeerMap_.find(peerID)==sPeerMap_.end())
    45   {
    46     FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
    47     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    48   }
    49   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID);
    50 }
    51 void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1)
    52 {
    53   if(sPeerMap_.find(peerID)==sPeerMap_.end())
    54   {
    55     FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
    56     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    57   }
    58   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, &mt1);
    59 }
    60 void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2)
    61 {
    62   if(sPeerMap_.find(peerID)==sPeerMap_.end())
    63   {
    64     FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
    65     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    66   }
    67   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, &mt1, &mt2);
    68 }
    69 void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
    70 {
    71   if(sPeerMap_.find(peerID)==sPeerMap_.end())
    72   {
    73     FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
    74     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    75   }
    76   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, &mt1, &mt2, &mt3);
    77 }
    78 void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
    79 {
    80   if(sPeerMap_.find(peerID)==sPeerMap_.end())
    81   {
    82     FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
    83     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    84   }
    85   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, &mt1, &mt2, &mt3, &mt4);
    86 }
    8742void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
    8843{
     
    9247    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
    9348  }
    94   FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, &mt1, &mt2, &mt3, &mt4, &mt5);
     49  FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, mt1, mt2, mt3, mt4, mt5);
    9550}
    9651
  • code/branches/core7/src/libraries/network/FunctionCallManager.h

    r10473 r10478  
    4646{
    4747public:
    48   static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID);
    49   static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1);
    50   static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2);
    51   static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3);
    52   static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4);
    5348  static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
    5449
  • code/branches/core7/src/libraries/network/NetworkFunction.h

    r10475 r10478  
    193193};
    194194
    195 template<class T> inline void copyPtr( T ptr, NetworkFunctionPointer& destptr)
    196 {
    197   if( sizeof(NetworkFunctionPointer)-sizeof(T) > 0)
    198     memset((uint8_t*)&destptr + sizeof(T), 0, sizeof(NetworkFunctionPointer)-sizeof(T));
    199   T p2 = ptr;
    200   memcpy( &destptr, &p2, sizeof(T) );
    201 //   for(unsigned int i=0; i<(sizeof(T)-1/4)+1; i++)
    202 //     *((uint32_t*)destptr+i) = p2>>32*i;
    203 }
    204 
    205195}
    206196
  • code/branches/core7/src/libraries/network/NetworkFunctionIncludes.h

    r10476 r10478  
    3636
    3737#include "NetworkFunction.h"
    38 #include "NetworkFunctionManager.h"
    3938#include "core/module/StaticallyInitializedInstance.h"
    4039
     
    4746        = (new orxonox::SI_NF(orxonox::registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function)))->getFunction()
    4847
    49 // call it with functionPointer, clientID, args
    50 #define callStaticNetworkFunction( functionPointer, ...) \
    51     { \
    52         NetworkFunctionPointer p1; \
    53         copyPtr( functionPointer, p1 ); \
    54         FunctionCallManager::addCall(NetworkFunctionManager::getInstance().getFunctionByFunctionPointer(p1)->getNetworkID(), OBJECTID_UNKNOWN, __VA_ARGS__); \
    55     }
    56 
    57 // call it with class, function, objectID, clientID, args
    58 #define callMemberNetworkFunction( class, function, objectID, ...) \
    59     { \
    60         NetworkFunctionPointer p1; \
    61         copyPtr( &class::function, p1 ); \
    62         FunctionCallManager::addCall(NetworkFunctionManager::getInstance().getFunctionByFunctionPointer(p1)->getNetworkID(), objectID, __VA_ARGS__); \
    63     }
    64 
    6548namespace orxonox
    6649{
    67     class _CoreExport StaticallyInitializedNetworkFunction : public StaticallyInitializedInstance
     50    class _NetworkExport StaticallyInitializedNetworkFunction : public StaticallyInitializedInstance
    6851    {
    6952        public:
    7053            StaticallyInitializedNetworkFunction(NetworkFunctionBase* function) : function_(function) {}
    7154
    72             virtual void load()
    73                 { NetworkFunctionManager::getInstance().registerFunction(this->function_); }
    74             virtual void unload()
    75                 { NetworkFunctionManager::getInstance().unregisterFunction(this->function_); }
     55            virtual void load();
     56            virtual void unload();
    7657
    7758            inline NetworkFunctionBase& getFunction()
     
    8465    typedef StaticallyInitializedNetworkFunction SI_NF;
    8566
    86     template<class T> inline NetworkFunctionBase* registerStaticNetworkFunctionFct( T ptr, const std::string& name )
     67    template<class PT>
     68    inline NetworkFunctionBase* registerStaticNetworkFunctionFct(PT ptr, const std::string& name)
    8769    {
    88         BOOST_STATIC_ASSERT( sizeof(T)<=sizeof(NetworkFunctionPointer) ); // if this fails your compiler uses bigger pointers for static functions than defined above
     70        BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for static functions than defined above
    8971        NetworkFunctionPointer destptr;
    90         copyPtr( ptr, destptr );
    91         return new NetworkFunctionStatic( createFunctor(ptr), name, destptr );
     72        copyPtr(ptr, destptr);
     73        return new NetworkFunctionStatic(createFunctor(ptr), name, destptr);
    9274    }
    9375
    94     template<class T, class PT> inline NetworkFunctionBase* registerMemberNetworkFunctionFct( PT ptr, const std::string& name )
     76    template<class T, class PT>
     77    inline NetworkFunctionBase* registerMemberNetworkFunctionFct(PT ptr, const std::string& name)
    9578    {
    96         BOOST_STATIC_ASSERT( sizeof(PT)<=sizeof(NetworkFunctionPointer) ); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
     79        BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
    9780        NetworkFunctionPointer destptr;
    98         copyPtr( ptr, destptr );
    99         return new NetworkMemberFunction<T>( createFunctor(ptr), name, destptr );
     81        copyPtr(ptr, destptr);
     82        return new NetworkMemberFunction<T>(createFunctor(ptr), name, destptr);
     83    }
     84
     85    _NetworkExport uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer);
     86
     87    // call it with functionPointer, clientID, args
     88    template<class PT>
     89    void callStaticNetworkFunction(PT ptr, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
     90    {
     91        NetworkFunctionPointer destptr;
     92        copyPtr(ptr, destptr);
     93        FunctionCallManager::addCall(getNetworkIdForPointer(destptr), OBJECTID_UNKNOWN, clientID, mt1, mt2, mt3, mt4, mt5);
     94    }
     95
     96    // call it with class::function, objectID, clientID, args
     97    template<class PT>
     98    void callMemberNetworkFunction(PT ptr, uint32_t objectID, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
     99    {
     100        NetworkFunctionPointer destptr;
     101        copyPtr(ptr, destptr);
     102        FunctionCallManager::addCall(getNetworkIdForPointer(destptr), objectID, clientID, mt1, mt2, mt3, mt4, mt5);
     103    }
     104
     105    template<class PT>
     106    inline void copyPtr(PT ptr, NetworkFunctionPointer& destptr)
     107    {
     108        if (sizeof(NetworkFunctionPointer) - sizeof(PT) > 0)
     109            memset((uint8_t*)&destptr + sizeof(PT), 0, sizeof(NetworkFunctionPointer) - sizeof(PT));
     110        PT p2 = ptr;
     111        memcpy(&destptr, &p2, sizeof(PT));
    100112    }
    101113}
  • code/branches/core7/src/libraries/network/packet/FunctionCalls.cc

    r10473 r10478  
    8282}
    8383
    84 void FunctionCalls::addCall( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5)
     84void FunctionCalls::addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
    8585{
    8686  assert(!isDataENetAllocated());
  • code/branches/core7/src/libraries/network/packet/FunctionCalls.h

    r10473 r10478  
    5656  virtual bool process(orxonox::Host* host);
    5757
    58   void addCall( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
     58  void addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
    5959  virtual bool send(orxonox::Host* host);
    6060private:
  • code/branches/core7/src/modules/docking/Dock.cc

    r10465 r10478  
    184184            }
    185185            else
    186                 callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
     186                callStaticNetworkFunction(&Dock::showDockingDialog, player->getClientID());
    187187
    188188        }
     
    201201        }
    202202        else
    203             callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
     203            callStaticNetworkFunction(&Dock::showDockingDialog, player->getClientID());
    204204
    205205    }
  • code/branches/core7/src/modules/notifications/NotificationDispatcher.cc

    r10465 r10478  
    118118        if(!GameMode::isStandalone())
    119119        {
    120             callMemberNetworkFunction(NotificationDispatcher, broadcastHelper, this->getObjectID(), NETWORK_PEER_ID_BROADCAST);
     120            callMemberNetworkFunction(&NotificationDispatcher::broadcastHelper, this->getObjectID(), NETWORK_PEER_ID_BROADCAST);
    121121        }
    122122    }
     
    148148        else if(GameMode::isServer())
    149149        {
    150             callMemberNetworkFunction(NotificationDispatcher, dispatch, this->getObjectID(), clientId, clientId);
     150            callMemberNetworkFunction(&NotificationDispatcher::dispatch, this->getObjectID(), clientId, clientId);
    151151        }
    152152    }
  • code/branches/core7/src/modules/objects/Script.cc

    r10465 r10478  
    198198                for(std::map<unsigned int, PlayerInfo*>::const_iterator it = clients.begin(); it != clients.end(); it++)
    199199                {
    200                     callStaticNetworkFunction(Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
     200                    callStaticNetworkFunction(&Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
    201201                    if(this->times_ != Script::INF) // Decrement the number of remaining executions.
    202202                    {
     
    210210            else
    211211            {
    212                 callStaticNetworkFunction(Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
     212                callStaticNetworkFunction(&Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
    213213                if(this->times_ != Script::INF) // Decrement the number of remaining executions.
    214214                    this->remainingExecutions_--;
     
    248248        if(GameMode::isServer() && this->isOnLoad())
    249249        {
    250             callStaticNetworkFunction(Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
     250            callStaticNetworkFunction(&Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
    251251        }
    252252    }
  • code/branches/core7/src/modules/pickup/PickupManager.cc

    r10465 r10478  
    214214        else
    215215        {
    216             callStaticNetworkFunction(PickupManager::pickupChangedUsedNetwork, clientId, index, used, pickup->isUsable(), pickup->isUnusable());
     216            callStaticNetworkFunction(&PickupManager::pickupChangedUsedNetwork, clientId, index, used, pickup->isUsable(), pickup->isUnusable());
    217217        }
    218218    }
     
    318318            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
    319319            {
    320                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
     320                callStaticNetworkFunction(&PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
    321321            }
    322322            else
    323323            {
    324                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
     324                callStaticNetworkFunction(&PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
    325325            }
    326326        }
     
    409409        else
    410410        {
    411             callStaticNetworkFunction(PickupManager::dropPickupNetworked, 0, pickup);
     411            callStaticNetworkFunction(&PickupManager::dropPickupNetworked, 0, pickup);
    412412        }
    413413    }
     
    452452        else
    453453        {
    454             callStaticNetworkFunction(PickupManager::usePickupNetworked, 0, pickup, use);
     454            callStaticNetworkFunction(&PickupManager::usePickupNetworked, 0, pickup, use);
    455455        }
    456456    }
  • code/branches/core7/src/orxonox/Test.cc

    r10465 r10478  
    105105  void Test::call(unsigned int clientID)
    106106    {
    107         callStaticNetworkFunction( &Test::printV1, clientID );
    108         callStaticNetworkFunction( &Test::printV1, clientID );
     107        callStaticNetworkFunction(&Test::printV1, clientID );
     108        callStaticNetworkFunction(&Test::printV1, clientID );
    109109    }
    110110
    111111    void Test::call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4)
    112112    {
    113         callMemberNetworkFunction( Test, printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 );
     113        callMemberNetworkFunction( &Test::printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 );
    114114    }
    115115
     
    130130    //     if(!Core::isMaster())
    131131    //       call2(0, "bal", "a", "n", "ce");
    132     //       callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
     132    //       callMemberNetworkFunction( &Test::checkU1, this->getObjectID(), 0 );
    133133    }
    134134
  • code/branches/core7/src/orxonox/infos/GametypeInfo.cc

    r10465 r10478  
    369369                this->changedReadyToSpawn(ready);
    370370            else
    371                 callMemberNetworkFunction(GametypeInfo, changedReadyToSpawn, this->getObjectID(), player->getClientID(), ready);
     371                callMemberNetworkFunction(&GametypeInfo::changedReadyToSpawn, this->getObjectID(), player->getClientID(), ready);
    372372        }
    373373    }
     
    388388                    this->changedSpawned(spawned);
    389389            else
    390                 callMemberNetworkFunction(GametypeInfo, changedSpawned, this->getObjectID(), player->getClientID(), spawned);
     390                callMemberNetworkFunction(&GametypeInfo::changedSpawned, this->getObjectID(), player->getClientID(), spawned);
    391391        }
    392392    }
     
    399399        if (GameMode::isMaster())
    400400        {
    401             callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), NETWORK_PEER_ID_BROADCAST, message);
     401            callMemberNetworkFunction(&GametypeInfo::dispatchAnnounceMessage, this->getObjectID(), NETWORK_PEER_ID_BROADCAST, message);
    402402            this->dispatchAnnounceMessage(message);
    403403        }
     
    411411                this->dispatchAnnounceMessage(message);
    412412            else
    413                 callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), clientID, message);
     413                callMemberNetworkFunction(&GametypeInfo::dispatchAnnounceMessage, this->getObjectID(), clientID, message);
    414414        }
    415415    }
     
    422422                this->dispatchKillMessage(message);
    423423            else
    424                 callMemberNetworkFunction(GametypeInfo, dispatchKillMessage, this->getObjectID(), clientID, message);
     424                callMemberNetworkFunction(&GametypeInfo::dispatchKillMessage, this->getObjectID(), clientID, message);
    425425        }
    426426    }
     
    433433                this->dispatchDeathMessage(message);
    434434            else
    435                 callMemberNetworkFunction(GametypeInfo, dispatchDeathMessage, this->getObjectID(), clientID, message);
     435                callMemberNetworkFunction(&GametypeInfo::dispatchDeathMessage, this->getObjectID(), clientID, message);
    436436        }
    437437    }
     
    444444                this->dispatchStaticMessage(message, colour);
    445445            else
    446                 callMemberNetworkFunction(GametypeInfo, dispatchStaticMessage, this->getObjectID(), clientID, message, colour);
     446                callMemberNetworkFunction(&GametypeInfo::dispatchStaticMessage, this->getObjectID(), clientID, message, colour);
    447447        }
    448448    }
     
    455455                this->dispatchFadingMessage(message);
    456456            else
    457                 callMemberNetworkFunction(GametypeInfo, dispatchFadingMessage, this->getObjectID(), clientID, message);
     457                callMemberNetworkFunction(&GametypeInfo::dispatchFadingMessage, this->getObjectID(), clientID, message);
    458458        }
    459459    }
  • code/branches/core7/src/orxonox/interfaces/NotificationListener.cc

    r10465 r10478  
    8484        else if(GameMode::isServer() && sendMode == notificationSendMode::network && Host::getPlayerID() != clientId)
    8585        {
    86             callStaticNetworkFunction(NotificationListener::sendHelper, clientId, message, sender, isCommand, (unsigned int)messageType);
     86            callStaticNetworkFunction(&NotificationListener::sendHelper, clientId, message, sender, isCommand, (unsigned int)messageType);
    8787        }
    8888        else if(GameMode::isServer() && sendMode == notificationSendMode::broadcast)
    8989        {
    9090            // TODO: Works as intended?
    91             callStaticNetworkFunction(NotificationListener::sendHelper, NETWORK_PEER_ID_BROADCAST, message, sender, isCommand, (unsigned int)messageType);
     91            callStaticNetworkFunction(&NotificationListener::sendHelper, NETWORK_PEER_ID_BROADCAST, message, sender, isCommand, (unsigned int)messageType);
    9292        }
    9393    }
  • code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc

    r10465 r10478  
    307307        else
    308308        {
    309             callMemberNetworkFunction(ControllableEntity, fire, this->getObjectID(), 0, firemode);
     309            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
    310310        }
    311311    }
     
    323323            if ( target != 0 )
    324324            {
    325                 callMemberNetworkFunction(ControllableEntity, setTargetInternal, this->getObjectID(), 0, target->getObjectID() );
     325                callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, target->getObjectID() );
    326326            }
    327327           else
    328328           {
    329                 callMemberNetworkFunction(ControllableEntity, setTargetInternal, this->getObjectID(), 0, OBJECTID_UNKNOWN );
     329                callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, OBJECTID_UNKNOWN );
    330330           }
    331331        }
Note: See TracChangeset for help on using the changeset viewer.