Skip to content

Using the SystemTable to pass interfaces to Runtime Compiled Code

Doug Binks edited this page Jan 4, 2015 · 2 revisions

RCC++ code uses a common technique for accessing C++ functionality between modules - the use of a structure of pointers to pure virtual interfaces and global variables, which we call the System Table. The base RCC++ code forward declares a SystemTable type, but does not define it allowing your own code to do so. For an example see SystemTable.h in the SimpleTest (Pulse) example. The SystemTable can also be used to store simple types.

The global SystemTable is set in the RuntimeObjectSystem::Initialise function call, see the SimpleTest (Pulse) Environment::Init function in Environment.cpp.

To access the SystemTable include ObjectInterfacePerModule.h the and use PerModuleInterface::g_pSystemTable pointer.