#include <new>
#include <string.h>
#include "commore/Commore.h"
#include "commore/List.h"
Go to the source code of this file.
#define CMR_LIST_IMPL |
( |
|
T | ) |
|
Value:namespace commore { \
{ \
if (value) \
{ \
new (data) T(*(T*)value); \
} else { \
new (data) T(); \
} \
} \
template <>
void CMREXD CmrListAllocator<T>::destructor(
Byte* data) \
{ \
((T*)data)->T::~T(); \
} \
{ \
const T& ov1 = (const T&)v1; \
const T& ov2 = (const T&)v2; \
return ov1.compare(ov2); \
} \
}
#define CMREXD
Definition: Compiler.h:22
static int CMREXD comparator(const Dummy &v1, const Dummy &v2)
static void CMREXD constructor(Byte *data, const Byte *value)
unsigned char Byte
Definition: Type.h:64
#define CMR_LIST_IMPL_SCALAR |
( |
|
T | ) |
|
Value:namespace commore { \
{ \
T& v = *(T*)data; \
if (value) { \
const T& ov = *(const T*)value; \
v = ov; \
} else { \
v = 0; ; \
} \
} \
{ \
} \
{ \
const T& ov1 = (const T&)v1; \
const T& ov2 = (const T&)v2; \
if (ov1 < ov2) return -1; \
else if (ov1 == ov2) return 0; \
else return 1; \
} \
}
static void CMREXD constructor(Byte *data, const Byte *value)
#define CMREXD
Definition: Compiler.h:22
static void CMREXD destructor(Byte *data)
static int CMREXD comparator(const Dummy &v1, const Dummy &v2)
unsigned char Byte
Definition: Type.h:64