Panda3D
eventReceiver.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eventReceiver.h
10  * @author drose
11  * @date 1999-12-14
12  */
13 
14 #ifndef EVENTRECEIVER_H
15 #define EVENTRECEIVER_H
16 
17 #include "pandabase.h"
18 #include "typedObject.h"
19 
20 /**
21  * An abstract base class for anything that might care about receiving events.
22  * An object that might receive an event should inherit from this class; each
23  * event may be sent with an optional EventReceiver pointer.
24  */
25 class EXPCL_PANDA_EVENT EventReceiver {
26 
27 public:
28  static TypeHandle get_class_type() {
29  return _type_handle;
30  }
31  static void init_type() {
32  register_type(_type_handle, "EventReceiver");
33  }
34 
35 private:
36  static TypeHandle _type_handle;
37 };
38 
39 #endif
An abstract base class for anything that might care about receiving events.
Definition: eventReceiver.h:25
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81