Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cJobUnitTest Class Reference

#include <cJobThread.Tests.h>

Inheritance diagram for GrayLib::cJobUnitTest:
GrayLib::cJobBase Gray::cRefBase Gray::cThreadState IUnknown

Public Types

enum  JOBWAIT_TYPE { JOBWAIT_ThreadTick , JOBWAIT_SleepThread , JOBWAIT_Sleep }
 

Public Member Functions

 cJobUnitTest (int iTestNum, TIMESYSD_t uWaitMS, JOBWAIT_TYPE eWaitType)
 
 STDMETHOD_ (cString, get_Name)() const override
 overload this to give the job a name. More...
 
virtual HRESULT RunJob () override
 Override this to make the job do some real work. More...
 
- Public Member Functions inherited from GrayLib::cJobBase
 cJobBase (cJobArray *pArrayParent=nullptr) noexcept
 
virtual HRESULT DisposeThis ()
 
virtual void put_JobParam (INT_PTR iParam)
 
bool isJobScheduled () const noexcept
 
TIMESYS_t get_SortValue () const noexcept
 
TIMESYS_t get_TimeNext () const noexcept
 
TIMESECD_t get_TimeNextSec () const noexcept
 
TIMESECD_t get_TimeLastSec () const noexcept
 
HRESULT RunJobX ()
 
HRESULT ClearJob ()
 
HRESULT ScheduleJob (TIMESYSD_t mSecDelay)
 
HRESULT ScheduleJobX (TIMESYSD_t mSecDelay)
 
HRESULT ScheduleJobParam (INT_PTR iParam)
 
virtual void ResetJobTime ()
 reset the next time. More...
 
HRESULT put_TimeNext (TIMESYS_t nTimeNext)
 Job may be in a sorted list. so protect all the time setting functions. More...
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 
- Public Member Functions inherited from Gray::cThreadState
 cThreadState () noexcept
 
bool isThreadRunning () const noexcept
 
bool isThreadStopping () const noexcept
 
virtual bool RequestStopThread (bool bWillWait=false) noexcept
 

Public Attributes

const int m_iTestNum
 
const TIMESYSD_t m_uWaitMS
 How long should the job last ? More...
 
const JOBWAIT_TYPE m_eWaitType
 

Static Public Attributes

static TIMESYS_t sm_tStart = 0
 
- Static Public Attributes inherited from GrayLib::cJobBase
static const TIMESYS_t k_ASAP = 1
 

Additional Inherited Members

- Protected Attributes inherited from Gray::cThreadState
bool m_bThreadRunning
 called CreateThread() onThreadCreate(), and inside Run(), until onThreadExit() More...
 
volatile bool m_bThreadStopping
 trying to stop the thread nicely. Do this before TerminateThread() More...
 

Member Enumeration Documentation

◆ JOBWAIT_TYPE

Enumerator
JOBWAIT_ThreadTick 

X calls to ThreadTick()

JOBWAIT_SleepThread 

call SleepThread()

JOBWAIT_Sleep 

call cThreadId::SleepCurrent()

Constructor & Destructor Documentation

◆ cJobUnitTest()

GrayLib::cJobUnitTest::cJobUnitTest ( int  iTestNum,
TIMESYSD_t  uWaitMS,
JOBWAIT_TYPE  eWaitType 
)
inline

Member Function Documentation

◆ RunJob()

HRESULT GrayLib::cJobUnitTest::RunJob ( )
overridevirtual

Override this to make the job do some real work.

Implements GrayLib::cJobBase.

◆ STDMETHOD_()

GrayLib::cJobUnitTest::STDMETHOD_ ( cString  ,
get_Name   
) const
inlineoverridevirtual

overload this to give the job a name.

Implements GrayLib::cJobBase.

Member Data Documentation

◆ m_eWaitType

const JOBWAIT_TYPE GrayLib::cJobUnitTest::m_eWaitType

◆ m_iTestNum

const int GrayLib::cJobUnitTest::m_iTestNum

◆ m_uWaitMS

const TIMESYSD_t GrayLib::cJobUnitTest::m_uWaitMS

How long should the job last ?

◆ sm_tStart

TIMESYS_t GrayLib::cJobUnitTest::sm_tStart = 0
static

The documentation for this class was generated from the following files: