begin rewrite: add lionkor/commandline

This commit is contained in:
Lion Kortlepel authored and Anonymous275 committed 2021-03-18 23:44:14 +02:00
1 parent 6a2ce7faab
commit e5e447c7af
43 files changed
+120 -3536

No files matched your search

+16
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;
};