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/object_template.hpp

    r115 r120  
    2727 
    2828            if (c.baseObject != NULL) 
    29                out <<  IncIndent << "<-- Reference resolved for the following "+ T::GetName() +" : \"" << c.baseObject->getId() << "\" -->" << DecEndl << std::endl; 
     29               out <<  IncIndent << "<-- Reference resolved for the following "+ T::GetName() + 
     30                       " : \"" << c.baseObject->getId() << "\" -->" << DecEndl << std::endl; 
    3031 
    3132            if (c.hasChild()) 
     
    4849 
    4950         virtual void resolveDescInheritance(const AttributRegistrar* _parent = 0) { addAttributes(*_parent); } 
    50          virtual void resolveRefInheritance(void) 
     51         virtual void resolveRefInheritance (void) 
    5152         { 
    5253            std::set<T*> sset; 
     
    7677         } 
    7778 
    78          static T& CreateObject(const string& _id) throw (XMLIOUndefinedValueException) 
     79         static T* CreateObject(const string& _id) throw (XMLIOUndefinedValueException) 
    7980         { 
    8081            // Si l'identifiant est répertorié, on retourne l'élément existant. 
     
    8889         } 
    8990 
    90          static T& CreateObject(void) 
     91         static T* CreateObject(void) 
    9192         { 
    9293            T* value = new T; 
    9394            ObjectTemplate<T>::AllListObj[CurrContext].addObject(value); 
    94             return (*value); 
     95            return (value); 
    9596         } 
    9697 
    97          static T& GetObject(const string& _id) throw (XMLIOUndefinedValueException) 
    98          { return (*ObjectTemplate<T>::AllListObj[CurrContext][_id]); } 
     98         static T* GetObject(const string& _id) throw (XMLIOUndefinedValueException) 
     99         { return (ObjectTemplate<T>::AllListObj[CurrContext][_id]); } 
    99100 
    100101         static bool HasObject(const string& _id) 
     
    105106 
    106107         static const StrHashMap<T>& GetCurrentListObject(void) { return (AllListObj[CurrContext]); } 
    107          static HashMap<string, StrHashMap<T> >& GetAllListObject(void) { return (AllListObj); } 
     108         static Poco::HashMap<string, StrHashMap<T> >& GetAllListObject(void) { return (AllListObj); } 
    108109 
    109110         static void SetContext(const string& id){ ObjectTemplate<T>::CurrContext = id; } 
     
    134135               if (V::HasObject(did)) 
    135136                  WARNING("Le noeud nommé \""+ did +"\" existe déjà pour les instances de type "+V::GetName()+", le dernier défini complétera le premier dans le context actuel!"); 
    136                instance_ptr = (V*)&V::CreateObject(did); 
     137               instance_ptr = (V*)V::CreateObject(did); 
    137138               instance_ptr->parse(_node, parseAttr); 
    138139            } 
     
    144145 
    145146         static string CurrContext; 
    146          static HashMap<string, StrHashMap<T> > AllListObj; 
     147         static Poco::HashMap<string, StrHashMap<T> > AllListObj; 
    147148 
    148149   };// class ObjectTemplate 
    149150 
    150151   template <class T> string ObjectTemplate<T>::CurrContext ; 
    151    template <class T> HashMap<string, StrHashMap<T> > ObjectTemplate<T>::AllListObj; 
     152   template <class T> Poco::HashMap<string, StrHashMap<T> > ObjectTemplate<T>::AllListObj; 
    152153 
    153154}// namespace XMLIOSERVER 
Note: See TracChangeset for help on using the changeset viewer.