Panda3D
 All Classes Functions Variables Enumerations
weakPointerCallback.h
1 // Filename: weakPointerCallback.h
2 // Created by: drose (06Oct06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef WEAKPOINTERCALLBACK_H
16 #define WEAKPOINTERCALLBACK_H
17 
18 #include "pandabase.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : WeakPointerCallback
22 // Description : Derive from this class and override the callback()
23 // method if you want to get an immediate callback from
24 // a WeakPointerTo object when its referenced pointer is
25 // deleted.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAEXPRESS WeakPointerCallback {
28 public:
29  virtual ~WeakPointerCallback();
30  virtual void wp_callback(void *pointer)=0;
31 };
32 
33 #include "weakPointerCallback.I"
34 
35 #endif
Derive from this class and override the callback() method if you want to get an immediate callback fr...