Panda3D
|
00001 // Filename: event.I 00002 // Created by: drose (15May01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: Event::set_name 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE void Event:: 00022 set_name(const string &name) { 00023 _name = name; 00024 } 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: Event::clear_name 00028 // Access: Public 00029 // Description: Resets the Event's name to empty. 00030 //////////////////////////////////////////////////////////////////// 00031 INLINE void Event:: 00032 clear_name() { 00033 _name = ""; 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: Event::has_name 00038 // Access: Public 00039 // Description: Returns true if the Event has a nonempty name set, 00040 // false if the name is empty. 00041 //////////////////////////////////////////////////////////////////// 00042 INLINE bool Event:: 00043 has_name() const { 00044 return !_name.empty(); 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: Event::get_name 00049 // Access: Public 00050 // Description: 00051 //////////////////////////////////////////////////////////////////// 00052 INLINE const string &Event:: 00053 get_name() const { 00054 return _name; 00055 } 00056 00057 00058 INLINE ostream &operator << (ostream &out, const Event &n) { 00059 n.output(out); 00060 return out; 00061 }