-
首页
-
C4D R23.110 C++ SDK
#include <c4d_gedata.h>
详细描述
The
GeData
class can hold values of many different types, including custom data types.
It is used by many parts of the API, and can be stored in
BaseContainer
对象。
构造函数 & 析构函数文档编制
◆
GeData()
[1/21]
Creates a
DA_NIL
data with no value.
◆
GeData()
[2/21]
Creates a
float
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[3/21]
Copy constructor.
-
参数
-
◆
GeData()
[4/21]
Creates an
Int32
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[5/21]
Creates a
Float32
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[6/21]
Creates a
void*
data.
-
参数
-
[in]
|
v
|
The initial
void*
值。
|
[in]
|
xdummy
|
The dummy parameter. Should always be
VOIDVALUE
.
|
◆
GeData()
[7/21]
Creates a
long long
(64-bit integer) data.
-
参数
-
[in]
|
v
|
The initial value.
|
[in]
|
xdummy
|
The dummy parameter. Should always be
LLONGVALUE
.
|
◆
GeData()
[8/21]
Creates a
向量
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[9/21]
Creates a
C4DUuid
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[10/21]
Creates a Matrix data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[11/21]
Creates a
String
data from a character buffer.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[12/21]
Creates a
String
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[13/21]
Creates a memory buffer data.
-
参数
-
[in]
|
mem
|
The initial memory buffer value.
|
[in]
|
count
|
The number of bytes in the initial buffer.
|
◆
GeData()
[14/21]
Creates a
Filename
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[15/21]
Creates a
BaseTime
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[16/21]
Creates a
BaseContainer
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[17/21]
Creates a
BaseLink
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[18/21]
Creates a
BaseList2D
data.
-
参数
-
[in]
|
bl
|
The initial value.
|
◆
GeData()
[19/21]
Creates a
maxon::Data
data.
-
参数
-
[in]
|
n
|
The initial value.
|
◆
GeData()
[20/21]
Creates a data with a custom data type.
-
参数
-
[in]
|
type
|
The custom data type ID.
|
[in]
|
data
|
The custom data.
|
◆
GeData()
[21/21]
Creates a custom data type with the default value for the type.
The second parameter is simply a typing trick so that the compiler chooses this constructor:
GeData
d(
DATETIME_DATA
,
DEFAULTVALUE
);
-
参数
-
[in]
|
type
|
The custom data type ID.
|
[in]
|
v
|
The dummy parameter. Should always be
DEFAULTVALUE
.
|
◆
~GeData()
Destructor.
成员函数文档编制
◆
Free()
Deletes the internal data and sets the type to
DA_NIL
.
◆
operator=()
Assignment operator.
-
参数
-
[in]
|
n
|
The data to assign.
|
-
返回
-
The assigned data.
◆
operator==()
Equality operator.
-
参数
-
[in]
|
d
|
The data to compare with.
|
-
返回
-
true
if the data are equal, otherwise
false
.
◆
operator!=()
Inequality operator.
-
参数
-
[in]
|
d
|
The data to compare with.
|
-
返回
-
true
if the data are different, otherwise
false
.
◆
SetDefault()
Sets the default value for the data type.
-
参数
-
[in]
|
type
|
The type ID:
DA
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetType()
Int32
GetType
|
(
|
void
|
|
)
|
const
|
Retrieves the type of the data.
-
返回
-
The data type:
DA
◆
GetBool()
Bool
GetBool
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
Bool
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetInt32()
Int32
GetInt32
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
Int32
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetInt64()
Int64
GetInt64
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
Int64
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetFloat()
Float
GetFloat
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
Float
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetVoid()
void* GetVoid
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
void*
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetVector()
const
向量
& GetVector
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
向量
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetMatrix()
const
矩阵
& GetMatrix
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
矩阵
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetString()
const
String
& GetString
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
String
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetUuid()
const
C4DUuid
& GetUuid
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
C4DUuid
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetFilename()
const
Filename
& GetFilename
|
(
|
void
|
|
)
|
const
|
Retrieves the value of
Filename
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetTime()
Retrieves the value of
BaseTime
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetContainer()
Retrieves the value of
BaseContainer
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetBaseLink()
Retrieves the value of
BaseLink
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetData()
Retrieves the value of
maxon::Data
data objects. Forbidden for other data.
-
返回
-
The value. Only valid as long as the
GeData
value exists.
◆
GetCustomDataType()
Retrieves the value of a
CustomDataType
,或
nullptr
if the wrong data type was specified. Forbidden for other data types.
-
参数
-
[in]
|
datatype
|
The data type ID.
|
-
返回
-
The custom data type value, or
nullptr
if the types do not match. The data owns the pointed value.
Only valid as long as the
GeData
value exists.
◆
GetLink()
Evaluates the link of
DA_ALIASLINK
data objects. Equivalent to
GetBaseLink()
->
GetLink()
.
若
instanceof
is specified,
nullptr
is returned if the object is not of this type. Forbidden for other data.
-
参数
-
[in]
|
doc
|
The document to evaluate the link in. The caller owns the pointed document.
|
[in]
|
instanceof
|
Set this to a node type to only return the link if it is of this type.
|
-
返回
-
The evaluated link.
Cinema 4D
owns the pointed link.
Only valid as long as the
GeData
value exists.
◆
GetLinkAtom()
Evaluates the atom link of
DA_ALIASLINK
data objects. Equivalent to
GetBaseLink()
->
GetLinkAtom()
.
若
instanceof
is specified,
nullptr
is returned if the object is not of this type. Forbidden for other data.
-
参数
-
[in]
|
doc
|
The document to evaluate the atom link in. The caller owns the pointed document.
|
[in]
|
instanceof
|
Set this to a node type to only return the atom link if it is of this type.
|
-
返回
-
The evaluated atom link.
Cinema 4D
owns the pointed atom link.
Only valid as long as the
GeData
value exists.
◆
GetMemoryAndRelease()
void* GetMemoryAndRelease
|
(
|
Int
&
|
count
|
)
|
|
Retrieves the value of memory buffer data objects. Forbidden for other data.
-
注意
-
In this version of
GetMemory()
the caller takes over the ownership of the memory block.
The memory block must be allocated with
NewMem()
and deallocated with
DeleteMem()
.
-
参数
-
[in]
|
count
|
Assigned the number of bytes in the returned memory buffer.
|
-
返回
-
The memory buffer. The caller takes over the ownership of the memory block.
Only valid as long as the
GeData
value exists.
◆
GetMemory()
void* GetMemory
|
(
|
Int
&
|
count
|
)
|
|
Retrieves the value of memory buffer data objects. Forbidden for other data.
-
注意
-
The memory block must be allocated with
NewMem()
and deallocated with
DeleteMem()
.
-
参数
-
[in]
|
count
|
Assigned the number of bytes in the returned memory buffer.
|
-
返回
-
The memory buffer. The data owns the pointed memory block.
Only valid as long as the
GeData
value exists.
◆
CopyData()
Copies the data to another with an alias translator for the links.
-
参数
-
[in]
|
dest
|
The destination data. The caller owns the pointed data.
|
[in]
|
aliastrans
|
An alias translator for the operation. Can be
nullptr
. The caller owns the pointed alias translator.
|
◆
SetFloat()
void SetFloat
|
(
|
Float
|
v
|
)
|
|
设置
Float
value and changes the data type accordingly.
-
参数
-
◆
SetInt32()
void SetInt32
|
(
|
Int32
|
v
|
)
|
|
设置
Int32
value and changes the data type accordingly.
-
参数
-
◆
SetInt64()
void SetInt64
|
(
|
const
Int64
&
|
v
|
)
|
|
设置
Int64
value and changes the data type accordingly.
-
参数
-
◆
SetVoid()
void SetVoid
|
(
|
void *
|
v
|
)
|
|
设置
void*
value and changes the data type accordingly.
-
参数
-
◆
SetMemory()
void SetMemory
|
(
|
void *
|
data
,
|
|
|
Int
|
count
|
|
)
|
|
|
Sets the memory buffer value and changes the data type accordingly.
-
参数
-
[in]
|
data
|
The new memory buffer value.
|
[in]
|
count
|
The number of bytes in the memory buffer.
|
◆
SetVector()
void SetVector
|
(
|
const
向量
&
|
v
|
)
|
|
设置
向量
value and changes the data type accordingly.
-
参数
-
◆
SetMatrix()
void SetMatrix
|
(
|
const
矩阵
&
|
v
|
)
|
|
设置
矩阵
value and changes the data type accordingly.
-
参数
-
◆
SetString()
设置
String
value and changes the data type accordingly.
-
参数
-
◆
SetUuid()
设置
C4DUuid
value and changes the data type accordingly.
-
参数
-
◆
SetTristate()
Sets data type accordingly (and clears the internal value)
◆
SetData()
设置
maxon::Data
value and changes the data type accordingly.
-
参数
-
◆
SetFilename()
设置
Filename
value and changes the data type accordingly.
-
参数
-
◆
SetBaseTime()
设置
BaseTime
value and changes the data type accordingly.
-
参数
-
◆
SetContainer()
设置
BaseContainer
value and changes the data type accordingly.
-
参数
-
◆
SetBaseLink()
设置
BaseLink
value and changes the data type accordingly.
-
参数
-
◆
SetBaseList2D()
设置
BaseList2D
value and changes the data type accordingly.
-
参数
-
◆
SetCustomDataType()
Sets the value for custom data type and changes the data type accordingly.
-
参数
-
[in]
|
datatype
|
The custom data type ID.
|
[in]
|
v
|
The new custom data type value.
|
Member Data Documentation
◆
类型
◆
dummy
◆
DInteger
◆
DReal
◆
Ddata
◆
DLLong
◆
@14
@ DEFAULTVALUE
Dummy value for the default value GeData constructor.
定义:
c4d_gedata.h:65
#define DATETIME_DATA
DateTime custom data ID.
定义:
customgui_datetime.h:23