Changeset 127 for XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp
- Timestamp:
- 10/07/10 16:17:04 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp
r125 r127 16 16 {/* Ne rien faire de plus */} 17 17 18 static string GetName(void) { return ("file"); }19 static string GetDefName(void) { return (CFile::GetName()); }20 21 virtual void parse (XMLNode& _node)22 {23 string name = _node.getElementName();24 THashAttributes attributes;25 26 /// PARSING GESTION DES ATTRIBUTS ///27 _node.getAttributes(attributes);28 this->setAttributes(attributes);29 attributes.clear();30 31 /// PARSING POUR GESION DES ENFANTS ///32 if (_node.goToChildElement() and hasId())33 { // Si la définition du fichier intégre des champs et si le fichier est identifié.34 _node.goToParentElement();35 vfieldGroup = CreateInstanceAndParse<FieldGroup>(_node, getId().c_str(), false );36 }37 }38 39 18 AbstractDataOutput* getDataOutput(void) const { return (output); } 40 19 void initializeDataOutput(AbstractDataOutput* _output) … … 50 29 { 51 30 std::set<const CGrid*> sgrid; 52 const std::vector<CField*> enabledFields = getEnabledFields();31 const std::vector<CField*> enabledFields = this->getEnabledFields(); 53 32 std::vector<CField*>::const_iterator it; 54 33 … … 59 38 } 60 39 40 const std::set<const FieldOperation*> getEnabledOperation(void) const 41 { 42 std::set<const FieldOperation*> sope; 43 const std::vector<CField*> enabledFields = this->getEnabledFields(); 44 std::vector<CField*>::const_iterator it; 45 46 for ( it = enabledFields.begin() ; it != enabledFields.end(); it++ ) 47 if ((*it)->operation.hasValue()) 48 sope.insert((FieldOperation*)&(*it)->operation); 49 50 return (sope); 51 } 52 61 53 const std::set<const CDomain*> getEnabledDomains(void) const 62 54 { 63 const std::set<const CGrid*> sgrid = getEnabledGrids();55 const std::set<const CGrid*> sgrid = this->getEnabledGrids(); 64 56 std::set<const CDomain*> sdomain; 65 57 … … 74 66 const std::set<const CAxis*> getEnabledAxis(void) const 75 67 { 76 const std::set<const CGrid*> sgrid = getEnabledGrids();68 const std::set<const CGrid*> sgrid = this->getEnabledGrids(); 77 69 std::set<const CAxis*> saxis; 78 70 … … 84 76 return (saxis); 85 77 } 86 87 virtual bool hasChild(void) const { return (vfieldGroup != NULL); }88 virtual void printChild(ostream& out) const { out << *vfieldGroup << std::endl; }89 90 virtual void resolveDescInheritance(const AttributRegistrar* const _parent = 0)91 { addAttributes(*_parent); if(vfieldGroup != NULL) vfieldGroup->resolveDescInheritance(); }92 78 93 79 void resolveFieldRefInheritance(void) … … 144 130 } 145 131 132 public : /* virtual */ 133 134 virtual void parse (XMLNode& _node) 135 { 136 string name = _node.getElementName(); 137 THashAttributes attributes; 138 139 /// PARSING GESTION DES ATTRIBUTS /// 140 _node.getAttributes(attributes); 141 this->setAttributes(attributes); 142 attributes.clear(); 143 144 /// PARSING POUR GESION DES ENFANTS /// 145 if (_node.goToChildElement() and hasId()) 146 { // Si la définition du fichier intégre des champs et si le fichier est identifié. 147 _node.goToParentElement(); 148 vfieldGroup = CreateInstanceAndParse<FieldGroup>(_node, getId().c_str(), false ); 149 } 150 } 151 152 virtual bool hasChild(void) const { return (vfieldGroup != NULL); } 153 virtual void printChild(ostream& out) const { out << *vfieldGroup << std::endl; } 154 155 virtual void resolveDescInheritance(const AttributRegistrar* const _parent = 0) 156 { addAttributes(*_parent); if(vfieldGroup != NULL) vfieldGroup->resolveDescInheritance(); } 157 146 158 virtual ~CFile(void) 147 159 { … … 149 161 if(output != NULL) delete output; 150 162 } 163 164 public : /* static */ 165 166 static string GetName(void) { return ("file"); } 167 static string GetDefName(void) { return (CFile::GetName()); } 151 168 152 169 private :
Note: See TracChangeset
for help on using the changeset viewer.