1 | #ifndef __FIELD_GROUP__ |
---|
2 | #define __FIELD_GROUP__ |
---|
3 | |
---|
4 | |
---|
5 | using XMLIOSERVER::XML::THashAttributes; |
---|
6 | |
---|
7 | namespace 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 | |
---|