HomeWildfire Games

Introduce C++ templates replacements for DEFINE_INTERFACE_X and…

Description

Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros

The new methods:

  • aren't included in ScriptInterface.h directly, lightening that header
  • don't use boost CPP
  • don't need argument types or number or constness to be specified
  • can work with object methods somewhat transparently
  • support optional cmptPrivate (allowing removal of many UNUSED macro)
  • support optional const ScriptRequest&, which is safer.

This first diff changes only some of the JSI files & the component manager. Further diffs will update other files and finally delete the current code.

Differential Revision: https://code.wildfiregames.com/D2818

Event Timeline

Stan added a subscriber: Stan.Mar 2 2021, 12:43 AM

Can you fix all those warnings? I fixed everything for A24 ^^"

Gravité	Code	Description	Projet	Fichier	Ligne	État de la suppression
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\simulation2\system\ComponentManager.cpp)	simulation2	c:\dev\trunk\source\scriptinterface\functionwrapper.h	225	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\GameSetup\HWDetect.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	216	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\GameSetup\HWDetect.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	217	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\GameSetup\HWDetect.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	225	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Console.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	216	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Console.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	217	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Console.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	225	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Hotkey.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	216	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Hotkey.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	217	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Hotkey.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	225	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Mod.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	216	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Mod.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	217	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\ps\scripting\JSInterface_Mod.cpp)	engine	c:\dev\trunk\source\scriptinterface\functionwrapper.h	225	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\simulation2\system\ComponentManager.cpp)	simulation2	c:\dev\trunk\source\scriptinterface\functionwrapper.h	216	
Avertissement	C4068	pragma inconnu (compilation du fichier source ..\..\..\source\simulation2\system\ComponentManager.cpp)	simulation2	c:\dev\trunk\source\scriptinterface\functionwrapper.h	217

Mh, sorry 'bout that, I missed that those were related to this diff when checking the warnings. I'll fix it.