|
ReXGlue SDK
|
Interfaces, factory and module declaration. More...
#include <array>#include <cstddef>#include <span>#include <string_view>#include <type_traits>#include <vector>#include <rex/platform.h>#include <rex/result.h>#include <rex/types.h>#include <rex/utility.h>#include <rex/version.h>Go to the source code of this file.
Classes | |
| struct | rex::InterfaceType |
| class | rex::IInterface |
| class | rex::IInterfaceFactory |
| class | rex::IModule |
| class | rex::AppInterfaces |
Namespaces | |
| namespace | rex |
Macros | |
| #define | REX_DECLARE_INTERFACE(Name, version) |
| #define | REX_DECLARE_PRIVATE_INTERFACE(Name, version) |
| #define | REX_INTERFACE(T) |
| #define | REX_MODULE_SERVES(...) |
| #define | REX_DECLARE_MODULE(ModuleClass) |
Typedefs | |
| using | rex::CreateInterfaceFn = IInterface* (*)(const char* name, u32 version) |
| using | rex::EnumerateInterfacesFn = u32 (*)(InterfaceType* out, u32 capacity) |
Functions | |
| template<typename... Interfaces, typename Module> | |
| IInterface * | rex::FindModuleInterface (Module &module, std::string_view name, u32 version) |
Variables | |
| constexpr const char * | rex::kCreateInterfaceSymbol = "ReXCreateInterface" |
| constexpr const char * | rex::kEnumerateInterfacesSymbol = "ReXEnumerateInterfaces" |
| constexpr const char * | rex::kBuildIdentitySymbol = "ReXBuildIdentity" |
Interfaces, factory and module declaration.
| #define REX_DECLARE_INTERFACE | ( | Name, | |
| version ) |
Opens an interface class that derives from IInterface and carries its identity as kInterface. The name is the qualified type name the compiler gives, so declare the class in a named namespace. The class body, the closing brace and the semicolon follow the macro.
| version | The version of the interface layout. |
| #define REX_DECLARE_MODULE | ( | ModuleClass | ) |
Exports the module identity and its interfaces. Use once per module.
| ModuleClass | A class deriving from IModule, with a default constructor. One instance exists as long as the library. |
| #define REX_DECLARE_PRIVATE_INTERFACE | ( | Name, | |
| version ) |
Opens an interface like REX_DECLARE_INTERFACE that only the app and the kernel can reach. The public factory and AppInterfaces::Get never return it.
| version | The version of the interface layout. |
| #define REX_INTERFACE | ( | T | ) |
| #define REX_MODULE_SERVES | ( | ... | ) |
Declares the interfaces a module class serves besides IModule. Use once in a public section of the class body.
| ... | The interfaces, each declared with REX_DECLARE_INTERFACE or REX_DECLARE_PRIVATE_INTERFACE. |