Ignore:
Timestamp:
11/02/15 11:46:25 (9 years ago)
Author:
mhnguyen
Message:

Implementing the reading of attributes of an axis from a file

+) 3d grid can be read directly from a file
+) Clean some redundant codes
+) Add new attribute declaration that allows to output only desired attributes

Test
+) On Curie
+) test_remap passes and result is correct

File:
1 edited

Legend:

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

    r591 r775  
    1212#include "buffer_out.hpp" 
    1313#include "type.hpp" 
    14  
     14#include "attribute_public.hpp" 
    1515 
    1616namespace xios 
     
    1818      /// ////////////////////// Déclarations ////////////////////// /// 
    1919      template <class T> 
    20          class CAttributeTemplate : public CAttribute, public CType<T> 
     20         class CAttributeTemplate : public CAttribute, public CType<T>, public PublicAttributes 
    2121      { 
    2222            typedef CAttribute SuperClass; 
     
    4545            /// Mutateurs /// 
    4646            void setValue(const ValueType & value); 
    47              
     47 
    4848            void set(const CAttribute& attr) ; 
    4949            void set(const CAttributeTemplate& attr) ; 
     
    5454            T getInheritedValue(void) const ; 
    5555            bool hasInheritedValue(void) const; 
    56              
     56 
    5757            /// Destructeur /// 
    5858            virtual ~CAttributeTemplate(void) { } 
     
    6666//            virtual CAttributeTemplate* clone() const {} 
    6767//            virtual void toBinary  (StdOStream & os) const; 
    68 //            virtual void fromBinary(StdIStream & is);             
     68//            virtual void fromBinary(StdIStream & is); 
    6969 
    70             virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);}  
    71             virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); }  
     70            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} 
     71            virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } 
    7272//            virtual size_t size(void) const; 
    7373            virtual void generateCInterface(ostream& oss,const string& className) ; 
     
    8383//            virtual void generateFortranInterfaceIsDefinedDeclaration(ostream& oss,const string& className) ; 
    8484 
    85        
     85 
    8686         protected : 
    8787 
     
    9393          bool _toBuffer  (CBufferOut& buffer) const; 
    9494          bool _fromBuffer(CBufferIn& buffer) ; 
    95            
     95 
    9696          CType<T> inheritedValue ; 
    97       }; // class CAttribute     
    98        
    99     
     97      }; // class CAttribute 
     98 
     99 
    100100   template <class T>  void FromBinary(StdIStream & is, T & obj); 
    101     
     101 
    102102} // namespace xios 
    103103 
Note: See TracChangeset for help on using the changeset viewer.