33template<
class WantType>
34INLINE WantType *_dcast(WantType *,
TypedObject *ptr);
35template<
class WantType>
36INLINE
const WantType *_dcast(WantType *,
const TypedObject *ptr);
42#define DCAST(want_type, pointer) _dcast((want_type*)0, pointer)
60template<
class WantType>
61INLINE WantType *_dcast_ref(WantType *&,
TypedObject *ptr);
62template<
class WantType>
63INLINE
const WantType *_dcast_ref(WantType *&,
const TypedObject *ptr);
68EXPCL_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.