Collects the editor factories that static initializers register when a DLL loads.
More...
#include <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/EditorRegistry.h>
Collects the editor factories that static initializers register when a DLL loads.
The engine exports functions to walk this list, and the editor creates a fresh instance per component so no state goes stale.
◆ Instance()
| EditorRegistry & DekiEditorInternal::EditorRegistry::Instance |
( |
| ) |
|
|
static |
◆ AddFactory()
Adds a factory, with a static prototype used for metadata.
◆ GetAllFactories()
| const std::vector< EditorFactoryInfo > & DekiEditorInternal::EditorRegistry::GetAllFactories |
( |
| ) |
const |
|
inline |
◆ GetTotalCount()
| size_t DekiEditorInternal::EditorRegistry::GetTotalCount |
( |
| ) |
const |
|
inline |
◆ Clear()
| void DekiEditorInternal::EditorRegistry::Clear |
( |
| ) |
|
|
inline |
Removes every factory. Must be called before package DLLs unload.
◆ TrimTo()
| void DekiEditorInternal::EditorRegistry::TrimTo |
( |
size_t | count | ) |
|
|
inline |
Removes every factory after the first count.
Entries are added in DLL load order, so a count taken before a DLL loaded marks where its registrations begin. Trimming to it removes that DLL's entries and keeps those of packages loaded earlier, which Clear() would lose for good (their static registrars do not run again without a DLL reload).
MUST run while the owning DLL is still loaded. A std::function points at manager code inside the DLL that created it, and that code runs on COPY and on DESTRUCTION alike, so after FreeLibrary even discarding the entry faults. Always trim, then unload.
The documentation for this class was generated from the following file: