Panda3D
throw_event.h
1 // Filename: throw_event.h
2 // Created by: drose (19Feb99)
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 THROW_EVENT_H
16 #define THROW_EVENT_H
17 
18 #include "pandabase.h"
19 
20 #include "eventQueue.h"
21 #include "pt_Event.h"
22 #include "eventParameter.h"
23 
24 // A handful of convenience functions to throw events.
25 INLINE void throw_event(const CPT_Event &event);
26 INLINE void throw_event(const string &event_name);
27 INLINE void throw_event(const string &event_name,
28  const EventParameter &p1);
29 INLINE void throw_event(const string &event_name,
30  const EventParameter &p1,
31  const EventParameter &p2);
32 INLINE void throw_event(const string &event_name,
33  const EventParameter &p1,
34  const EventParameter &p2,
35  const EventParameter &p3);
36 INLINE void throw_event(const string &event_name,
37  const EventParameter &p1,
38  const EventParameter &p2,
39  const EventParameter &p3,
40  const EventParameter &p4);
41 
42 #include "eventHandler.h"
43 
44 INLINE void throw_event_directly(EventHandler& handler,
45  const CPT_Event &event);
46 INLINE void throw_event_directly(EventHandler& handler,
47  const string &event_name);
48 INLINE void throw_event_directly(EventHandler& handler,
49  const string &event_name,
50  const EventParameter &p1);
51 INLINE void throw_event_directly(EventHandler& handler,
52  const string &event_name,
53  const EventParameter &p1,
54  const EventParameter &p2);
55 INLINE void throw_event_directly(EventHandler& handler,
56  const string &event_name,
57  const EventParameter &p1,
58  const EventParameter &p2,
59  const EventParameter &p3);
60 
61 #include "throw_event.I"
62 
63 #endif
A class to monitor events from the C++ side of things.
Definition: eventHandler.h:41
An optional parameter associated with an event.
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing...
Definition: pointerTo.h:144