Main MRPT website > C++ reference for MRPT 1.5.6
Macros
xscopy.h File Reference

Go to the source code of this file.

Macros

#define XSLISTCOPY(C)
 
#define XSLISTSWAP3(C, B, S)
 
#define XSLISTSWAP2(C, B)   XSLISTSWAP3(C, B, C##_swap)
 
#define XSLISTSWAP(C)   XSLISTSWAP2(C, C##List)
 

Macro Definition Documentation

◆ XSLISTCOPY

#define XSLISTCOPY (   C)
Value:
if (copy == thisPtr)\
{\
return;\
}\
C##_assign(copy, thisPtr->m_size, thisPtr->m_data);

Definition at line 12 of file xscopy.h.

◆ XSLISTSWAP

#define XSLISTSWAP (   C)    XSLISTSWAP2(C, C##List)

Definition at line 39 of file xscopy.h.

◆ XSLISTSWAP2

#define XSLISTSWAP2 (   C,
 
)    XSLISTSWAP3(C, B, C##_swap)

Definition at line 37 of file xscopy.h.

◆ XSLISTSWAP3

#define XSLISTSWAP3 (   C,
  B,
 
)
Value:
if ((!a->m_data || (a->m_flags & XSDF_Managed)) && (!b->m_data || (b->m_flags & XSDF_Managed))) {\
B tmp;\
*((C**) &tmp.m_data) = a->m_data;\
*((XsSize*) &tmp.m_size) = a->m_size;\
*((int*) &tmp.m_flags) = a->m_flags;\
*((C**) &a->m_data) = b->m_data;\
*((XsSize*) &a->m_size) = b->m_size;\
*((int*) &a->m_flags) = b->m_flags;\
*((C**) &b->m_data) = tmp.m_data;\
*((XsSize*) &b->m_size) = tmp.m_size;\
*((int*) &b->m_flags) = tmp.m_flags;\
} else { /* elementwise swap */ \
XsSize i;\
assert(a->m_size == b->m_size);\
for (i = 0; i < a->m_size; ++i) S(&a->m_data[i], &b->m_data[i]);\
}
The contained data should be managed (freed) by the object, when false, the object assumes the memory...
Definition: xstypedefs.h:39
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:17
GLubyte GLubyte b
Definition: glext.h:5575
GLubyte GLubyte GLubyte a
Definition: glext.h:5575

Definition at line 19 of file xscopy.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019