14#ifndef CALLBACKOBJECT_H
15#define CALLBACKOBJECT_H
28class EXPCL_PANDA_PUTIL CallbackObject :
public TypedReferenceCount {
30 INLINE CallbackObject();
32 ALLOC_DELETED_CHAIN(CallbackObject);
35 virtual void output(std::ostream &out)
const;
37 EXTENSION(
static PT(CallbackObject) make(PyObject *function));
46 static void init_type() {
47 TypedReferenceCount::init_type();
49 TypedReferenceCount::get_class_type());
52 return get_class_type();
54 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
60inline std::ostream &operator << (std::ostream &out,
const CallbackObject &cbo) {
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.
This is a generic object that can be assigned to a callback at various points in the rendering proces...
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.