__RTDynamicCast__RTDynamicCast
dynamic_cast 演算子のランタイム実装です。Runtime implementation of the dynamic_cast operator.
構文Syntax
PVOID __RTDynamicCast (
PVOID inptr,
LONG VfDelta,
PVOID SrcType,
PVOID TargetType,
BOOL isReference
) throw(...)
パラメーターParameters
inptrinptr
ポリモーフィック型オブジェクトへのポインター。Pointer to a polymorphic object.
VfDeltaVfDelta
オブジェクト内の仮想関数ポインターのオフセット。Offset of virtual function pointer in object.
DesttypeSrcType
inptr
パラメーターでポイントするオブジェクトのスタティック型。Static type of object pointed to by the inptr
parameter.
TargetTypeTargetType
キャストの意図した結果。Intended result of cast.
isReferenceisReference
true
入力が参照である場合は。 false
入力がポインターである場合は。true
if input is a reference; false
if input is a pointer.
戻り値Return Value
成功した場合は、適切なサブオブジェクトへのポインター。それ以外の場合は NULL。Pointer to the appropriate sub-object, if successful; otherwise, NULL.
例外Exceptions
dynamic_cast<>
への入力が参照でありキャストに失敗した場合は bad_cast()
。bad_cast()
if the input to dynamic_cast<>
is a reference and the cast fails.
注釈Remarks
inptr
を TargetType
型のオブジェクトに変換します。Converts inptr
to an object of type TargetType
. inptr
の型は、TargetType
がポインターの場合はポインター、TargetType
が参照の場合は左辺値である必要があります。The type of inptr
must be a pointer if TargetType
is a pointer, or an l-value if TargetType
is a reference. TargetType
は、以前に定義されたクラス型への参照かポインター、または void 型へのポインターである必要があります。TargetType
must be a pointer or a reference to a previously defined class type, or a pointer to void.
必要条件Requirements
ルーチンによって返される値Routine | 必須ヘッダーRequired header |
---|---|
__RTDynamicCast__RTDynamicCast | rtti.hrtti.h |