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

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

Location:
XIOS/dev/dev_olga/src/type
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/type/enum.hpp

    r591 r1158  
    100100    __INLINE__ const CEnum_ref& operator = (const CEnum_ref& val) const; 
    101101    __INLINE__ operator T_enum&() const; 
    102     bool operator == (const CEnum_ref &other) {return this->get()==other.get() ;} 
     102     
    103103 
    104104    inline virtual CBaseType* clone(void) const   { return _clone(); } 
     
    134134  } ; 
    135135   
     136  template <typename T> bool operator== (const CEnum<T>& lhs, const typename T::t_enum& rhs); 
     137  template <typename T> bool operator== (const typename T::t_enum& lhs, const CEnum<T>& rhs); 
     138  template <typename T> bool operator== (const CEnum<T>& lhs, const CEnum<T>& rhs);   
     139  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const CEnum_ref<T>& rhs); 
     140  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const typename T::t_enum& rhs); 
     141  template <typename T> bool operator== (const typename T::t_enum& lhs, const CEnum_ref<T>& rhs); 
     142  template <typename T> bool operator== (const CEnum<T>& lhs, const CEnum_ref<T>& rhs) {return (lhs.get() == rhs.get());} 
     143  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const CEnum<T>& rhs) {return (rhs == lhs); } 
     144 
    136145  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) ; 
    137146  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type) ;   
  • XIOS/dev/dev_olga/src/type/enum_impl.hpp

    r680 r1158  
    249249                     << "Enum is not initialized."); 
    250250  }   
    251  
    252    
     251   
     252  template <typename T>  
     253  bool operator== (const CEnum<T>& lhs, const typename T::t_enum& rhs) 
     254  { 
     255     if (lhs.isEmpty()) return false; 
     256     return (lhs.get() == rhs); 
     257  } 
     258 
     259  template <typename T>  
     260  bool operator== (const typename T::t_enum& lhs, const CEnum<T>& rhs) 
     261  { 
     262    return rhs == lhs; 
     263  } 
     264 
     265  template <typename T>  
     266  bool operator== (const CEnum<T>& lhs, const CEnum<T>& rhs) 
     267  { 
     268    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     269    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     270    return (lhs.get() == rhs.get()); 
     271  } 
     272 
     273 
    253274  template <typename T> 
    254275  CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) 
  • XIOS/dev/dev_olga/src/type/enum_ref_impl.hpp

    r680 r1158  
    263263  } 
    264264                      
    265  
     265  template <typename T>  
     266  bool operator== (const CEnum_ref<T>& lhs, const typename T::t_enum& rhs) 
     267  { 
     268     if (lhs.isEmpty()) return false; 
     269     return (lhs.get() == rhs); 
     270  } 
     271 
     272  template <typename T>  
     273  bool operator== (const typename T::t_enum& lhs, const CEnum_ref<T>& rhs) 
     274  { 
     275    return rhs == lhs; 
     276  } 
     277 
     278  template <typename T>  
     279  bool operator== (const CEnum_ref<T>& lhs, const CEnum_ref<T>& rhs) 
     280  { 
     281    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     282    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     283    return (lhs.get() == rhs.get()); 
     284  } 
    266285   
    267286  template <typename T> 
  • XIOS/dev/dev_olga/src/type/message.cpp

    r1009 r1158  
    2727     size_t retSize=0 ; 
    2828      
    29      for(it=typeList.begin();it!=typeList.end();it++) 
    30          retSize+=(*it)->size() ; 
     29     for(it=typeList.begin();it!=typeList.end();it++) retSize+=(*it)->size() ; 
    3130     return retSize ; 
    3231   } 
  • XIOS/dev/dev_olga/src/type/type.hpp

    r748 r1158  
    9494    const CType_ref& operator = (CType<T>& val) const ; 
    9595    const CType_ref& operator = (const CType_ref& val) const; 
    96     operator T&() const; 
     96    operator T&() const;     
    9797 
    9898    inline virtual CBaseType* clone(void) const   { return _clone(); } 
     
    127127    size_t _size(void) const ; 
    128128  } ; 
     129 
     130  template <typename T> bool operator==(const CType<T>& lhs, const T& rhs);    
     131  template <typename T> bool operator==(const T& lhs, const CType<T>& rhs);    
     132  template <typename T> bool operator==(const CType_ref<T>& lhs, const T& rhs);    
     133  template <typename T> bool operator==(const T& lhs, const CType_ref<T>& rhs);  
     134  template <typename T> bool operator==(const CType<T>& lhs, const CType<T>& rhs);  
     135  template <typename T> bool operator==(const CType_ref<T>& lhs, const CType_ref<T>& rhs);  
     136 
     137  template <typename T> 
     138  bool operator==(const CType_ref<T>& lhs, const CType<T>& rhs) 
     139  { 
     140    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     141    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     142    return (*lhs.ptrValue == *rhs.ptrValue); 
     143  }  
     144 
     145  template <typename T> 
     146  bool operator==(const CType<T>& lhs, const CType_ref<T>& rhs) 
     147  { 
     148    return (rhs == lhs); 
     149  } 
    129150 
    130151 
  • XIOS/dev/dev_olga/src/type/type_decl.cpp

    r591 r1158  
    1212  template class CType<decl_type> ; \ 
    1313  template class CType_ref<decl_type> ; \ 
    14   template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType<decl_type>& type) ; \ 
    15   template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType_ref<decl_type>& type) ; \ 
    16   template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, decl_type& type) ; \ 
    17   template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const decl_type& type) ; \ 
    18   template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, CType<decl_type>& type) ; \ 
    19   template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, const CType_ref<decl_type>& type) ; \ 
    20   template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, decl_type& type) ; \ 
    21 /*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType<decl_type>& type) ;*/ \ 
    22 /*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType_ref<decl_type>& type) ;*/ \ 
    23   template CMessage& operator<< <decl_type> (CMessage& msg, const decl_type& type) ; \ 
    24   template CMessage& operator<< <decl_type> (CMessage& msg, decl_type& type) ; 
     14  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType<decl_type>& type) ;       \ 
     15  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType_ref<decl_type>& type) ;   \ 
     16  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, decl_type& type) ;                    \ 
     17  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const decl_type& type) ;              \ 
     18  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, CType<decl_type>& type) ;               \ 
     19  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, const CType_ref<decl_type>& type) ;     \ 
     20  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, decl_type& type) ;                      \ 
     21/*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType<decl_type>& type) ;*/          \ 
     22/*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType_ref<decl_type>& type) ;*/      \ 
     23  template CMessage& operator<< <decl_type> (CMessage& msg, const decl_type& type) ;                     \ 
     24  template CMessage& operator<< <decl_type> (CMessage& msg, decl_type& type) ;                           \ 
     25  template bool operator==(const CType<decl_type>& lhs, const decl_type& rhs);                           \ 
     26  template bool operator==(const decl_type& lhs, const CType<decl_type>& rhs);                           \ 
     27  template bool operator==(const CType_ref<decl_type>& lhs, const decl_type& rhs);                       \ 
     28  template bool operator==(const decl_type& lhs, const CType_ref<decl_type>& rhs);                       \ 
     29  template bool operator==(const CType_ref<decl_type>& lhs, const CType<decl_type>& rhs);                \ 
     30  template bool operator==(const CType<decl_type>& lhs, const CType_ref<decl_type>& rhs);                \ 
     31  template bool operator==(const CType<decl_type>& lhs, const CType<decl_type>& rhs);                    \ 
     32  template bool operator==(const CType_ref<decl_type>& lhs, const CType_ref<decl_type>& rhs);     
    2533   
    2634  macro(string) 
  • XIOS/dev/dev_olga/src/type/type_impl.hpp

    r748 r1158  
    211211  } 
    212212 
     213  template <typename T> 
     214  bool operator==(const CType<T>& lhs, const T& rhs) 
     215  { 
     216    if (lhs.isEmpty()) return false; 
     217    return (*lhs.ptrValue == rhs);     
     218  } 
     219 
     220  template <typename T> 
     221  bool operator==(const T& lhs, const CType<T>& rhs) 
     222  { 
     223    return (rhs == lhs); 
     224  } 
     225 
     226  template <typename T> 
     227  bool operator==(const CType<T>& lhs, const CType<T>& rhs) 
     228  { 
     229    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     230    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     231     
     232    return (*lhs.ptrValue == *rhs.ptrValue); 
     233  } 
    213234 
    214235  template <typename T> 
  • XIOS/dev/dev_olga/src/type/type_ref_impl.hpp

    r680 r1158  
    201201  } 
    202202                      
    203  
     203  template <typename T> 
     204  bool operator==(const CType_ref<T>& lhs, const T& rhs) 
     205  { 
     206    if (lhs.isEmpty()) return false; 
     207    return (*lhs.ptrValue == rhs);     
     208  } 
     209 
     210  template <typename T> 
     211  bool operator==(const T& lhs, const CType_ref<T>& rhs) 
     212  { 
     213    return (rhs == lhs); 
     214  } 
     215 
     216  template <typename T> 
     217  bool operator==(const CType_ref<T>& lhs, const CType_ref<T>& rhs) 
     218  { 
     219    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     220    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     221     
     222    return (*lhs.ptrValue == *rhs.ptrValue); 
     223  } 
    204224   
    205225  template <typename T> 
Note: See TracChangeset for help on using the changeset viewer.