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

Last change on this file since 88 was 88, checked in by hozdoba, 14 years ago

Version expérimentale, commit pour sauvegarde.

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