33 template<
class WantType>
34 INLINE WantType *_dcast(WantType *,
TypedObject *ptr);
35 template<
class WantType>
36 INLINE
const WantType *_dcast(WantType *,
const TypedObject *ptr);
42 #define DCAST(want_type, pointer) _dcast((want_type*)0, pointer)
60 template<
class WantType>
61 INLINE WantType *_dcast_ref(WantType *&,
TypedObject *ptr);
62 template<
class WantType>
63 INLINE
const WantType *_dcast_ref(WantType *&,
const TypedObject *ptr);
68 EXPCL_PANDA_EXPRESS
bool
72 #define DCAST_INTO_V(to_pointer, from_pointer) \
74 (to_pointer) = _dcast_ref(to_pointer, from_pointer); \
75 nassertv((void *)(to_pointer) != nullptr); \
78 #define DCAST_INTO_R(to_pointer, from_pointer, return_value) \
80 (to_pointer) = _dcast_ref(to_pointer, from_pointer); \
81 nassertr((void *)(to_pointer) != nullptr, return_value); \
TypeHandle is the identifier used to differentiate C++ class types.
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EXPCL_PANDA_EXPRESS bool _dcast_verify(TypeHandle want_handle, size_t want_size, const TypedObject *ptr)
This function performs the actual check that the indicated TypedObject pointer is of the intended typ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.