Danbias/Code/Misc/Thread/IThreadObject.h

38 lines
764 B
C
Raw Normal View History

2013-11-26 21:51:40 +01:00
/////////////////////////////////////////////////////////////////////
// Created by [Dennis Andersen] [2013]
/////////////////////////////////////////////////////////////////////
#ifndef MISC_I_THREAD_OBJECT_H
#define MISC_I_THREAD_OBJECT_H
namespace Oyster
{
namespace Thread
{
/**
* Inherit this class to get threading compatibility.
*/
class IThreadObject
{
2013-11-26 21:51:40 +01:00
public:
/**
* Override this to get notified when the thread is started.
*/
virtual void ThreadEntry() { }
/**
* Override this to get notified when the thread is about to exit.
*/
virtual void ThreadExit() { }
/**
* This function is required to get threading working.
*/
virtual bool DoWork ( ) = 0;
};
}
}
2013-11-26 21:51:40 +01:00
#endif // !MISC_I_THREAD_OBJECT_H