Ignore:
Timestamp:
06/18/10 14:33:19 (14 years ago)
Author:
hozdoba
Message:

Début de prise en charge des références (sans contrÎle ni transmission d'attribut pour le moment).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp

    r107 r108  
    1616         static void ShowTree(ostream& os = std::clog) 
    1717         { 
    18             clog << "<?xml version=\"1.0\"?>" << std::endl; 
    19             clog <<  "<simulation>" << std::endl; 
     18            clog << NIndent << "<?xml version=\"1.0\"?>" << std::endl; 
     19            clog << NIndent << "<"<< Context::GetRootName() << ">" << std::endl; 
    2020            HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
    2121            for (HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
    2222               // On sort chacun des contextes successivement. 
    23                clog << *((*it).second)[(*it).first] << std::endl; 
    24             clog << "</simulation>" << std::endl  ; 
     23            { Context::SetCurrentContext((*it).first); clog << *((*it).second)[(*it).first] << std::endl; } 
     24            clog << NIndent << "</" << Context::GetRootName() << ">" << std::endl  ; 
    2525         } 
    2626 
     
    3636            HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
    3737            for (HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
    38                // Résolution des héritages des descendands (càd des héritages de groupes) pour chacun des contextes. 
     38            { 
     39               // Résolution des héritages descendants (càd des héritages de groupes) pour chacun des contextes. 
     40               Context::SetCurrentContext((*it).first); 
    3941               ((*it).second)[(*it).first]->resolveDescInheritance(); 
     42 
     43               // Résolution des héritages par référence au niveau des fichiers 
     44               const std::vector<CFile*>& allFiles = CFile::GetCurrentListObject().getVector(); 
     45               for (unsigned int i = 0; i < allFiles.size(); i++) allFiles[i]->resolveFieldRefInheritance(); 
     46            } 
    4047         } 
    4148 
     
    113120 
    114121         static string GetName(void) {return ("context"); } 
     122         static string GetRootName(void) {return ("simulation"); } 
    115123 
    116124         virtual bool hasChild(void) const 
Note: See TracChangeset for help on using the changeset viewer.