STRUCT
Static Method Summary
Static Public Methods | ||
public static |
Super(obj: *, reader: *) invoke loadSTRUCT methods on parent objects. |
|
public static |
chain_fromSTRUCT(cls: *, reader: *): * deprecated. |
|
public static |
fmt_struct(stt: *, internal_only: *, no_helper_js: *): * |
|
public static |
formatStruct(stt: *, internal_only: *, no_helper_js: *): * |
|
public static |
inherit(child: *, parent: *, structName: *): * |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
compiled_code: {} |
|
public |
|
|
public |
null_natives: {} |
|
public |
struct_cls: {} |
|
public |
struct_ids: {} |
|
public |
structs: {} |
Method Summary
Public Methods | ||
public |
add_class(cls: *, structName: *) |
|
public |
forEach(func: *, thisvar: *) |
|
public |
get_struct(name: *): * |
|
public |
get_struct_cls(name: *): * |
|
public |
get_struct_id(id: *): * |
|
public |
isRegistered(cls: *): * |
|
public |
parse_structs(buf: *, defined_classes: *) |
|
public |
readJSON(json: *, cls_or_struct_id: *, objInstance: *): * |
|
public |
readObject(data: *, cls_or_struct_id: *, uctx: *): cls_or_struct_id Read an object from binary data |
|
public |
read_object(data: *, cls_or_struct_id: *, uctx: *): * |
|
public |
register(cls: *, structName: *): * |
|
public |
registerGraph(srcSTRUCT: *, cls: *): * adds all structs referenced by cls inside of srcSTRUCT to this |
|
public |
unregister(cls: *) |
|
public |
validateStructs(onerror: *) |
|
public |
writeJSON(obj: *, stt: *): * |
|
public |
writeObject(data: *, obj: *): * |
|
public |
write_object(data: *, obj: *): * |
|
public |
write_struct(data: *, obj: *, stt: *) |
Private Methods | ||
private |
_env_call(code: *, obj: *, env: *): * |
Static Public Methods
public static Super(obj: *, reader: *) source
invoke loadSTRUCT methods on parent objects. note that reader() is only called once. it is called however.
Params:
Name | Type | Attribute | Description |
obj | * | ||
reader | * |
public static chain_fromSTRUCT(cls: *, reader: *): * source
deprecated. used with old fromSTRUCT interface.
Params:
Name | Type | Attribute | Description |
cls | * | ||
reader | * |
Return:
* |
public static fmt_struct(stt: *, internal_only: *, no_helper_js: *): * source
Params:
Name | Type | Attribute | Description |
stt | * | ||
internal_only | * | ||
no_helper_js | * |
Return:
* |
public static formatStruct(stt: *, internal_only: *, no_helper_js: *): * source
Params:
Name | Type | Attribute | Description |
stt | * | ||
internal_only | * | ||
no_helper_js | * |
Return:
* |
public static inherit(child: *, parent: *, structName: *): * source
Params:
Name | Type | Attribute | Description |
child | * | ||
parent | * | ||
structName | * |
|
Return:
* |
Public Constructors
public constructor() source
Public Members
public compiled_code: {} source
public null_natives: {} source
public struct_cls: {} source
public struct_ids: {} source
public structs: {} source
Public Methods
public add_class(cls: *, structName: *) source
Params:
Name | Type | Attribute | Description |
cls | * | ||
structName | * |
public forEach(func: *, thisvar: *) source
Params:
Name | Type | Attribute | Description |
func | * | ||
thisvar | * |
public parse_structs(buf: *, defined_classes: *) source
Params:
Name | Type | Attribute | Description |
buf | * | ||
defined_classes | * |
public readJSON(json: *, cls_or_struct_id: *, objInstance: *): * source
Params:
Name | Type | Attribute | Description |
json | * | ||
cls_or_struct_id | * | ||
objInstance | * |
|
Return:
* |
public readObject(data: *, cls_or_struct_id: *, uctx: *): cls_or_struct_id source
Read an object from binary data
Params:
Name | Type | Attribute | Description |
data | * | : DataView or Uint8Array instance |
|
cls_or_struct_id | * | : Structable class |
|
uctx | * | : internal parameter |
Return:
cls_or_struct_id | Instance of cls_or_struct_id |
public read_object(data: *, cls_or_struct_id: *, uctx: *): * source
Params:
Name | Type | Attribute | Description |
data | * | : DataView or Uint8Array instance |
|
cls_or_struct_id | * | : Structable class |
|
uctx | * | : internal parameter |
Return:
* |
public register(cls: *, structName: *): * source
Params:
Name | Type | Attribute | Description |
cls | * | ||
structName | * |
Return:
* |
public registerGraph(srcSTRUCT: *, cls: *): * source
adds all structs referenced by cls inside of srcSTRUCT to this
Params:
Name | Type | Attribute | Description |
srcSTRUCT | * | ||
cls | * |
Return:
* |
public unregister(cls: *) source
Params:
Name | Type | Attribute | Description |
cls | * |
public validateStructs(onerror: *) source
Params:
Name | Type | Attribute | Description |
onerror | * |
public writeJSON(obj: *, stt: *): * source
Params:
Name | Type | Attribute | Description |
obj | * | ||
stt | * |
|
Return:
* |
public writeObject(data: *, obj: *): * source
Params:
Name | Type | Attribute | Description |
data | * | array to write data into, |
|
obj | * | structable object |
Return:
* |
public write_object(data: *, obj: *): * source
Params:
Name | Type | Attribute | Description |
data | * | : array to write data into, |
|
obj | * | : structable object |
Return:
* |
public write_struct(data: *, obj: *, stt: *) source
Params:
Name | Type | Attribute | Description |
data | * | ||
obj | * | ||
stt | * |
Private Methods
private _env_call(code: *, obj: *, env: *): * source
Params:
Name | Type | Attribute | Description |
code | * | ||
obj | * | ||
env | * |
Return:
* |