Ignore:
Timestamp:
04/13/11 15:15:12 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/xml_parser.cpp

    r152 r173  
    5353 
    5454                  if (attributes.end() == attributes.find("id")) 
    55                   {  DEBUG("Le context ne sera pas traité car il n'est pas identifié !"); 
    56                      continue; } 
     55                  {   
     56                     DEBUG("Le context ne sera pas traité car il n'est pas identifié !"); 
     57                     continue;  
     58                  } 
    5759 
    5860                  CObjectFactory::SetCurrentContextId(attributes["id"]); 
    5961                  CGroupFactory::SetCurrentContextId(attributes["id"]); 
    6062 
    61                   if(CObjectFactory::HasObject<tree::CContext>(attributes["id"])) 
    62                   {  DEBUG("Le context ne sera pas traité car il existe déjà un autre context possédant le même nom !"); 
    63                      continue; } 
     63                  bool hasctxt = CObjectFactory::HasObject<tree::CContext>(attributes["id"]); 
     64 
     65                  if(hasctxt) 
     66                  {   
     67                     DEBUG("Le context ne sera pas traité car " 
     68                           << "il existe déjà un autre context possédant le même nom !"); 
     69                     continue;  
     70                  } 
    6471 
    6572                  boost::shared_ptr<tree::CContext> context = 
    6673                     CObjectFactory::CreateObject<tree::CContext>(attributes["id"]); 
    67                   CGroupFactory::AddChild(group_context, context); 
     74                  if (!hasctxt) CGroupFactory::AddChild(group_context, context); 
    6875                  context->parse(node); 
    6976 
Note: See TracChangeset for help on using the changeset viewer.