00001 // Filename: cIntervalManager.I 00002 // Created by: drose (10Sep02) 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: CIntervalManager::set_event_queue 00018 // Access: Published 00019 // Description: Specifies a custom event queue to be used for 00020 // throwing done events from intervals as they finish. 00021 // If this is not specified, the global event queue is 00022 // used. 00023 // 00024 // The caller maintains ownership of the EventQueue 00025 // object; it is the caller's responsibility to ensure 00026 // that the supplied EventQueue does not destruct during 00027 // the lifetime of the CIntervalManager. 00028 //////////////////////////////////////////////////////////////////// 00029 INLINE void CIntervalManager:: 00030 set_event_queue(EventQueue *event_queue) { 00031 _event_queue = event_queue; 00032 } 00033 00034 //////////////////////////////////////////////////////////////////// 00035 // Function: CIntervalManager::get_event_queue 00036 // Access: Published 00037 // Description: Returns the custom event queue to be used for 00038 // throwing done events from intervals as they finish. 00039 //////////////////////////////////////////////////////////////////// 00040 INLINE EventQueue *CIntervalManager:: 00041 get_event_queue() const { 00042 return _event_queue; 00043 } 00044 00045 INLINE ostream & 00046 operator << (ostream &out, const CIntervalManager &ival_mgr) { 00047 ival_mgr.output(out); 00048 return out; 00049 } 00050