00001 // Filename: event.I 00002 // Created by: drose (15May01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: Event::set_name 00022 // Access: Public 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE void Event:: 00026 set_name(const string &name) { 00027 _name = name; 00028 } 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Function: Event::clear_name 00032 // Access: Public 00033 // Description: Resets the Event's name to empty. 00034 //////////////////////////////////////////////////////////////////// 00035 INLINE void Event:: 00036 clear_name() { 00037 _name = ""; 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: Event::has_name 00042 // Access: Public 00043 // Description: Returns true if the Event has a nonempty name set, 00044 // false if the name is empty. 00045 //////////////////////////////////////////////////////////////////// 00046 INLINE bool Event:: 00047 has_name() const { 00048 return !_name.empty(); 00049 } 00050 00051 //////////////////////////////////////////////////////////////////// 00052 // Function: Event::get_name 00053 // Access: Public 00054 // Description: 00055 //////////////////////////////////////////////////////////////////// 00056 INLINE const string &Event:: 00057 get_name() const { 00058 return _name; 00059 } 00060 00061 00062 INLINE ostream &operator << (ostream &out, const Event &n) { 00063 n.output(out); 00064 return out; 00065 }