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