8cef16017e
boost.signals sadly requires way too many dependencies, libsigc++ requires too much configuration and all the other libs I tested mostly required constexpr as callbacks (due to passing callbacks via template list), which doesn't server this purpose, so wink-signals seems just about right for what we do.
22 lines
432 B
C++
22 lines
432 B
C++
namespace Components
|
|
{
|
|
class QuickPatch : public Component
|
|
{
|
|
public:
|
|
typedef void(Callback)();
|
|
|
|
QuickPatch();
|
|
~QuickPatch();
|
|
const char* GetName() { return "QuickPatch"; };
|
|
|
|
static void UnlockStats();
|
|
static void OnShutdown(Callback* callback);
|
|
|
|
private:
|
|
static wink::signal<wink::slot<Callback>> ShutdownSignal;
|
|
|
|
static int64_t* GetStatsID();
|
|
static void ShutdownStub(int channel, const char* message);
|
|
};
|
|
}
|