Name | Description | |
---|---|---|
in | pData | Specifies a pointer to the class that inherits the Data class. |
Value | Description |
---|---|
NULL |
Returned when the pointer specified by pData is not a class that inherits the class that was called. For example, when UserMessage::DynamicCast is called, NULL is returned if the pData entity is not a UserMessage -derived class. |
Performs a dynamic cast for the Data
class pointer.
This function automatically creates a class that inherits the Data
class defined with DDL by the DDL compiler.
By calling same-name functions defined by each class, the pointer specified by the argument is dynamically cast to the pointer of each class type. With the UserMessage::DynamicCast
function, for example, the Data*
-type pointer specified by the argument is dynamically cast to UserMessage*
. If casting is possible, a valid pointer is returned; if casting is not possible, NULL
is returned.
Dynamic casting is independently implemented with this function, so it is not necessary to enable RTTI.
CONFIDENTIAL