source: XIOS/trunk/src/type/type_decl.cpp @ 1105

Last change on this file since 1105 was 1105, checked in by mhnguyen, 7 years ago

Adding comparison operator between objects of XIOS.
Two objects of a same type are considered equal if they have same non-empty
attributes which have same values

+) Add operator== to class CArray
+) Add comparison operator to some basic attribute classes
+) Add operator== to date and duration (It seems that they don't serve much)

Test
+) On Curie
+) No Unit tests but test with transformation work (the next commit)

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1#include "type.hpp"
2#include "type_impl.hpp"
3#include "type_ref_impl.hpp"
4#include "type_specialisation.hpp"
5#include <string> ;
6#include "date.hpp"
7#include "xios_spl.hpp"
8
9namespace xios
10{
11#define macro(decl_type)         \
12  template class CType<decl_type> ; \
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) ;       \   
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_ref<decl_type>& lhs, const CType_ref<decl_type>& rhs);   
32 
33  macro(string)
34  macro(int)
35  macro(double)
36  macro(bool)
37  macro(StdSize)
38  macro(CDate)
39  macro(CDuration)
40}
Note: See TracBrowser for help on using the repository browser.