Changeset 707 for XIOS/trunk/src/node


Ignore:
Timestamp:
09/24/15 15:55:17 (9 years ago)
Author:
rlacroix
Message:

Append mode: Detect the correct restart point and erase some records if need be.

Location:
XIOS/trunk/src/node
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.cpp

    r687 r707  
    3232      , refObject(), baseRefObject() 
    3333      , grid(), file() 
     34      , written(false) 
    3435      , nstep(0), nstepMax(0) 
    3536      , hasOutputFile(false) 
     
    4344      , refObject(), baseRefObject() 
    4445      , grid(), file() 
     46      , written(false) 
    4547      , nstep(0), nstepMax(0) 
    4648      , hasOutputFile(false) 
     
    442444   } 
    443445 
    444    void CField::resetNStep(void) 
    445    { 
    446       this->nstep = 0; 
     446   void CField::resetNStep(StdSize nstep /*= 0*/) 
     447   { 
     448      this->nstep = nstep; 
    447449   } 
    448450 
     
    457459   { 
    458460      return !this->refObject.empty(); 
     461   } 
     462 
     463   //---------------------------------------------------------------- 
     464 
     465   bool CField::wasWritten() const 
     466   { 
     467     return written; 
     468   } 
     469 
     470   void CField::setWritten() 
     471   { 
     472     written = true; 
    459473   } 
    460474 
  • XIOS/trunk/src/node/field.hpp

    r687 r707  
    5656         typedef CFieldAttributes SuperClassAttribute; 
    5757 
    58       public : 
     58      public: 
    5959 
    6060         typedef CFieldAttributes RelAttributes; 
     
    8080         func::CFunctor::ETimeType getOperationTimeType() const; 
    8181 
    82       public : 
    83  
     82      public: 
    8483         StdSize getNStep(void) const; 
    8584 
     
    9190         void setRelFile(CFile* _file); 
    9291         void incrementNStep(void); 
    93          void resetNStep(); 
     92         void resetNStep(StdSize nstep = 0); 
    9493         void resetNStepMax(); 
    9594 
    9695         std::map<int, StdSize> getGridDataSize(); 
    9796 
    98        public : 
     97       public: 
    9998         bool isActive(void) const; 
    10099         bool hasOutputFile; 
     100 
     101         bool wasWritten() const; 
     102         void setWritten(); 
    101103 
    102104         bool getUseCompressedOutput() const; 
     
    170172        const std::pair<StdString, StdString>& getRefDomainAxisIds(); 
    171173 
    172       public : 
     174      public: 
    173175         /// Propriétés privées /// 
    174176         CVariableGroup* vVariableGroup; 
     
    179181         CDuration freq_operation_srv, freq_write_srv; 
    180182 
     183         bool written; //<! Was the field written at least once 
    181184         StdSize nstep, nstepMax; 
    182185         bool isEOF; 
Note: See TracChangeset for help on using the changeset viewer.