source: XMLIO_V2/dev/dev_rv/field_group.hpp @ 91

Last change on this file since 91 was 91, checked in by hozdoba, 13 years ago

Corrections de plusieurs problÚmes.

File size: 1.7 KB
Line 
1#ifndef __FIELD_GROUP__
2#define __FIELD_GROUP__
3
4
5using XMLIOSERVER::XML::THashAttributes;
6
7namespace XMLIOSERVER
8{   
9   class FieldGroup : public GroupTemplate<Field, FieldAttribut>
10   {
11      public:
12     
13         FieldGroup(void) : GroupTemplate<Field, FieldAttribut>()
14         {/* Ne rien faire de plus */}               
15         FieldGroup(const string& _id) : GroupTemplate<Field, FieldAttribut>(_id)
16         {/* Ne rien faire de plus */}
17         
18         void setAttributes(const THashAttributes& attr)
19         {
20            for (THashAttributes::ConstIterator it = attr.begin(); it != attr.end(); it++)
21               if ((*it).first.compare(string("id"))) // Non prise en compte de l'identifiant lors de l'affectation des attributs.
22                  this->setSAttribut((*it).first, (*it).second);
23           
24            return;
25         }
26                 
27         virtual const char* getName(void) const {return ("FieldGroup"); } 
28         
29         void parse (XMLNode& _node, bool isFieldDef = false)
30         {
31            string name = _node.getElementName();           
32            THashAttributes attributes;
33            std::cout << "Traitement de " << name << std::endl;
34           
35            /// PARSING GESTION DES ATTRIBUTS ///
36            _node.getAttributes(attributes); 
37            this->setAttributes(attributes);
38            attributes.clear();
39               
40            /// PARSING POUR GESION DES ENFANTS
41            // A compléter.
42               
43            return;
44         }
45         
46         ~FieldGroup(void) 
47         {/* Ne rien faire de plus */}   
48         
49   }; // class FieldGroup
50     
51   typedef FieldGroup FieldDefinition ;
52   
53}; // namespace XMLIOSERVER
54   
55#endif // __FIELD_GROUP__
56
Note: See TracBrowser for help on using the repository browser.