Ignore:
Timestamp:
10/11/10 16:10:10 (14 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

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

    r127 r128  
    55{ 
    66   template <class T, class U> 
    7       class GroupTemplate : public ObjectTemplate<GroupTemplate<T, U> >, public U 
     7      class GroupTemplate : public ObjectTemplate<GroupTemplate<T, U> >, public virtual U 
    88   { 
    99      public: 
    1010 
     11         DECLARE_ATTR(group_ref, string) ; // Attribut présent uniqument dans les groupes. 
     12 
    1113         GroupTemplate(void) 
    12             : ObjectTemplate<GroupTemplate<T, U> >(),  U(), childList(), groupList() 
    13          { /* Ne rien faire de plus */ } 
     14            : ObjectTemplate<GroupTemplate<T, U> >()/*,  U()*/, childList(), groupList() 
     15         { RegisterAttribut(&group_ref) ; } 
    1416 
    1517         GroupTemplate(const string& _id) 
    16             : ObjectTemplate<GroupTemplate<T, U> >(_id), U(), childList(), groupList() 
    17          { /* Ne rien faire de plus */ } 
     18            : ObjectTemplate<GroupTemplate<T, U> >(_id)/*, U()*/, childList(), groupList() 
     19         { RegisterAttribut(&group_ref) ; } 
    1820 
    1921         /// Pour les groupes d'objets enfants /// 
     
    6264            return (obj); 
    6365         } 
     66 
     67         T& createChildRef(const T* const _ori) 
     68         { return (*_ori); } 
    6469 
    6570         T& getChild(const string& _id) const 
     
    97102               delete groupList.getVector()[i]; 
    98103         } 
     104 
     105         virtual void solveRefInheritance (void) 
     106         { /* Ne rien faire de plus */ } 
    99107 
    100108         virtual bool hasChild(void) const { return ((getNbGroup() + getNbChild())>0); } 
     
    109117         } 
    110118 
    111          virtual void resolveDescInheritance(const AttributRegistrar* const _parent = 0) 
     119         virtual void solveDescInheritance(const AttributRegistrar* const _parent = 0) 
    112120         { 
    113121            const vector<T*>&  childvect = childList.getVector(); 
     
    119127            for(unsigned int i = 0; i < childvect.size() ; i++) 
    120128            // on complÚte les attributs des enfants. 
    121                childvect[i] -> resolveDescInheritance(this); 
     129               childvect[i] -> solveDescInheritance(this); 
    122130 
    123131            for(unsigned int i = 0; i < groupvect.size() ; i++) 
    124             // on complÚte les attributs des groupes enfants. 
    125                groupvect[i] -> resolveDescInheritance(this); 
     132            { // on complÚte les attributs des groupes enfants. 
     133               groupvect[i] -> solveRefInheritance (); 
     134               groupvect[i] -> solveDescInheritance(this); 
     135            } 
    126136         } 
    127137 
     
    144154                  _parse<W> (_node_inc); 
    145155               } 
     156 
    146157               attributes.clear(); 
    147158            } 
Note: See TracChangeset for help on using the changeset viewer.