Changeset 771


Ignore:
Timestamp:
10/30/15 16:33:49 (8 years ago)
Author:
rlacroix
Message:

Remove the now unused base reference framework.

Location:
XIOS/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/declare_ref_func.hpp

    r770 r771  
    1414#define DECLARE_REF_FUNC(type, name_)                       \ 
    1515public:                                                     \ 
     16  void solveRefInheritance(bool apply = true);              \ 
     17  void removeRefInheritance();                              \ 
    1618  bool hasDirect##type##Reference(void) const;              \ 
    1719  C##type* getDirect##type##Reference(void) const;          \ 
    18   C##type* getBase##type##Reference(void) const;            \ 
    19   void removeRefInheritance();                              \ 
    20   const StdString& getBase##type##Id(void) const;           \ 
    21   void solveRefInheritance(bool apply = true);              \ 
    22   void solveBaseReference(void);                            \ 
    2320  const StdString& get##type##OutputName(void) const;       \ 
    24                                                             \ 
    25 private:                                                    \ 
    26   C##type* baseRefObject;                                   \ 
    2721 
    2822// Definitions 
     
    5751}                                                                      \ 
    5852                                                                       \ 
    59 void C##type::solveBaseReference(void)                                 \ 
     53bool C##type::hasDirect##type##Reference(void) const                   \ 
    6054{                                                                      \ 
    61   std::set<C##type*> refObjects;                                       \ 
    62   baseRefObject = C##type::get(this);                                  \ 
    63                                                                        \ 
    64   while (baseRefObject->hasDirect##type##Reference())                  \ 
    65   {                                                                    \ 
    66     refObjects.insert(baseRefObject);                                  \ 
    67                                                                        \ 
    68     baseRefObject = baseRefObject->getDirect##type##Reference();       \ 
    69                                                                        \ 
    70     if (refObjects.end() != refObjects.find(baseRefObject))            \ 
    71     {                                                                  \ 
    72       ERROR("void C" #type "::solveBaseReference(void)",               \ 
    73             << "Circular dependency stopped for " #name_ " object "    \ 
    74             << "with id = \"" << baseRefObject->getId() << "\".");     \ 
    75     }                                                                  \ 
    76   }                                                                    \ 
     55  return !this->name_##_ref.isEmpty();                                 \ 
    7756}                                                                      \ 
    7857                                                                       \ 
     
    8059{                                                                      \ 
    8160  if (this->name_##_ref.isEmpty())                                     \ 
    82     return this->getBase##type##Reference();                           \ 
     61    ERROR("C" #type "* C" #type "::getDirect" #type "Reference(void)", \ 
     62          << "The " #name_ " with id = '" << getId() << "'"            \ 
     63          << " has no " #name_ "_ref.");                               \ 
    8364                                                                       \ 
    8465  if (!C##type::has(this->name_##_ref))                                \ 
     
    8869                                                                       \ 
    8970  return C##type::get(this->name_##_ref);                              \ 
    90 }                                                                      \ 
    91                                                                        \ 
    92 C##type* C##type::getBase##type##Reference(void) const                 \ 
    93 {                                                                      \ 
    94   return baseRefObject;                                                \ 
    95 }                                                                      \ 
    96                                                                        \ 
    97 const StdString& C##type::getBase##type##Id(void) const                \ 
    98 {                                                                      \ 
    99   return this->getBase##type##Reference()->getId();                    \ 
    100 }                                                                      \ 
    101 bool C##type::hasDirect##type##Reference(void) const                   \ 
    102 {                                                                      \ 
    103   return !this->name_##_ref.isEmpty();                                 \ 
    10471}                                                                      \ 
    10572                                                                       \ 
  • XIOS/trunk/src/node/axis.cpp

    r754 r771  
    2323   CAxis::CAxis(void) 
    2424      : CObjectTemplate<CAxis>() 
    25       , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false) 
     25      , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false) 
    2626      , isDistributed_(false), hasBounds_(false), isCompressible_(false) 
    2727      , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) 
     
    3232   CAxis::CAxis(const StdString & id) 
    3333      : CObjectTemplate<CAxis>(id) 
    34       , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false) 
     34      , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false) 
    3535      , isDistributed_(false), hasBounds_(false), isCompressible_(false) 
    3636      , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) 
  • XIOS/trunk/src/node/field.cpp

    r770 r771  
    3030   CField::CField(void) 
    3131      : CObjectTemplate<CField>(), CFieldAttributes() 
    32       , baseRefObject() 
    3332      , grid(), file() 
    3433      , written(false) 
     
    4241   CField::CField(const StdString& id) 
    4342      : CObjectTemplate<CField>(id), CFieldAttributes() 
    44       , baseRefObject() 
    4543      , grid(), file() 
    4644      , written(false) 
     
    504502        { 
    505503          solveRefInheritance(true); 
    506           solveBaseReference(); 
    507504          if (hasDirectFieldReference()) getDirectFieldReference()->solveAllReferenceEnabledField(false); 
    508505        } 
  • XIOS/trunk/src/node/file.cpp

    r770 r771  
    161161         // Le champ est finalement actif, on y ajoute la référence au champ de base. 
    162162         (*it)->setRelFile(CFile::get(this)); 
    163 //         (*it)->baseRefObject->refObject.push_back(*it); 
    164          // A faire, ajouter les references intermediaires... 
    165163      } 
    166164      enabledFields = newEnabledFields; 
  • XIOS/trunk/src/node/grid.cpp

    r764 r771  
    12211221      { 
    12221222        pDom->solveRefInheritance(apply); 
    1223         pDom->solveBaseReference(); 
    12241223        pDom->solveSrcInheritance(); 
    12251224        pDom->solveInheritanceTransformation(); 
     
    12351234      { 
    12361235        pAxis->solveRefInheritance(apply); 
    1237         pAxis->solveBaseReference(); 
    12381236        pAxis->solveInheritanceTransformation(); 
    12391237      } 
Note: See TracChangeset for help on using the changeset viewer.