Home Manual Reference Source Test
public class | source

DatabaseObjectRegistry

You can directly use an instance of this class. registry

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
public

isInRegistry(name: *): *

public

register(name: *, constructorFactory: *)

public

unregister(name: *)

Public Constructors

public constructor source

Public Methods

public deserialize(name: *, dataJSON: *): * source

Params:

NameTypeAttributeDescription
name *
dataJSON *

Return:

*

public get(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public getAllConstructors(): * source

Return:

*

public isInRegistry(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public register(name: *, constructorFactory: *) source

Params:

NameTypeAttributeDescription
name *
constructorFactory *

public unregister(name: *) source

Params:

NameTypeAttributeDescription
name *