Ignore:
Timestamp:
06/06/17 17:58:16 (7 years ago)
Author:
oabramkina
Message:

Two server levels: merging with trunk r1137.
There are bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/attribute.hpp

    r1025 r1158  
    1616{ 
    1717      /// ////////////////////// Déclarations ////////////////////// /// 
     18   /*! 
     19   \class CAttribute 
     20      The fundamental class which describes the attributes of other different class in XIOS. 
     21      This class only plays a role of interface, its class child will have specific implelemtation corresponding to type of attribute 
     22   */ 
    1823      class CAttribute : public CObject, public virtual CBaseType 
    1924      { 
     
    2429            /// Constructeurs /// 
    2530            explicit CAttribute(const StdString & id); 
    26 //            CAttribute(const CAttribute & attribut); 
    27 //            CAttribute(const CAttribute * const attribut); // Not implemented. 
    2831 
    2932            /// Accesseurs /// 
    3033            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); 
    3434 
    35 //            /// Mutateurs /// 
    36 //            template <typename T> inline void setValue(const T & value); 
    37 //            void setAnyValue(const boost::any & value); 
    38 //            void clear(void); 
    39  
    40             /// Test /// 
    41 //            bool isEmpty(void) const; 
    42 //            template <typename T> inline bool isType(void) const; 
    4335            virtual void set(const CAttribute& ) =0 ; 
    4436            virtual void reset(void ) =0 ; 
     
    4941            virtual StdString toString(void) const = 0; 
    5042            virtual void fromString(const StdString & str) = 0; 
    51  
    52 //            virtual void toBinary  (StdOStream & os) const = 0; 
    53 //            virtual void fromBinary(StdIStream & is) = 0; 
     43            virtual bool isEqual(const CAttribute& ) = 0; 
    5444 
    5545            //! Returns true if and only if the attribute should be publicly exposed in the API 
     
    5949            virtual bool doSend() const { return true; } 
    6050 
     51            /* 
     52              Groupd of functions to generate C and Fortran interface  
     53            */ 
    6154            virtual void generateCInterface(ostream& oss, const string& className) = 0 ; 
    6255            virtual void generateCInterfaceIsDefined(ostream& oss, const string& className) ; 
     
    7568            virtual void setInheritedValue(const CAttribute& ) = 0 ; 
    7669            virtual bool hasInheritedValue(void) const = 0; 
    77              
    78          protected : 
    7970 
    80             /// Constructeurs /// 
    81 //            CAttribute(void);  // Not implemented. 
    82  
    83             /// Propriété /// 
    84 //            boost::any value; 
     71            bool canInherite(void) {return _canInherite ;} 
     72         protected :  
     73            bool _canInherite ; 
     74            static const StdString resetInheritanceStr ;  
    8575 
    8676      }; // class CAttribute 
    8777 
    88       /// ////////////////////// Définitions ////////////////////// /// 
    89 /* 
    90       template <typename T> 
    91          T CAttribute::getValue(void) const 
    92       {  
    93          return (boost::any_cast<T>(this->value));  
    94       } 
    95  
    96       template <typename T> 
    97          T* CAttribute::getRef(void) 
    98       {  
    99          return (boost::any_cast<T>(&value));  
    100       } 
    101  
    102       template <typename T> 
    103          void CAttribute::setValue(const T & value) 
    104       {  
    105          this->value = value;  
    106       } 
    107  
    108       template<typename T> 
    109          bool CAttribute::isType(void) const 
    110       {  
    111          return (this->value.type() == typeid(T));  
    112       } 
    113 */ 
    114   
    11578   CMessage& operator<<(CMessage& msg,CAttribute& type) ; 
    11679   CMessage& operator<<(CMessage& msg, const CAttribute&  type) ; 
Note: See TracChangeset for help on using the changeset viewer.