Changeset 106 for XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp
- Timestamp:
- 06/14/10 15:32:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp
r105 r106 9 9 public: 10 10 11 Context(void) : ObjectTemplate<Context>(), fieldDef(NULL) 11 Context(void) : ObjectTemplate<Context>(), fieldDef(NULL), fileDef(NULL) 12 12 {/* Ne rien faire de plus */} 13 Context(const string& _id) : ObjectTemplate<Context>(_id), fieldDef(NULL) 13 Context(const string& _id) : ObjectTemplate<Context>(_id), fieldDef(NULL), fileDef(NULL) 14 14 {/* Ne rien faire de plus */} 15 15 … … 18 18 // On modifie le context courrant pour tout les ObjectTemplate 19 19 Context::SetContext(id); 20 21 // Changement de context pour les champs et groupes de champs. 20 22 FieldGroup::SetContext(id); 21 Field::SetContext(id); 23 CField::SetContext(id); 24 25 // Changement de context pour les champs et groupes de champs. 26 FileGroup::SetContext(id); 27 CFile::SetContext(id); 22 28 } 23 29 … … 25 31 { 26 32 out << IncIndent << "<" << c.getName()<< " id=\"" << c.getId() << "\">" << std::endl; 33 27 34 if(c.fieldDef != NULL) out << *(FieldGroup*)c.fieldDef << std::endl; 35 if(c.fileDef != NULL) out << *(FileGroup*) c.fileDef << std::endl; 36 28 37 out << NIndent << "</" << c.getName()<< ">" << DecEndl; 29 38 return (out); … … 34 43 // Résolution des héritages descendants pour chacun des groupes de définitions. 35 44 if(fieldDef != NULL) fieldDef->resolveDescInheritance(); 45 if(fileDef != NULL) fileDef->resolveDescInheritance(); 36 46 } 37 47 … … 70 80 } 71 81 else if (name.compare("file_definition") == 0) 72 { // Parsing pour la définition des fichiers. 73 INFO("Le parsing des définitions de fichiers n'est pas encore implémenté"); 82 { // Parsing pour la définition des fichiers. 83 84 if (FileDefinition::HasObject("file_definition")) 85 WARNING("Le context possÚde déjà un noeud de définition de fichiers, le dernier défini complétera le premier !"); 86 87 fileDef = (FileDefinition*)&FileDefinition::CreateObject("file_definition"); // << Conversion possible car la classe Field n'a pas de propriétés. 88 fileDef->parse(_node); 89 90 continue; 74 91 } 75 92 else if (name.compare("axis_definition") == 0) … … 97 114 98 115 FieldDefinition* getFieldDefinition(void) { return (this->fieldDef); } 116 FileDefinition* getFileDefinition(void) { return (this->fileDef); } 99 117 100 118 ~Context() 101 { if(fieldDef != NULL) delete fieldDef; } 119 { 120 if(fieldDef != NULL) delete fieldDef; 121 if(fileDef != NULL) delete fileDef; 122 } 102 123 103 124 … … 105 126 106 127 FieldDefinition* fieldDef; 107 /*FileDefinition*fileDef;108 AxisDefinition* axisDef;128 FileDefinition* fileDef; 129 /*AxisDefinition* axisDef; 109 130 GridDefinition* gridDef;*/ 110 131
Note: See TracChangeset
for help on using the changeset viewer.