trying to improve the stuff
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
typedef void *( *CreateInterfaceFn )( const char *szName, int *pReturnCode );
|
||||
typedef void *( *InstantiateInterfaceFn )( void );
|
||||
|
||||
CreateInterfaceFn Plat_GetInterfaceFactory( void *lib );
|
||||
|
||||
class CInterfaceRegistry
|
||||
{
|
||||
public:
|
||||
@@ -24,7 +22,16 @@ public:
|
||||
static void *__Create##className##_interface() { return ( interfaceName* )( new className ); }; \
|
||||
static CInterfaceRegistry __Create##className##_registry( __Create##className##_interface, versionName );
|
||||
|
||||
#define EXPOSE_INTERFACE_FN( functionName, interfaceName, versionName ) \
|
||||
static CInterfaceRegistry __Create##interfaceName##_registry( functionName, versionName );
|
||||
|
||||
#define EXPOSE_INTERFACE_GLOBALVAR( className, interfaceName, versionName, globalVarName ) \
|
||||
static void *__Create##interfaceName##_interface() { return ( interfaceName* )( &globalVarName ); }; \
|
||||
static CInterfaceRegistry __Create##interfaceName##_registry( __Create##className##_interface, versionName );
|
||||
|
||||
|
||||
void *CreateInterface( const char *szName, int *pReturnCode );
|
||||
|
||||
CreateInterfaceFn Sys_GetFactory( void *pLibrary );
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user