Panda3D
eventReceiver.h
1 // Filename: eventReceiver.h
2 // Created by: drose (14Dec99)
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 EVENTRECEIVER_H
16 #define EVENTRECEIVER_H
17 
18 #include "pandabase.h"
19 #include "typedObject.h"
20 
21 ////////////////////////////////////////////////////////////////////
22 // Class : EventReceiver
23 // Description : An abstract base class for anything that might care
24 // about receiving events. An object that might receive
25 // an event should inherit from this class; each event
26 // may be sent with an optional EventReceiver pointer.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDA_EVENT EventReceiver {
29 
30 public:
31  static TypeHandle get_class_type() {
32  return _type_handle;
33  }
34  static void init_type() {
35  register_type(_type_handle, "EventReceiver");
36  }
37 
38 private:
39  static TypeHandle _type_handle;
40 };
41 
42 #endif
43 
44 
An abstract base class for anything that might care about receiving events.
Definition: eventReceiver.h:28
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85