annotate Resources/CodeGeneration/template.in.ts.j2 @ 819:a68cd7ae8838

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 29 May 2019 13:39:31 +0200
parents 84af39146e76
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
1 /*
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
2 1 2 3 4 5 6 7
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
3 12345678901234567890123456789012345678901234567890123456789012345678901234567890
507
ce49eae4c887 Codegen + Warning fixes
Benjamin Golinvaux <bgo@osimis.io>
parents: 495
diff changeset
4
ce49eae4c887 Codegen + Warning fixes
Benjamin Golinvaux <bgo@osimis.io>
parents: 495
diff changeset
5 Generated on {{currentDatetime}} by stonegentool
ce49eae4c887 Codegen + Warning fixes
Benjamin Golinvaux <bgo@osimis.io>
parents: 495
diff changeset
6
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
7 */
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
8
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
9 function StoneCheckSerializedValueType(value: any, typeStr: string)
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
10 {
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
11 StoneCheckSerializedValueTypeGeneric(value);
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
12
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
13 if (value['type'] != typeStr)
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
14 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
15 throw new Error(
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
16 `Cannot deserialize type ${value['type']} into ${typeStr}`);
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
17 }
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
18 }
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
19
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
20 function isString(val: any) :boolean
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
21 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
22 return ((typeof val === 'string') || (val instanceof String));
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
23 }
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
24
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
25 function StoneCheckSerializedValueTypeGeneric(value: any)
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
26 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
27 // console.//log("+-------------------------------------------------+");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
28 // console.//log("| StoneCheckSerializedValueTypeGeneric |");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
29 // console.//log("+-------------------------------------------------+");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
30 // console.//log("value = ");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
31 // console.//log(value);
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
32 if ( (!('type' in value)) || (!isString(value.type)) )
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
33 {
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
34 throw new Error(
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
35 "Cannot deserialize value ('type' key invalid)");
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
36 }
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
37 }
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
38
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
39 // end of generic methods
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
40 {% for enum in enums%}
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
41 export enum {{enum['name']}} {
519
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
42 {% for key in enum['fields']%} {{key}} = "{{key}}"{% if not loop.last %},{%endif%}
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
43 {%endfor%}};
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
44
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
45 export function {{enum['name']}}_FromString(strValue:string) : {{enum['name']}}
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
46 {
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
47 {% for key in enum['fields'] %} if( strValue == "{{key}}" )
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
48 {
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
49 return {{enum['name']}}.{{key}};
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
50 }
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
51 {%endfor%}
519
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
52 let msg : string = `String ${strValue} cannot be converted to {{enum['name']}}. Possible values are: {% for key in enum['fields']%}{{key}}{% if not loop.last %}, {%endif%}{% endfor %}`;
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
53 throw new Error(msg);
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
54 }
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
55
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
56 export function {{enum['name']}}_ToString(value:{{enum['name']}}) : string
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
57 {
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
58 {% for key in enum['fields'] %} if( value == {{enum['name']}}.{{key}} )
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
59 {
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
60 return "{{key}}";
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
61 }
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
62 {%endfor%}
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
63 let msg : string = `Value ${value} cannot be converted to {{enum['name']}}. Possible values are: `;
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
64 {% for key in enum['fields']%} {
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
65 let _{{key}}_enumValue : string = {{enum['name']}}.{{key}}; // enums are strings in stonecodegen, so this will work.
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
66 let msg_{{key}} : string = `{{key}} (${_{{key}}_enumValue}){% if not loop.last %}, {%endif%}`;
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
67 msg = msg + msg_{{key}};
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
68 }
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
69 {%endfor%} throw new Error(msg);
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
70 }
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
71 {%endfor%}
17106b29ed6d Changed the metadata system for structs. A __handler entry is now required
Benjamin Golinvaux <bgo@osimis.io>
parents: 515
diff changeset
72
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
73
508
7105a0bad250 - Added HandleSerializedMessage to IStoneApplication (empty impl)
Benjamin Golinvaux <bgo@osimis.io>
parents: 507
diff changeset
74 {% for struct in structs%}export class {{struct['name']}} {
628
84af39146e76 CodeGeneration: support default values
Alain Mazy <alain@mazy.be>
parents: 519
diff changeset
75 {% if struct %}{% if struct['fields'] %}{% for key in struct['fields']%} {{key}}:{{CanonToTs(struct['fields'][key]['type'])}};
508
7105a0bad250 - Added HandleSerializedMessage to IStoneApplication (empty impl)
Benjamin Golinvaux <bgo@osimis.io>
parents: 507
diff changeset
76 {% endfor %}{% endif %}{% endif %}
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
77 constructor() {
628
84af39146e76 CodeGeneration: support default values
Alain Mazy <alain@mazy.be>
parents: 519
diff changeset
78 {% if struct %}{% if struct['fields'] %}{% for key in struct['fields']%}{% if NeedsTsConstruction(enums,CanonToTs(struct['fields'][key]['type'])) %} this.{{key}} = new {{CanonToTs(struct['fields'][key]['type'])}}();
84af39146e76 CodeGeneration: support default values
Alain Mazy <alain@mazy.be>
parents: 519
diff changeset
79 {% endif %}
84af39146e76 CodeGeneration: support default values
Alain Mazy <alain@mazy.be>
parents: 519
diff changeset
80 {% if struct['fields'][key]['defaultValue'] %} this.{{key}} = {{DefaultValueToTs(enums,struct['fields'][key])}};
508
7105a0bad250 - Added HandleSerializedMessage to IStoneApplication (empty impl)
Benjamin Golinvaux <bgo@osimis.io>
parents: 507
diff changeset
81 {% endif %}{% endfor %}{% endif %}{% endif %} }
493
6fbf2eae7c88 All unit tests pass for generation, including handler and dispatcher
bgo-osimis
parents: 491
diff changeset
82
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
83 public StoneSerialize(): string {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
84 let container: object = {};
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
85 container['type'] = '{{rootName}}.{{struct['name']}}';
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
86 container['value'] = this;
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
87 return JSON.stringify(container);
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
88 }
490
6470248790db ongoing codegen work
bgo-osimis
parents:
diff changeset
89
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
90 public static StoneDeserialize(valueStr: string) : {{struct['name']}}
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
91 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
92 let value: any = JSON.parse(valueStr);
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
93 StoneCheckSerializedValueType(value, '{{rootName}}.{{struct['name']}}');
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
94 let result: {{struct['name']}} = value['value'] as {{struct['name']}};
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
95 return result;
493
6fbf2eae7c88 All unit tests pass for generation, including handler and dispatcher
bgo-osimis
parents: 491
diff changeset
96 }
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
97 }
493
6fbf2eae7c88 All unit tests pass for generation, including handler and dispatcher
bgo-osimis
parents: 491
diff changeset
98 {% endfor %}
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
99 export interface IHandler {
513
dea3787a8f4b Added support for struct metadata, to disable/enable handler support in Typescript or C++
Benjamin Golinvaux <bgo@osimis.io>
parents: 508
diff changeset
100 {% for struct in structs%}{% if struct['__meta__'].handleInTypescript %} Handle{{struct['name']}}(value: {{struct['name']}}): boolean;
dea3787a8f4b Added support for struct metadata, to disable/enable handler support in Typescript or C++
Benjamin Golinvaux <bgo@osimis.io>
parents: 508
diff changeset
101 {% endif %}{% endfor %}};
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
102
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
103 /** Service function for StoneDispatchToHandler */
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
104 export function StoneDispatchJsonToHandler(
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
105 jsonValue: any, handler: IHandler): boolean
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
106 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
107 StoneCheckSerializedValueTypeGeneric(jsonValue);
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
108 let type: string = jsonValue["type"];
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
109 if (type == "")
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
110 {
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
111 // this should never ever happen
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
112 throw new Error("Caught empty type while dispatching");
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
113 }
513
dea3787a8f4b Added support for struct metadata, to disable/enable handler support in Typescript or C++
Benjamin Golinvaux <bgo@osimis.io>
parents: 508
diff changeset
114 {% for struct in structs%}{% if struct['__meta__'].handleInTypescript %} else if (type == "{{rootName}}.{{struct['name']}}")
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
115 {
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
116 let value = jsonValue["value"] as {{struct['name']}};
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
117 return handler.Handle{{struct['name']}}(value);
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
118 }
513
dea3787a8f4b Added support for struct metadata, to disable/enable handler support in Typescript or C++
Benjamin Golinvaux <bgo@osimis.io>
parents: 508
diff changeset
119 {% endif %}{% endfor %} else
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
120 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
121 return false;
491
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
122 }
8e7e151ef472 Unit tests pass for enum generation
bgo-osimis
parents: 490
diff changeset
123 }
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
124
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
125 /** Takes a serialized type and passes this to the handler */
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
126 export function StoneDispatchToHandler(
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
127 strValue: string, handler: IHandler): boolean
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
128 {
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
129 // console.//log("+------------------------------------------------+");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
130 // console.//log("| StoneDispatchToHandler |");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
131 // console.//log("+------------------------------------------------+");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
132 // console.//log("strValue = ");
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
133 // console.//log(strValue);
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
134 let jsonValue: any = JSON.parse(strValue)
495
6405435480ae Fixed template to add dump capabilities + started work on an integrated TS/WASM test
bgo-osimis
parents: 494
diff changeset
135 return StoneDispatchJsonToHandler(jsonValue, handler);
494
fc17251477d6 TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
bgo-osimis
parents: 493
diff changeset
136 }