Go to the documentation of this file.
6 #ifndef CMR_ARRAY_IMPL_INCLUDED
7 #define CMR_ARRAY_IMPL_INCLUDED
16 #define CMR_ARRAY_XML_IMPL_SCALAR(T) \
17 template <> long CMREXD Array<T,CmrScalarArrayAllocator<T> >::read_xml(IBStream& i) \
21 template <> long CMREXD Array<T,CmrScalarArrayAllocator<T> >::write_xml(OBStream& o) const \
30 #define CMR_ARRAY_IMPL(T) \
32 template <> void CMREXD CmrArrayAllocator<T>::constructor(Byte* data, const Byte* value) \
36 new (data) T(*(T*)value); \
41 template <> void CMREXD CmrArrayAllocator<T>::destructor(Byte* data) \
43 ((T*)data)->T::~T(); \
45 template <> int CMREXD CmrArrayAllocator<T>::comparator(const Dummy& v1, const Dummy& v2) \
47 const T& ov1 = (const T&)v1; \
48 const T& ov2 = (const T&)v2; \
49 return ov1.compare(ov2); \
57 #define CMR_ARRAY_IMPL_SCALAR(T) \
59 CMR_ARRAY_XML_IMPL_SCALAR(T) \
60 template <> void CMREXD CmrScalarArrayAllocator<T>::constructor(Byte* data, const Byte* value) \
64 const T& ov = *(const T*)value; \
70 template <> void CMREXD CmrScalarArrayAllocator<T>::destructor(Byte* data) \
73 template <> int CMREXD CmrScalarArrayAllocator<T>::comparator(const Dummy& v1, const Dummy& v2) \
75 const T& ov1 = (const T&)v1; \
76 const T& ov2 = (const T&)v2; \
77 if (ov1 < ov2) return -1; \
78 else if (ov1 == ov2) return 0; \
83 #endif // CMR_ARRAY_IMPL_INCLUDED