Ignore:
Timestamp:
10/16/12 13:04:44 (12 years ago)
Author:
ymipsl
Message:

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

File:
1 edited

Legend:

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

    r352 r369  
    1616{ 
    1717      /// ////////////////////// Déclarations ////////////////////// /// 
    18       class CAttribute : public CObject, public CBaseType 
     18      class CAttribute : public CObject, public virtual CBaseType 
    1919      { 
    2020            typedef CObject SuperClass; 
     
    2424            /// Constructeurs /// 
    2525            explicit CAttribute(const StdString & id); 
    26             CAttribute(const CAttribute & attribut); 
    27             CAttribute(const CAttribute * const attribut); // Not implemented. 
     26//            CAttribute(const CAttribute & attribut); 
     27//            CAttribute(const CAttribute * const attribut); // Not implemented. 
    2828 
    2929            /// Accesseurs /// 
    3030            const StdString & getName(void) const; 
    31             const boost::any & getAnyValue(void) const; 
    32             template <typename T> inline T getValue(void) const; 
    33             template <typename T> inline T* getRef(void); 
     31//            const boost::any & getAnyValue(void) const; 
     32//            template <typename T> inline T getValue(void) const; 
     33//            template <typename T> inline T* getRef(void); 
    3434 
    35             /// Mutateurs /// 
    36             template <typename T> inline void setValue(const T & value); 
    37             void setAnyValue(const boost::any & value); 
    38             void clear(void); 
     35//            /// Mutateurs /// 
     36//            template <typename T> inline void setValue(const T & value); 
     37//            void setAnyValue(const boost::any & value); 
     38//            void clear(void); 
    3939 
    4040            /// Test /// 
    41             bool isEmpty(void) const; 
    42             template <typename T> inline bool isType(void) const; 
    43  
     41//            bool isEmpty(void) const; 
     42//            template <typename T> inline bool isType(void) const; 
     43            virtual void set(const CAttribute& ) =0 ; 
    4444            /// Destructeur /// 
    4545            virtual ~CAttribute(void); 
     
    4949            virtual void fromString(const StdString & str) = 0; 
    5050 
    51             virtual void toBinary  (StdOStream & os) const = 0; 
    52             virtual void fromBinary(StdIStream & is) = 0; 
     51//            virtual void toBinary  (StdOStream & os) const = 0; 
     52//            virtual void fromBinary(StdIStream & is) = 0; 
     53 
    5354            virtual void generateCInterface(ostream& oss, const string& className) = 0 ; 
    5455            virtual void generateFortran2003Interface(ostream& oss, const string& className) = 0 ; 
     
    6566 
    6667            /// Constructeurs /// 
    67             CAttribute(void);  // Not implemented. 
     68//            CAttribute(void);  // Not implemented. 
    6869 
    6970            /// Propriété /// 
    70             boost::any value; 
     71//            boost::any value; 
    7172 
    7273      }; // class CAttribute 
    7374 
    7475      /// ////////////////////// Définitions ////////////////////// /// 
     76/* 
    7577      template <typename T> 
    7678         T CAttribute::getValue(void) const 
     
    9698         return (this->value.type() == typeid(T));  
    9799      } 
    98  
     100*/ 
    99101  
    100102   CMessage& operator<<(CMessage& msg,CAttribute& type) ; 
     
    103105   CBufferOut& operator<<(CBufferOut& buffer,CAttribute& type) ; 
    104106   CBufferIn& operator>>(CBufferIn& buffer, CAttribute&  type) ; 
     107 
    105108} 
    106109  // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.