Main MRPT website > C++ reference for MRPT 1.9.9
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 43 of file xscopy.h.

◆ XSLISTSWAP2

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

Definition at line 41 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]); \
}

Definition at line 19 of file xscopy.h.

b
GLubyte GLubyte b
Definition: glext.h:6279
XsSize
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:19
XSDF_Managed
@ XSDF_Managed
Definition: xstypedefs.h:49
a
GLubyte GLubyte GLubyte a
Definition: glext.h:6279



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST