Ignore:
Timestamp:
05/30/11 15:17:48 (10 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp

    r188 r206  
    88#include "functor_type.hpp" 
    99#include "duration.hpp" 
     10#include "date.hpp" 
    1011#include "declare_group.hpp" 
    1112 
     
    6263         const date::CDuration & getFreqOperation(void) const; 
    6364         const date::CDuration & getFreqWrite(void) const; 
    64           
     65 
     66         boost::shared_ptr<date::CDate> getLastWriteDate(void) const; 
     67         boost::shared_ptr<date::CDate> getLastOperationDate(void) const; 
     68 
    6569         boost::shared_ptr<func::CFunctor> getFieldOperation(void) const; 
    6670          
     
    7175         /// Mutateur /// 
    7276         void setRelFile(const boost::shared_ptr<CFile> _file); 
     77 
     78         template <StdSize N> 
     79            inline bool updateData 
     80               (const date::CDate & currDate, const ARRAY(double, N) data); 
     81 
     82         bool updateDataServer 
     83               (const date::CDate & currDate, const std::deque<ARRAY(double, 1)> storedClient); 
    7384 
    7485      public : 
     
    103114 
    104115         date::CDuration freq_operation, freq_write; 
     116 
     117         boost::shared_ptr<date::CDate>    last_Write, last_operation; 
    105118         boost::shared_ptr<func::CFunctor> foperation; 
    106119          
     
    121134      void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void); 
    122135 
     136   ///----------------------------------------------------------------- 
     137} // namespace xmlioserver 
     138 
     139#include "grid.hpp" 
     140 
     141namespace xmlioserver { 
     142namespace tree { 
     143 
     144   template <StdSize N> 
     145      bool CField::updateData(const date::CDate & currDate, const ARRAY(double, N) data) 
     146   { 
     147      if ((*last_operation + freq_operation) >= currDate) 
     148      { 
     149         ARRAY_CREATE(input, double, 1, [0]); 
     150         input->resize(boost::extents[data->size()]); 
     151         this->grid->inputField(data, input); 
     152         (*this->foperation)(input); 
     153         *last_operation = currDate; 
     154      } 
     155       
     156      if ((*last_Write + freq_write) >= currDate) 
     157      { 
     158         *last_Write = currDate; 
     159         return (true); 
     160      } 
     161      return (false); 
     162   }; 
     163 
     164} // namespace tree 
    123165} // namespace xmlioserver 
    124166 
Note: See TracChangeset for help on using the changeset viewer.