6#define NDEVRAPI_CALL __stdcall
7#define NDEVRAPI_PTR NDEVRAPI_CALL
8#elif !QT_BUILD && defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
9#error "NDEVR isn't supported for the 'armeabi' NDK ABI"
10#elif !QT_BUILD && defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
15#define NDEVRAPI_ATTR __attribute__((pcs("aapcs-vfp")))
17#define NDEVRAPI_PTR VKAPI_ATTR
24#include <NDEVR/SoftwareService.h>
25#include <NDEVR/String.h>
26#include <NDEVR/Dictionary.h>
27#include <NDEVR/File.h>
28#include <NDEVR/TranslatedString.h>
30typedef void (NDEVRAPI_PTR* PFN_NDEVRVoidFunction)(void);
40typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_InitializeForNDEVR)(
Module& module);
42typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupRegistrationForNDEVR)();
44typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupMetatypesForNDEVR)();
46typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_RegisterUserSettingsForNDEVR)();
48typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupFileStructureForNDEVR)();
50typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupFactoriesForNDEVR)();
52typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetUpdateCheckerForNDEVR)();
54typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupManualsForNDEVR)();
56typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_SetupUIThemesForNDEVR)();
58typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_FactoryResetNDEVR)();
62typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_DefineModuleResourcesForNDEVR)(
ModuleResourceManager* resources);
64typedef PFN_NDEVRVoidFunction(NDEVRAPI_PTR* PFN_OnNDEVRExit)();
306 static bool s_initialized;
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
Provides consistent interface to handle errors through the throw expression.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Logic for the program-wide storage and execution of Modules.
static void FindModules(const Buffer< String > &module_list, const File &module_folder)
Discovers and loads modules from an explicit list of names within the given folder.
static bool IsModuleActive(const StringView &module_name)
Checks whether a specific module is currently marked as active.
static void AddModule(const Module &module)
Registers a pre-constructed Module into the module system.
static Buffer< String > ordered_modules
Module names in their load/execution order.
static void SetErrorCallback(const std::function< void(const Exception &e)> &callback)
Sets a callback to be invoked when a module hook function throws an exception.
static void SetInitialized(QTModelManager *model_manager, QTWindowManager *window_manager)
Marks the module system as fully initialized and stores the manager pointers for use when late-loaded...
static void SetupModuleRegistration()
Runs the registration setup hook on all modules to configure licensing.
static void ReadModuleSettings()
Reads module active/inactive states from persistent settings storage.
static void * LoadDynamicLibrary(const StringView &library)
Loads a dynamic library by name or path and returns an opaque handle.
static File MainModuleFolder()
Returns the primary folder where module libraries are located.
static bool HasActiveModule(const StringView &module_name)
Checks whether a module with the given name exists and is active.
static void DefineModuleResources(const StringView &module_name, ModuleResourceManager *resources)
Asks a specific module to declare its required resources.
static void FindModules(const File &module_list, const File &module_folder)
Discovers and loads modules listed in a ModuleList file within the given folder.
static String main_program_module_name
The name of the module designated as the main application entry-point.
static Dictionary< String, bool > module_active_list
Map of module names to their active/inactive state.
static void AddModule(const File &module_file)
Adds a single module by loading it from the specified library file.
static void * LoadFromDynamicLibrary(void *library, const StringView &function)
Resolves a function symbol from a previously loaded dynamic library.
static void SaveModuleSettings()
Persists the current module active/inactive states to settings storage.
static Dictionary< String, Dictionary< String, void * > > functions
Cached map of library names to their resolved function tables.
static Dictionary< String, Module > modules
Map of module names to their Module instances.
static bool IsInitialized()
Checks whether the module system has completed its initial setup sequence.
static void CallModuleFunction(const StringView &function)
Invokes a named hook function on all registered modules.
static void * LoadFromDynamicLibrary(const StringView &library, const StringView &function)
Loads a dynamic library and resolves a function symbol from it in one step.
static void CallModuleFunction(const StringView &function, QTModelManager *model_manager, QTWindowManager *window_manager)
Invokes a named UI hook function on all registered modules.
static void SetMainProgramModuleName(const StringView &name)
Sets the name of the main program module used as the application entry-point.
static void FindModules(const File &module_folder)
Discovers and loads all modules found in the given folder.
static void OnExit()
Invokes the exit cleanup hook on all modules and releases resources.
Stores all dependencies for a combination of modules that make up a complete software package.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Manages all windows and logic surrounding dialogs and views for displaying and managing a 3D environm...
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
Logic for reading or writing to a string or a user friendly, TranslatedString.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Base class for extensions, typically added as external DLL's that can modify or enhance the behavior ...
File library
Path to the dynamic library file for this module.
Module(const StringView &name, const File &library)
Constructs a Module with the given name and library file.
bool allow_deferred_loading
Whether this module can be loaded asynchronously as a WASM side module.
void defineModuleResources(ModuleResourceManager *resources) const
Asks the module to declare its required resources via the given resource manager.
ModuleType
Categorizes the role a module plays within the application.
@ e_library_dependency
Module wraps a third-party library dependency.
@ e_utility
Module provides utility or tool functionality.
@ e_application
Module serves as an application entry-point.
@ e_undefined
Module type has not been specified.
String name
Internal identifier for the module.
Module()
Constructs a default Module with no name or library.
String activation_id
Identifier used for license activation checks.
TranslatedString description
User-facing description of the module.
void callModuleFunction(const StringView &function) const
Invokes a named hook function within this module.
bool isValid() const
Checks whether this module has a valid loaded library.
Dictionary< String, void * > loaded_functions
Cached map of hook function names to their resolved addresses.
void callModuleFunction(const StringView &function, QTModelManager *model_manager, QTWindowManager *window_manager) const
Invokes a named UI hook function within this module, passing the model and window managers.
void initialize()
Loads the dynamic library and resolves the module hook functions.
ModuleType type
The role category of this module.
String website
URL to the module's website or documentation.
String icon
Name or path of the icon associated with this module.
TranslatedString display_name
User-facing display name of the module.
void * module_ptr
Opaque pointer to the loaded dynamic library handle.
String version
Version string of the module.
String license_agreement
License agreement text for the module.
Module(const StringView &name)
Constructs a Module with the given name.
bool is_active
Whether the module is currently active.
bool allow_user_toggle_active
Whether the user is allowed to enable or disable this module.