Ignore:
Timestamp:
06/06/17 17:58:16 (7 years ago)
Author:
oabramkina
Message:

Two server levels: merging with trunk r1137.
There are bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/variable.cpp

    r1071 r1158  
    4040      if (!node.getContent(this->content)) 
    4141      { 
     42        xml::THashAttributes attributes = node.getAttributes(); 
     43        StdString variableName = attributes["name"]; 
     44 
     45        node.goToParentElement(); 
     46        StdString parentName = node.getElementName(); 
     47        attributes = node.getAttributes(); 
     48        error << "The variable id = " << id << " and name = " << variableName << " does not have any content. Please define it!" << std::endl 
     49              << "This variable is inside another element whose attributes are :" << std::endl; 
     50 
     51        for (xml::THashAttributes::iterator it = attributes.begin(); it != attributes.end(); ++it) 
     52        { 
     53           error << it->first << "=\"" << it->second.c_str() << "\" "; 
     54        } 
     55        error << std::endl;  
     56 
    4257         ERROR("CVariable::parse(xml::CXMLNode & node)", 
    4358               << "[ variable id = " << id 
    44                << " ] variable is not defined !"); 
     59               << " ] variable is not defined !. It does not have any content. See error log for more details."); 
    4560      } 
    4661      content = boost::trim_copy(content) ; 
     
    108123      } 
    109124     } 
    110  
    111     //  if (!context->hasServer) 
    112     //  { 
    113     //    CContextClient* client=context->client ; 
    114  
    115     //    CEventClient event(this->getType(),EVENT_ID_VARIABLE_VALUE) ; 
    116     //    if (client->isServerLeader()) 
    117     //    { 
    118     //      CMessage msg ; 
    119     //      msg<<this->getId() ; 
    120     //      msg<<content ; 
    121     //      const std::list<int>& ranks = client->getRanksServerLeader(); 
    122     //      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
    123     //        event.push(*itRank,1,msg); 
    124     //      client->sendEvent(event) ; 
    125     //    } 
    126     //    else client->sendEvent(event) ; 
    127     // } 
    128125   } 
    129126 
Note: See TracChangeset for help on using the changeset viewer.