Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00033 #ifndef _GHOST_TIMER_TASK_H_ 00034 #define _GHOST_TIMER_TASK_H_ 00035 00036 #include "GHOST_ITimerTask.h" 00037 00038 00044 class GHOST_TimerTask : public GHOST_ITimerTask 00045 { 00046 public: 00054 GHOST_TimerTask(GHOST_TUns64 start, 00055 GHOST_TUns64 interval, 00056 GHOST_TimerProcPtr timerProc, 00057 GHOST_TUserDataPtr userData = 0) 00058 : m_start(start), 00059 m_interval(interval), 00060 m_next(start), 00061 m_timerProc(timerProc), 00062 m_userData(userData), 00063 m_auxData(0) 00064 { 00065 } 00066 00071 inline virtual GHOST_TUns64 getStart() const 00072 { 00073 return m_start; 00074 } 00075 00080 virtual void setStart(GHOST_TUns64 start) 00081 { 00082 m_start = start; 00083 } 00084 00089 inline virtual GHOST_TUns64 getInterval() const 00090 { 00091 return m_interval; 00092 } 00093 00098 virtual void setInterval(GHOST_TUns64 interval) 00099 { 00100 m_interval = interval; 00101 } 00102 00107 inline virtual GHOST_TUns64 getNext() const 00108 { 00109 return m_next; 00110 } 00111 00116 virtual void setNext(GHOST_TUns64 next) 00117 { 00118 m_next = next; 00119 } 00120 00125 inline virtual GHOST_TimerProcPtr getTimerProc() const 00126 { 00127 return m_timerProc; 00128 } 00129 00134 inline virtual void setTimerProc(const GHOST_TimerProcPtr timerProc) 00135 { 00136 m_timerProc = timerProc; 00137 } 00138 00143 inline virtual GHOST_TUserDataPtr getUserData() const 00144 { 00145 return m_userData; 00146 } 00147 00152 virtual void setUserData(const GHOST_TUserDataPtr userData) 00153 { 00154 m_userData = userData; 00155 } 00156 00161 inline virtual GHOST_TUns32 getAuxData() const 00162 { 00163 return m_auxData; 00164 } 00165 00170 virtual void setAuxData(GHOST_TUns32 auxData) 00171 { 00172 m_auxData = auxData; 00173 } 00174 00175 protected: 00177 GHOST_TUns64 m_start; 00178 00180 GHOST_TUns64 m_interval; 00181 00183 GHOST_TUns64 m_next; 00184 00186 GHOST_TimerProcPtr m_timerProc; 00187 00189 GHOST_TUserDataPtr m_userData; 00190 00192 GHOST_TUns32 m_auxData; 00193 }; 00194 00195 #endif // _GHOST_TIMER_TASK_H_ 00196