Ignore:
Timestamp:
09/08/10 15:02:31 (14 years ago)
Author:
hozdoba
Message:

Mise à jour intermédiaire ...
A venir : commit d'une version stable intégrant l'écriture de fichiers NetCDF4.
(en cours de finalisation actuellement)

File:
1 edited

Legend:

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

    r119 r120  
    2222            os << NIndent << "<"<< Context::GetRootName() << ">" << std::endl; 
    2323 
    24             HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
    25             for (HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
     24            Poco::HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
     25            for (Poco::HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
    2626               // On sort chacun des contextes successivement. 
    2727            { Context::SetCurrentContext((*it).first); os << *((*it).second)[(*it).first] << std::endl; } 
     
    3232         static void FreeMemory(void) 
    3333         { 
    34             HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
    35             for (HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
     34            Poco::HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
     35            for (Poco::HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
    3636            { Context::SetCurrentContext((*it).first); delete ((*it).second)[(*it).first]; } 
    3737         } 
    3838 
     39         // Ne plus utiliser, disponible dans les classe treatment. 
    3940         static void ResolveInheritance(void) 
    4041         { 
    41             HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
    42             for (HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
     42            Poco::HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 
     43            for (Poco::HashMap<string, StrHashMap<Context> >::Iterator it = AllListContext.begin(); it != AllListContext.end(); it++) 
    4344            { 
    4445               // Résolution des héritages descendants (càd des héritages de groupes) pour chacun des contextes. 
     
    5859 
    5960            // Changement de context pour les champs et groupes de champs. 
    60             FieldGroup::SetContext(id); 
    61             CField::SetContext(id); 
     61            FieldGroup::SetContext(id); CField::SetContext(id); 
    6262 
    6363            // Changement de context pour les fichiers et groupes de fichiers. 
    64             FileGroup::SetContext(id); 
    65             CFile::SetContext(id); 
     64            FileGroup::SetContext(id);  CFile::SetContext(id); 
    6665 
    6766            // Changement de context pour les grilles et groupes de grilles. 
    68             GridGroup::SetContext(id); 
    69             CGrid::SetContext(id); 
     67            GridGroup::SetContext(id);  CGrid::SetContext(id); 
    7068 
    7169            // Changement de context pour les axes et groupes d'axes. 
    72             AxisGroup::SetContext(id); 
    73             CAxis::SetContext(id); 
     70            AxisGroup::SetContext(id);  CAxis::SetContext(id); 
    7471         } 
    7572 
     
    107104                  { gridDef  = CreateInstanceAndParse<GridDefinition >(_node, GridDefinition ::GetDefName().c_str()); continue; } 
    108105 
    109                   WARNING("La définition est invalide, seules les champs, grilles, axes et fichiers peuvent être définis !"); 
     106                  WARNING("La définition est invalide, seuls les champs, grilles, axes et fichiers peuvent être définis !"); 
    110107 
    111108               } while (_node.goToNextElement()); 
     
    115112         } 
    116113 
    117          static string GetName(void) {return ("context"); } 
    118          static string GetRootName(void) {return ("simulation"); } 
     114         static string GetName(void)     { return ("context"); } 
     115         static string GetRootName(void) { return ("simulation"); } 
    119116 
    120117         virtual bool hasChild(void) const 
     
    129126         } 
    130127 
    131          virtual void resolveDescInheritance(const AttributRegistrar* _parent = 0) 
     128         virtual void resolveDescInheritance(const AttributRegistrar* const _parent = 0) 
    132129         { 
    133130            if (_parent != 0) return; 
     
    145142 
    146143         AbstractCalendar * getCalendar(void) const { return (this->ccalendar ); } 
    147          AbstractCalendar * setCalendar(const string& _calName, const string& dateStr) 
     144         AbstractCalendar * setCalendar(const string& _calName, const string& _dateStr) 
    148145         { 
    149146            if (_calName.compare("D360")      == 0) 
    150                return (ccalendar = new D360Calendar(dateStr)); 
     147               return (ccalendar = new D360Calendar(_dateStr)); 
    151148            if (_calName.compare("AllLeap")   == 0) 
    152                return (ccalendar = new AllLeapCalendar(dateStr)); 
     149               return (ccalendar = new AllLeapCalendar(_dateStr)); 
    153150            if (_calName.compare("NoLeap")    == 0) 
    154                return (ccalendar = new NoLeapCalendar(dateStr)); 
     151               return (ccalendar = new NoLeapCalendar(_dateStr)); 
    155152            if (_calName.compare("Julian")    == 0) 
    156                return (ccalendar = new JulianCalendar(dateStr)); 
     153               return (ccalendar = new JulianCalendar(_dateStr)); 
    157154            if (_calName.compare("Gregorian") == 0) 
    158                return (ccalendar = new GregorianCalendar(dateStr)); 
     155               return (ccalendar = new GregorianCalendar(_dateStr)); 
    159156 
    160157            WARNING("L'identifiant "+_calName+" est inconnu, le calendrier grégorien sera choisi par défault pour le contexte "+getId()); 
    161158 
    162             return (ccalendar = new GregorianCalendar(dateStr)); 
     159            return (ccalendar = new GregorianCalendar(_dateStr)); 
    163160         } 
    164161 
     
    166163         { 
    167164            // Désallocation dynamique de mémoire pour chacun des groupes de définition si nécessaire. 
    168             if(fieldDef != NULL) delete fieldDef; 
    169             if(fileDef  != NULL) delete fileDef; 
    170             if(axisDef  != NULL) delete axisDef; 
    171             if(gridDef  != NULL) delete gridDef; 
     165            if(fieldDef != NULL) delete fieldDef; if(fileDef  != NULL) delete fileDef ; 
     166            if(axisDef  != NULL) delete axisDef ; if(gridDef  != NULL) delete gridDef ; 
     167 
    172168            // Désallocation dynamique de mémoire pour le calendrier associé au contexte courant si nécessaire. 
    173169            if(ccalendar !=  NULL) delete ccalendar; 
Note: See TracChangeset for help on using the changeset viewer.