iCustomDataType< X > Struct Template Reference

#include <c4d_customdatatype.h>

Inheritance diagram for iCustomDataType< X >:

详细描述

template<class X>
struct iCustomDataType< X >

The base class for data types with Alloc() and Free() for use in libraries. Pass the public data type as template parameter.

注意
The advantage of this class is to not need to provide library functions for Alloc() and Free() , as the internal and external type will share this functionality.

静态公共成员函数

static X *  Alloc ()
static void  Free (X *&data)

成员函数文档编制

◆  Alloc()

static X* Alloc ( )
static

Allocates an X data type. Destroy the allocated X data type with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated X data type, or nullptr if the allocation failed.

◆  Free()

static void Free ( X *&  data )
static

Destructs X data types allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in,out] data The X data type to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.