Ignore:
Timestamp:
10/07/10 16:17:04 (14 years ago)
Author:
hozdoba
Message:

suite du précédent commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp

    r125 r127  
    1616         {/* Ne rien faire de plus */} 
    1717 
    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  
    3918         AbstractDataOutput* getDataOutput(void) const { return (output); } 
    4019         void initializeDataOutput(AbstractDataOutput* _output) 
     
    5029         { 
    5130            std::set<const CGrid*> sgrid; 
    52             const std::vector<CField*> enabledFields = getEnabledFields(); 
     31            const std::vector<CField*> enabledFields = this->getEnabledFields(); 
    5332            std::vector<CField*>::const_iterator it; 
    5433 
     
    5938         } 
    6039 
     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 
    6153         const std::set<const CDomain*> getEnabledDomains(void) const 
    6254         { 
    63             const std::set<const CGrid*> sgrid = getEnabledGrids(); 
     55            const std::set<const CGrid*> sgrid = this->getEnabledGrids(); 
    6456            std::set<const CDomain*> sdomain; 
    6557 
     
    7466         const std::set<const CAxis*> getEnabledAxis(void) const 
    7567         { 
    76             const std::set<const CGrid*> sgrid = getEnabledGrids(); 
     68            const std::set<const CGrid*> sgrid = this->getEnabledGrids(); 
    7769            std::set<const CAxis*> saxis; 
    7870 
     
    8476            return (saxis); 
    8577         } 
    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(); } 
    9278 
    9379         void resolveFieldRefInheritance(void) 
     
    144130         } 
    145131 
     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 
    146158         virtual  ~CFile(void) 
    147159         { 
     
    149161            if(output != NULL) delete output; 
    150162         } 
     163 
     164      public : /* static */ 
     165 
     166         static string GetName(void) { return ("file"); } 
     167         static string GetDefName(void)  { return (CFile::GetName()); } 
    151168 
    152169      private : 
Note: See TracChangeset for help on using the changeset viewer.