Constructor
new RuleBasedTransactionFactory(module, typeConverter, typeRuleOverrides)
Creates a rule based transaction factory for use with catbuffer generated code.
Parameters:
Name | Type | Description |
---|---|---|
module |
object | Catbuffer generated module. |
typeConverter |
function | Type converter. |
typeRuleOverrides |
Map | Type rule overrides. |
- Source:
Methods
addArrayParser(name)
Creates array type parser, based on some existing element type parser.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Class name. |
- Source:
addEnumParser(name)
Creates enum type parser.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Class name. |
- Source:
addFlagsParser(name)
Creates flag type parser.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Class name. |
- Source:
addPodParser(name, PodClass)
Creates wrapper for SDK POD types.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Class name. |
PodClass |
type | Class type. |
- Source:
addStructParser(name)
Creates struct parser (to allow nested parsing).
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Class name. |
- Source:
autodetect()
Autodetects rules using reflection.
- Source:
createFromFactory(factory, descriptor) → {object}
Creates an entity from a descriptor using a factory.
Parameters:
Name | Type | Description |
---|---|---|
factory |
function | Factory function. |
descriptor |
object | Entity descriptor. |
- Source:
Returns:
Newly created entity.
- Type
- object