예제 #1
0
 void scan() {
     // reset flags
     _localOnly = true;
     _usesCentralServer = false;
     _serverAllocatesPortNumbers = true;
     // now scan each namespace
     for (int i=0; i<(int)spaces.size(); i++) {
         NameSpace *ns = spaces[i];
         if (!ns) continue;
         // if any namespace is nonlocal, combination is nonlocal
         if (!ns->localOnly()) _localOnly = false;
         // if any namespace uses a central server, combination also does
         if (ns->usesCentralServer()) _usesCentralServer = true;
         // if any namespace doesn't allocate port numbers, combination
         // cannot be relied on to do so either
         if (!ns->serverAllocatesPortNumbers()) {
             _serverAllocatesPortNumbers = false;
         }
         // if any namespace lacks informed connections, combination
         // cannot be relied on to be informed either
         if (!ns->connectionHasNameOfEndpoints()) {
             _connectionHasNameOfEndpoints = false;
         }
     }
 }
예제 #2
0
 void scan() {
     _localOnly = true;
     _usesCentralServer = false;
     _serverAllocatesPortNumbers = true;
     for (int i=0; i<(int)spaces.size(); i++) {
         NameSpace *ns = spaces[i];
         if (!ns) continue;
         if (!ns->localOnly()) _localOnly = false;
         if (ns->usesCentralServer()) _usesCentralServer = true;
         if (!ns->serverAllocatesPortNumbers()) {
             _serverAllocatesPortNumbers = false;
         }
         if (!ns->connectionHasNameOfEndpoints()) {
             _connectionHasNameOfEndpoints = false;
         }
     }
 }