NDEVR
API Documentation
WASMModuleLoader.h
1#pragma once
2#include "DLLInfo.h"
3#ifdef __EMSCRIPTEN__
4#include <NDEVR/String.h>
5#include <NDEVR/Buffer.h>
6namespace NDEVR
7{
17 class NDEVR_BASE_API WASMModuleLoader
18 {
19 public:
23 struct SideModuleInfo
24 {
25 String module_name;
26 String url;
27 bool loaded = false;
28 bool failed = false;
29 };
30
36 static void AddSideModule(const StringView& module_name, const StringView& url);
37
42 static void BeginLoadingSideModules();
43
48 static uint04 TotalSideModules();
49
54 static uint04 LoadedSideModules();
55
60 static bool AllSideModulesLoaded();
61
62 private:
63 static void OnModuleLoaded(void* handle, void* user_data);
64 static void OnModuleLoadFailed(void* user_data);
65 static Buffer<SideModuleInfo> s_side_modules;
66 };
67}
68#endif
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...