Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cJobThread.Tests.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cJobThreadTests_H
7 #define _INC_cJobThreadTests_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "Thread/cJobBase.h"
13 
14 namespace GrayLib
15 {
16  class cJobUnitTest : public cJobBase
17  {
18  // A job for my unit tests.
19 
20  public:
22  {
23  // What does the test job do ?
27  };
28 
29  const int m_iTestNum;
33 
34  public:
35  cJobUnitTest(int iTestNum, TIMESYSD_t uWaitMS, JOBWAIT_TYPE eWaitType)
36  : m_iTestNum(iTestNum)
37  , m_uWaitMS(uWaitMS)
38  , m_eWaitType(eWaitType)
39  {
40  }
41  STDMETHOD_(cString, get_Name)() const override
42  {
43  return cString::GetFormatf(_GT("cJobUnitTest%d"), m_iTestNum);
44  }
45  virtual HRESULT RunJob() override;
46  };
48 }
49 
50 #endif
#define _GT(x)
like _T(x) macro for static text.
Definition: StrConst.h:27
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cJobBase.h:23
Definition: cJobThread.Tests.h:17
const int m_iTestNum
Definition: cJobThread.Tests.h:29
JOBWAIT_TYPE
Definition: cJobThread.Tests.h:22
@ JOBWAIT_ThreadTick
X calls to ThreadTick()
Definition: cJobThread.Tests.h:24
@ JOBWAIT_SleepThread
call SleepThread()
Definition: cJobThread.Tests.h:25
@ JOBWAIT_Sleep
call cThreadId::SleepCurrent()
Definition: cJobThread.Tests.h:26
cJobUnitTest(int iTestNum, TIMESYSD_t uWaitMS, JOBWAIT_TYPE eWaitType)
Definition: cJobThread.Tests.h:35
const JOBWAIT_TYPE m_eWaitType
Definition: cJobThread.Tests.h:31
virtual HRESULT RunJob() override
Override this to make the job do some real work.
Definition: cJobThread.Tests.cpp:12
STDMETHOD_(cString, get_Name)() const override
overload this to give the job a name.
Definition: cJobThread.Tests.h:41
const TIMESYSD_t m_uWaitMS
How long should the job last ?
Definition: cJobThread.Tests.h:30
static TIMESYS_t sm_tStart
Definition: cJobThread.Tests.h:32
Definition: cRefPtr.h:225
static THIS_t _cdecl GetFormatf(const GChar_t *pszFormat,...)
Definition: cString.cpp:521
Definition: cMesh.h:22
cRefPtr< cJobUnitTest > cJobUnitTestPtr
Definition: cJobThread.Tests.h:47
INT32 TIMESYSD_t
Time delta. signed milli-Seconds Span. cTimeSys::k_DMAX, cTimeSys::k_INF = MAILSLOT_WAIT_FOREVER.
Definition: cTimeSys.h:28
UINT32 TIMESYS_t
TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ?
Definition: cTimeSys.h:27