Changeset 128 for XMLIO_V2/dev/dev_rv/src/XMLIO/group_template.hpp
- Timestamp:
- 10/11/10 16:10:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/group_template.hpp
r127 r128 5 5 { 6 6 template <class T, class U> 7 class GroupTemplate : public ObjectTemplate<GroupTemplate<T, U> >, public U7 class GroupTemplate : public ObjectTemplate<GroupTemplate<T, U> >, public virtual U 8 8 { 9 9 public: 10 10 11 DECLARE_ATTR(group_ref, string) ; // Attribut présent uniqument dans les groupes. 12 11 13 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) ; } 14 16 15 17 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) ; } 18 20 19 21 /// Pour les groupes d'objets enfants /// … … 62 64 return (obj); 63 65 } 66 67 T& createChildRef(const T* const _ori) 68 { return (*_ori); } 64 69 65 70 T& getChild(const string& _id) const … … 97 102 delete groupList.getVector()[i]; 98 103 } 104 105 virtual void solveRefInheritance (void) 106 { /* Ne rien faire de plus */ } 99 107 100 108 virtual bool hasChild(void) const { return ((getNbGroup() + getNbChild())>0); } … … 109 117 } 110 118 111 virtual void resolveDescInheritance(const AttributRegistrar* const _parent = 0)119 virtual void solveDescInheritance(const AttributRegistrar* const _parent = 0) 112 120 { 113 121 const vector<T*>& childvect = childList.getVector(); … … 119 127 for(unsigned int i = 0; i < childvect.size() ; i++) 120 128 // on complÚte les attributs des enfants. 121 childvect[i] -> resolveDescInheritance(this);129 childvect[i] -> solveDescInheritance(this); 122 130 123 131 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 } 126 136 } 127 137 … … 144 154 _parse<W> (_node_inc); 145 155 } 156 146 157 attributes.clear(); 147 158 }
Note: See TracChangeset
for help on using the changeset viewer.