From 4c4d605d10109e02708984755405bbe0947ef5c4 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:33:31 +0100 Subject: initial commit --- NorthstarDedicatedTest/sourceinterface.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 NorthstarDedicatedTest/sourceinterface.h (limited to 'NorthstarDedicatedTest/sourceinterface.h') diff --git a/NorthstarDedicatedTest/sourceinterface.h b/NorthstarDedicatedTest/sourceinterface.h new file mode 100644 index 00000000..bc4767f5 --- /dev/null +++ b/NorthstarDedicatedTest/sourceinterface.h @@ -0,0 +1,24 @@ +#pragma once +#include + +// literally just copied from ttf2sdk definition +typedef void* (*CreateInterfaceFn)(const char* pName, int* pReturnCode); + +template class SourceInterface +{ +private: + T* m_interface; + +public: + SourceInterface(const std::string& moduleName, const std::string& interfaceName); + + T* operator->() const + { + return m_interface; + } + + operator T* () const + { + return m_interface; + } +}; -- cgit v1.2.3