![]() |
Polygon Crucher SDK - Documentation
Documentation
|
CElementMethods is provided to CElementArray and give some information on the data as well as the methods to construct or destruct data in-place. More...
CElementMethods is provided to CElementArray and give some information on the data as well as the methods to construct or destruct data in-place.
#include <ElementArray.h>
Public Member Functions | |
virtual bool | IsObject () const |
virtual bool | IsKindOf (const CElementMethods *methods) const |
For class we if this->GetBaseType() == B->GetType() that means that this knows how to copy from B. | |
virtual SIZET | GetSizeof () const =0 |
virtual ElementType | GetType () const =0 |
virtual ElementType | GetBaseType () const =0 |
virtual void | ConstructElement (void *pNewData)=0 |
virtual void | DestructElement (void *pNewData) |
virtual void | CopyElement (void *pDest, const void *pSrc) |
virtual void | CopyElement (void *pDest, const CElementMethods *pSrcMethods, const void *pSrc, const CElementMethods *pDstMethods) |
virtual void | SerializeElement (CXArchive &ar, void *pSrc) |
virtual CXRuntimeClassPtr | GetRuntimeClassDescriptor () const |
![]() | |
virtual bool | Delete () |
int | GetRefCount () const |
int | AddRef () const |
|
virtual |
For class we if this->GetBaseType() == B->GetType() that means that this knows how to copy from B.
This is the default object comparison method use when we store raw memory structure If we compare this and B:
Return false is element array are object that need to be destructed, copied or serialized
in this case, element are memory struct and array used memcpy
when true is returned, DestructElement/CopyElement/SerializeElement is called anytime it is needed
@Note for class should return true if the class has virtual method and if we make copy between inherited object
otherwise memcpy overwrite the virtual table, and the inheritance is lost