ZFFramework
Loading...
Searching...
No Matches
Macros | Functions
ZFCoreTypeDef_ClassType.h File Reference

types for ZFFramework More...

#include "ZFCoreTypeDef_CoreType.h"
#include <cstdlib>
#include <memory>
#include <cstring>

Go to the source code of this file.

Macros

#define zfclassFwd
 forward declaration of a class type
 
#define zfclassPOD
 shows the class is a POD type
 
#define zfclassLikePOD
 shows the class is not a POD type, but you may use it like a POD except memset it to 0
 
#define zfclassNotPOD
 shows the class is not a POD type, you should not memset it or declare it in stack or copy value by copy constructor or operator =
 
#define zfextend
 dummy macro shows class inherit from another
 
#define zfoverride
 dummy macro shows that method override parent's method
 
#define zffinal
 dummy macro shows that a method or class is designed must not to be overrided
 
#define zfpurevirtual
 dummy macro shows that a method is pure virtual method
 
#define ZFCLASS_DISALLOW_COPY_CONSTRUCTOR(ClassName)
 a macro to show that a class doesn't allow copy constructor
 
#define zfnew(Type, ...)
 same as new defined for future use
 
#define zfdelete(instance)
 same as delete defined for future use
 
#define zfnewPlacement(buf, Type, ...)
 placement new defined for future use
 
#define zfdeletePlacement(instance)
 placement delete (instance->~Type()) defined for future use
 
#define zfmalloc(size)
 same as malloc defined for future use
 
#define zfmallocZero(size)
 util method to zfmalloc and zfmemset to zero
 
#define zfrealloc(oldPtr, newSize)
 same as realloc defined for future use
 
#define zfreallocZero(oldPtr, newSize, oldSize)
 util method to zfrealloc and zfmemset the increased memory to zero
 
#define zffree(ptr)
 same as free defined for future use, do nothing if ptr is NULL
 
#define ZF_IN
 dummy macro that shows the param used as required input
 
#define ZF_IN_OPT
 dummy macro that shows the param used as optional input
 
#define ZF_OUT
 dummy macro that shows the param used as required output
 
#define ZF_OUT_OPT
 dummy macro that shows the param used as optional output
 
#define ZF_IN_OUT
 dummy macro that shows the param used as required input and output
 
#define ZF_IN_OUT_OPT
 dummy macro that shows the param used as optional input and output
 

Functions

void * zfmemset (void *p, zfint ch, zfindex size)
 wrapper to memset
 
void * zfmemcpy (void *dst, const void *src, zfindex size)
 wrapper to memcpy
 
void * zfmemmove (void *dst, const void *src, zfindex size)
 wrapper to memmove
 
zfint zfmemcmp (const void *p1, const void *p2, zfindex size)
 wrapper to memcmp
 
template<typename T_Element >
T_Element * zfmemmoveObject (T_Element *dst, const T_Element *src, zfindex count)
 memmove for common object type, object must support operator =
 

Detailed Description

types for ZFFramework

Macro Definition Documentation

◆ ZFCLASS_DISALLOW_COPY_CONSTRUCTOR

#define ZFCLASS_DISALLOW_COPY_CONSTRUCTOR ( ClassName)

a macro to show that a class doesn't allow copy constructor

usage:

class YourClass {
};
#define ZFCLASS_DISALLOW_COPY_CONSTRUCTOR(ClassName)
a macro to show that a class doesn't allow copy constructor
Definition ZFCoreTypeDef_ClassType.h:81

Function Documentation

◆ zfmemmoveObject()

template<typename T_Element >
T_Element * zfmemmoveObject ( T_Element * dst,
const T_Element * src,
zfindex count )

memmove for common object type, object must support operator =

it's all right if dst and src share same memory