DatabaseObjectRegistry
Public: This keeps track of constructors so we know how to inflate serialized objects.
We map constructor string names with factory functions that will return the actual constructor itself.
The reason we have an extra function call to return a constructor is so
we don't need to require all constructors at once on load. We are
wasting a very large amount of time on bootup requiring files that may
never be used or only used way down the line.
If 3rd party packages want to register new inflatable models, they can
use register and pass the constructor generator along with the name.
Note that there is one registry per window.
Constructor Summary
| Public Constructor | ||
| public |
|
|
Method Summary
| Public Methods | ||
| public |
deserialize(name: *, dataJSON: *): * |
|
| public |
get(name: *): * |
|
| public |
getAllConstructors(): * |
|
| public |
isInRegistry(name: *): * |
|
| public |
register(name: *, constructorFactory: *) |
|
| public |
unregister(name: *) |
|
Public Constructors
public constructor source
Public Methods
public deserialize(name: *, dataJSON: *): * source
Params:
| Name | Type | Attribute | Description |
| name | * | ||
| dataJSON | * |
Return:
| * |
public register(name: *, constructorFactory: *) source
Params:
| Name | Type | Attribute | Description |
| name | * | ||
| constructorFactory | * |
public unregister(name: *) source
Params:
| Name | Type | Attribute | Description |
| name | * |