|
Blender
V2.59
|
00001 /* 00002 * $Id: GHOST_TimerTask.h 35152 2011-02-25 11:28:33Z jesterking $ 00003 * ***** BEGIN GPL LICENSE BLOCK ***** 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software Foundation, 00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00020 * All rights reserved. 00021 * 00022 * The Original Code is: all of this file. 00023 * 00024 * Contributor(s): none yet. 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 00034 #ifndef _GHOST_TIMER_TASK_H_ 00035 #define _GHOST_TIMER_TASK_H_ 00036 00037 #include "GHOST_ITimerTask.h" 00038 00039 00045 class GHOST_TimerTask : public GHOST_ITimerTask 00046 { 00047 public: 00055 GHOST_TimerTask(GHOST_TUns64 start, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData = 0) 00056 : m_start(start), m_interval(interval), m_next(start), m_timerProc(timerProc), m_userData(userData), m_auxData(0) 00057 { 00058 } 00059 00064 inline virtual GHOST_TUns64 getStart() const 00065 { 00066 return m_start; 00067 } 00068 00073 virtual void setStart(GHOST_TUns64 start) 00074 { 00075 m_start = start; 00076 } 00077 00082 inline virtual GHOST_TUns64 getInterval() const 00083 { 00084 return m_interval; 00085 } 00086 00091 virtual void setInterval(GHOST_TUns64 interval) 00092 { 00093 m_interval = interval; 00094 } 00095 00100 inline virtual GHOST_TUns64 getNext() const 00101 { 00102 return m_next; 00103 } 00104 00109 virtual void setNext(GHOST_TUns64 next) 00110 { 00111 m_next = next; 00112 } 00113 00118 inline virtual GHOST_TimerProcPtr getTimerProc() const 00119 { 00120 return m_timerProc; 00121 } 00122 00127 inline virtual void setTimerProc(const GHOST_TimerProcPtr timerProc) 00128 { 00129 m_timerProc = timerProc; 00130 } 00131 00136 inline virtual GHOST_TUserDataPtr getUserData() const 00137 { 00138 return m_userData; 00139 } 00140 00145 virtual void setUserData(const GHOST_TUserDataPtr userData) 00146 { 00147 m_userData = userData; 00148 } 00149 00154 inline virtual GHOST_TUns32 getAuxData() const 00155 { 00156 return m_auxData; 00157 } 00158 00163 virtual void setAuxData(GHOST_TUns32 auxData) 00164 { 00165 m_auxData = auxData; 00166 } 00167 00168 protected: 00170 GHOST_TUns64 m_start; 00171 00173 GHOST_TUns64 m_interval; 00174 00176 GHOST_TUns64 m_next; 00177 00179 GHOST_TimerProcPtr m_timerProc; 00180 00182 GHOST_TUserDataPtr m_userData; 00183 00185 GHOST_TUns32 m_auxData; 00186 }; 00187 00188 #endif // _GHOST_TIMER_TASK_H_ 00189