Last change
on this file since 108 was
108,
checked in by hozdoba, 14 years ago
|
Début de prise en charge des références (sans contrÎle ni transmission d'attribut pour le moment).
|
File size:
1.4 KB
|
Rev | Line | |
---|
[98] | 1 | #ifndef __FIELD__ |
---|
| 2 | #define __FIELD__ |
---|
[79] | 3 | |
---|
[98] | 4 | using XMLIOSERVER::XML::XMLNode; |
---|
| 5 | using XMLIOSERVER::XML::THashAttributes; |
---|
[79] | 6 | |
---|
[98] | 7 | namespace XMLIOSERVER |
---|
[79] | 8 | { |
---|
[106] | 9 | class CField : public ObjectTemplate<CField>, public FieldAttribut |
---|
[98] | 10 | { |
---|
| 11 | public: |
---|
[107] | 12 | |
---|
[106] | 13 | CField(void) : ObjectTemplate<CField>(), FieldAttribut() |
---|
[107] | 14 | {/* Ne rien faire de plus */} |
---|
| 15 | CField(const string& _id) : ObjectTemplate<CField>(_id), FieldAttribut() |
---|
| 16 | {/* Ne rien faire de plus */} |
---|
| 17 | |
---|
| 18 | static string GetName(void) {return ("field"); } |
---|
| 19 | |
---|
[108] | 20 | virtual CField* getReference(void) const |
---|
| 21 | { |
---|
| 22 | if(!field_ref._hasValue()) return (NULL); |
---|
| 23 | string refname = field_ref; |
---|
| 24 | if (!CField::HasObject(refname)) |
---|
| 25 | { WARNING("Référence invalide sur l'objet "+GetName()+" nommé \""+refname+"\""); return (NULL);} |
---|
| 26 | |
---|
| 27 | return (&CField::GetObject(field_ref)); |
---|
| 28 | } |
---|
| 29 | |
---|
[107] | 30 | void parse (XMLNode& _node) |
---|
[98] | 31 | { |
---|
[107] | 32 | string name = _node.getElementName(); |
---|
| 33 | THashAttributes attributes; |
---|
[79] | 34 | |
---|
[98] | 35 | /// PARSING GESTION DES ATTRIBUTS /// |
---|
[107] | 36 | _node.getAttributes(attributes); |
---|
[98] | 37 | this->setAttributes(attributes); |
---|
| 38 | attributes.clear(); |
---|
[107] | 39 | |
---|
[98] | 40 | /// PARSING POUR GESION DES ENFANTS |
---|
| 41 | // Rien à faire. |
---|
| 42 | } |
---|
[107] | 43 | |
---|
| 44 | ~CField(void) |
---|
| 45 | { /* Ne rien faire de plus */ } |
---|
| 46 | |
---|
| 47 | }; // class Field |
---|
| 48 | |
---|
[98] | 49 | }; // namespace XMLIOSERVER |
---|
[107] | 50 | |
---|
[98] | 51 | #endif // __FIELD__ |
---|
Note: See
TracBrowser
for help on using the repository browser.