Changeset 1158 for XIOS/dev/dev_olga/src/type
- Timestamp:
- 06/06/17 17:58:16 (7 years ago)
- Location:
- XIOS/dev/dev_olga/src/type
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/type/enum.hpp
r591 r1158 100 100 __INLINE__ const CEnum_ref& operator = (const CEnum_ref& val) const; 101 101 __INLINE__ operator T_enum&() const; 102 bool operator == (const CEnum_ref &other) {return this->get()==other.get() ;}102 103 103 104 104 inline virtual CBaseType* clone(void) const { return _clone(); } … … 134 134 } ; 135 135 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 136 145 template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) ; 137 146 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 249 249 << "Enum is not initialized."); 250 250 } 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 253 274 template <typename T> 254 275 CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) -
XIOS/dev/dev_olga/src/type/enum_ref_impl.hpp
r680 r1158 263 263 } 264 264 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 } 266 285 267 286 template <typename T> -
XIOS/dev/dev_olga/src/type/message.cpp
r1009 r1158 27 27 size_t retSize=0 ; 28 28 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() ; 31 30 return retSize ; 32 31 } -
XIOS/dev/dev_olga/src/type/type.hpp
r748 r1158 94 94 const CType_ref& operator = (CType<T>& val) const ; 95 95 const CType_ref& operator = (const CType_ref& val) const; 96 operator T&() const; 96 operator T&() const; 97 97 98 98 inline virtual CBaseType* clone(void) const { return _clone(); } … … 127 127 size_t _size(void) const ; 128 128 } ; 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 } 129 150 130 151 -
XIOS/dev/dev_olga/src/type/type_decl.cpp
r591 r1158 12 12 template class CType<decl_type> ; \ 13 13 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); 25 33 26 34 macro(string) -
XIOS/dev/dev_olga/src/type/type_impl.hpp
r748 r1158 211 211 } 212 212 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 } 213 234 214 235 template <typename T> -
XIOS/dev/dev_olga/src/type/type_ref_impl.hpp
r680 r1158 201 201 } 202 202 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 } 204 224 205 225 template <typename T>
Note: See TracChangeset
for help on using the changeset viewer.