begin rewrite: add lionkor/commandline

This commit is contained in:
Lion Kortlepel
2021-02-14 13:03:59 +01:00
committed by Anonymous275
parent 6a2ce7faab
commit e5e447c7af
43 changed files with 120 additions and 3536 deletions

16
include/IThreaded.h Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#include <thread>
// pure virtual class to be inherited from by classes which intend to be threaded
class IThreaded {
public:
IThreaded()
// invokes operator() on this object
: _Thread(std::thread([this] { (*this)(); })) { }
virtual void operator()() = 0;
protected:
std::thread _Thread;
};