Panda3D
event.I
1 // Filename: event.I
2 // Created by: drose (15May01)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: Event::set_name
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE void Event::
22 set_name(const string &name) {
23  _name = name;
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: Event::clear_name
28 // Access: Public
29 // Description: Resets the Event's name to empty.
30 ////////////////////////////////////////////////////////////////////
31 INLINE void Event::
33  _name = "";
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: Event::has_name
38 // Access: Public
39 // Description: Returns true if the Event has a nonempty name set,
40 // false if the name is empty.
41 ////////////////////////////////////////////////////////////////////
42 INLINE bool Event::
43 has_name() const {
44  return !_name.empty();
45 }
46 
47 ////////////////////////////////////////////////////////////////////
48 // Function: Event::get_name
49 // Access: Public
50 // Description:
51 ////////////////////////////////////////////////////////////////////
52 INLINE const string &Event::
53 get_name() const {
54  return _name;
55 }
56 
57 
58 INLINE ostream &operator << (ostream &out, const Event &n) {
59  n.output(out);
60  return out;
61 }
bool has_name() const
Returns true if the Event has a nonempty name set, false if the name is empty.
Definition: event.I:43
void clear_name()
Resets the Event&#39;s name to empty.
Definition: event.I:32
A named event, possibly with parameters.
Definition: event.h:36