14#ifndef CPOINTERCALLBACKOBJECT_H
15#define CPOINTERCALLBACKOBJECT_H
24class EXPCL_PANDA_PUTIL CPointerCallbackObject :
public CallbackObject {
26 typedef void CallbackFunction(
CallbackData *cbdata,
void *data);
27 INLINE CPointerCallbackObject(CallbackFunction *func,
void *data);
28 ALLOC_DELETED_CHAIN(CPointerCallbackObject);
34 CallbackFunction *_func;
41 static void init_type() {
42 CallbackObject::init_type();
44 CallbackObject::get_class_type());
47 return get_class_type();
49 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic data block that is passed along to a CallbackObject when a callback is made.
virtual void do_callback(CallbackData *cbdata)
This method called when the callback is triggered; it *replaces* the original function.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...