Last change
on this file since 97 was
96,
checked in by hozdoba, 14 years ago
|
Suppression de nombreuses fuites mémoires (200kbytes)
|
File size:
1.5 KB
|
Rev | Line | |
---|
[88] | 1 | #ifndef __FIELD__ |
---|
| 2 | #define __FIELD__ |
---|
| 3 | |
---|
[91] | 4 | using XMLIOSERVER::XML::XMLNode; |
---|
[95] | 5 | using XMLIOSERVER::XML::THashAttributes; |
---|
[91] | 6 | |
---|
[88] | 7 | namespace XMLIOSERVER |
---|
| 8 | { |
---|
[95] | 9 | class Field : public ObjectTemplate<Field>, public FieldAttribut |
---|
[88] | 10 | { |
---|
| 11 | public: |
---|
[95] | 12 | Field(void) : ObjectTemplate<Field>(), FieldAttribut() |
---|
[88] | 13 | {/* Ne rien faire de plus */} |
---|
[95] | 14 | Field(const string& _id) : ObjectTemplate<Field>(_id), FieldAttribut() |
---|
[88] | 15 | {/* Ne rien faire de plus */} |
---|
| 16 | |
---|
[95] | 17 | void setAttributes(const THashAttributes& attr) |
---|
| 18 | { |
---|
| 19 | for (THashAttributes::ConstIterator it = attr.begin(); it != attr.end(); it++) |
---|
| 20 | if ((*it).first.compare(string("id"))) // Non prise en compte de l'identifiant lors de l'affectation des attributs. |
---|
| 21 | this->setSAttribut((*it).first, (*it).second); |
---|
| 22 | |
---|
| 23 | return; |
---|
| 24 | } |
---|
| 25 | |
---|
[88] | 26 | virtual const char* getName(void) const {return ("Field"); } |
---|
| 27 | |
---|
| 28 | void parse (XMLNode& _node) |
---|
| 29 | { |
---|
[95] | 30 | string name = _node.getElementName(); |
---|
| 31 | THashAttributes attributes; |
---|
| 32 | |
---|
[88] | 33 | /// PARSING GESTION DES ATTRIBUTS /// |
---|
[95] | 34 | _node.getAttributes(attributes); |
---|
| 35 | this->setAttributes(attributes); |
---|
| 36 | attributes.clear(); |
---|
[88] | 37 | |
---|
| 38 | /// PARSING POUR GESION DES ENFANTS |
---|
| 39 | // Rien à faire. |
---|
| 40 | |
---|
| 41 | return; |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | ~Field(void) |
---|
[96] | 45 | { /* Ne rien faire de plus */ } |
---|
[88] | 46 | |
---|
| 47 | }; // class Field |
---|
| 48 | |
---|
| 49 | }; // namespace XMLIOSERVER |
---|
| 50 | |
---|
| 51 | #endif // __FIELD__ |
---|
Note: See
TracBrowser
for help on using the repository browser.