|
Nebula
|
#include <levelextension.h>
The extensions the level formats write and read.
Registered by feature units, which is what keeps the formats from knowing anything about what a feature serializes.
Static Public Member Functions | |
| static void | Register (const LevelExtension &extension) |
| register an extension. The name is what the formats use to find it again | |
| static const LevelExtension * | GetExtension (Util::StringAtom name) |
| the extension registered under a name, or null when there is none | |
| static const Util::Array< LevelExtension > & | GetAllExtensions () |
| all extensions, in the order they were registered, which is the order the formats write them in | |
Private Member Functions | |
| LevelExtensionRegistry () | |
| ~LevelExtensionRegistry () | |
Static Private Member Functions | |
| static LevelExtensionRegistry * | Instance () |
| The registry's constructor is called by the Instance() method, and nobody else. | |
| static void | Destroy () |
| This static method is used to destroy the registry object and should be called right before the main function exits. | |
Private Attributes | |
| Util::Array< LevelExtension > | extensions |
| Util::Dictionary< Util::StringAtom, IndexT > | byName |
Static Private Attributes | |
| static LevelExtensionRegistry * | Singleton = nullptr |
|
private |
|
private |
|
staticprivate |
This static method is used to destroy the registry object and should be called right before the main function exits.
It will make sure that no accidental memory leaks are reported by the debug heap.
|
static |
all extensions, in the order they were registered, which is the order the formats write them in
|
static |
the extension registered under a name, or null when there is none
|
staticprivate |
The registry's constructor is called by the Instance() method, and nobody else.
|
static |
register an extension. The name is what the formats use to find it again
An extension is registered by name, and the name is what a file carries, so two extensions cannot share one.
The order they are registered in is the order the formats write them in, which is what keeps a saved level from moving its extension nodes between builds.
|
private |
|
private |
|
staticprivate |