18#ifndef WIN32_LEAN_AND_MEAN
19#define WIN32_LEAN_AND_MEAN 1
32 if (get_verify_dcast()) {
38#if defined(_DEBUG) && defined(_WIN32)
40 express_cat->warning()
41 <<
"Attempt to cast invalid pointer to "
42 << want_handle <<
"\n";
48 <<
"Attempt to cast pointer from " << ptr->get_type()
49 <<
" to " << want_handle <<
"\n";
50 if (ptr->get_type() == TypedObject::get_class_type()) {
51 express_cat->error(
false)
52 <<
"Perhaps pointer was inadvertently deleted?\n";
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...
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.