00001 // Filename: cPointerCallbackObject.cxx 00002 // Created by: drose (13Mar09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "cPointerCallbackObject.h" 00016 00017 TypeHandle CPointerCallbackObject::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: CPointerCallbackObject::do_callback 00021 // Access: Public, Virtual 00022 // Description: This method called when the callback is triggered; it 00023 // *replaces* the original function. To continue 00024 // performing the original function, you must call 00025 // cbdata->upcall() during the callback. 00026 //////////////////////////////////////////////////////////////////// 00027 void CPointerCallbackObject:: 00028 do_callback(CallbackData *cbdata) { 00029 (*_func)(cbdata, _data); 00030 } 00031