Blender  V2.93
GHOST_TimerTask.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
25 #pragma once
26 
27 #include "GHOST_ITimerTask.h"
28 
33  public:
42  GHOST_TUns64 interval,
43  GHOST_TimerProcPtr timerProc,
44  GHOST_TUserDataPtr userData = NULL)
45  : m_start(start),
46  m_interval(interval),
47  m_next(start),
48  m_timerProc(timerProc),
49  m_userData(userData),
50  m_auxData(0)
51  {
52  }
53 
58  inline GHOST_TUns64 getStart() const
59  {
60  return m_start;
61  }
62 
67  void setStart(GHOST_TUns64 start)
68  {
69  m_start = start;
70  }
71 
76  inline GHOST_TUns64 getInterval() const
77  {
78  return m_interval;
79  }
80 
85  void setInterval(GHOST_TUns64 interval)
86  {
87  m_interval = interval;
88  }
89 
94  inline GHOST_TUns64 getNext() const
95  {
96  return m_next;
97  }
98 
104  {
105  m_next = next;
106  }
107 
113  {
114  return m_timerProc;
115  }
116 
121  inline void setTimerProc(const GHOST_TimerProcPtr timerProc)
122  {
123  m_timerProc = timerProc;
124  }
125 
131  {
132  return m_userData;
133  }
134 
139  void setUserData(const GHOST_TUserDataPtr userData)
140  {
141  m_userData = userData;
142  }
143 
148  inline GHOST_TUns32 getAuxData() const
149  {
150  return m_auxData;
151  }
152 
157  void setAuxData(GHOST_TUns32 auxData)
158  {
159  m_auxData = auxData;
160  }
161 
162  protected:
165 
168 
171 
174 
177 
180 };
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:89
unsigned int GHOST_TUns32
Definition: GHOST_Types.h:64
unsigned long long GHOST_TUns64
Definition: GHOST_Types.h:86
void(* GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, GHOST_TUns64 time)
Definition: GHOST_Types.h:608
void setTimerProc(const GHOST_TimerProcPtr timerProc)
void setInterval(GHOST_TUns64 interval)
GHOST_TUserDataPtr m_userData
GHOST_TUns64 getStart() const
void setStart(GHOST_TUns64 start)
GHOST_TUns64 m_next
void setNext(GHOST_TUns64 next)
GHOST_TUns64 getInterval() const
GHOST_TimerTask(GHOST_TUns64 start, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData=NULL)
void setAuxData(GHOST_TUns32 auxData)
GHOST_TimerProcPtr m_timerProc
GHOST_TUns64 getNext() const
GHOST_TUserDataPtr getUserData() const
GHOST_TimerProcPtr getTimerProc() const
GHOST_TUns64 m_interval
GHOST_TUns64 m_start
GHOST_TUns32 m_auxData
void setUserData(const GHOST_TUserDataPtr userData)
GHOST_TUns32 getAuxData() const
static ulong * next