Internal registry for auto-registered editor extensions.
More...
#include <EditorRegistry.h>
Internal registry for auto-registered editor extensions.
This registry collects editor factories at DLL load time via static initializers. The engine exports functions to iterate this list, and the editor can create fresh instances per-component to avoid stale state issues.
◆ Instance()
| EditorRegistry & DekiEditorInternal::EditorRegistry::Instance |
( |
| ) |
|
|
static |
◆ AddFactory()
Add an editor factory (preferred method).
- Parameters
-
| prototype | Static instance for metadata queries |
| factory | Function that creates new instances |
◆ GetAllFactories()
| const std::vector< EditorFactoryInfo > & DekiEditorInternal::EditorRegistry::GetAllFactories |
( |
| ) |
const |
|
inline |
◆ GetTotalCount()
| size_t DekiEditorInternal::EditorRegistry::GetTotalCount |
( |
| ) |
const |
|
inline |
Get total count of registered factories.
◆ Clear()
| void DekiEditorInternal::EditorRegistry::Clear |
( |
| ) |
|
|
inline |
Clear all factories (must be called before package DLLs are unloaded).
◆ TrimTo()
| void DekiEditorInternal::EditorRegistry::TrimTo |
( |
size_t | count | ) |
|
|
inline |
Drop every factory registered after the first count, keeping the earlier ones untouched.
Entries are appended in DLL load order, so a count taken before a DLL was loaded marks exactly where that DLL's registrations begin. Trimming back to it removes one DLL's entries without disturbing the packages loaded before it, which a blunt Clear() would also destroy (their static registrars never rerun without a DLL reload).
MUST run while the owning DLL is still loaded. A std::function carries a pointer to 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, and there is no way to recover. This is the only safe order: trim, then unload.
The documentation for this class was generated from the following file: