Ignore:
Timestamp:
01/10/17 14:36:29 (7 years ago)
Author:
oabramkina
Message:

Intermeadiate version for merging with new server functionalities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/group_template_impl.hpp

    r1009 r1021  
    88#include "context.hpp" 
    99#include "event_client.hpp" 
    10 #include "context_client.hpp" 
    1110#include "message.hpp" 
    1211#include "type.hpp" 
     
    419418       
    420419   } 
    421     
    422    template <class U, class V, class W> 
    423    void CGroupTemplate<U, V, W>::sendCreateChild(const string& id, const int srvPool) 
    424    { 
    425     CContext* context=CContext::getCurrent() ; 
    426     CContextClient* contextClientTmp = context->clientPrimServer[srvPool]; 
     420 
     421   template <class U, class V, class W> 
     422   void CGroupTemplate<U, V, W>::sendCreateChild(const string& id, CContextClient* client) 
     423   { 
    427424 
    428425    CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ; 
    429     if (contextClientTmp->isServerLeader()) 
     426    if (client->isServerLeader()) 
    430427    { 
    431428      CMessage msg ; 
    432429      msg<<this->getId() ; 
    433430      msg<<id ; 
    434       const std::list<int>& ranks = contextClientTmp->getRanksServerLeader(); 
     431      const std::list<int>& ranks = client->getRanksServerLeader(); 
    435432      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
    436433       event.push(*itRank,1,msg) ; 
    437       contextClientTmp->sendEvent(event) ; 
     434      client->sendEvent(event) ; 
    438435    } 
    439     else contextClientTmp->sendEvent(event) ; 
    440    } 
     436    else client->sendEvent(event) ; 
     437   } 
     438 
    441439 
    442440   template <class U, class V, class W> 
     
    444442   { 
    445443    CContext* context=CContext::getCurrent() ; 
    446  
    447         // if (! context->hasServer ) 
    448444    if (context->hasClient) 
    449445    { 
    450         // Use correct context client to send message 
    451 //      CContextClient* contextClientTmp = (0 != context->clientPrimServer) ? context->clientPrimServer : context->client; 
     446      // Use correct context client to send message 
    452447      int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1; 
    453448      for (int i = 0; i < nbSrvPools; ++i) 
Note: See TracChangeset for help on using the changeset viewer.