Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 5:37:15 PM (9 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.