From 90fd143da4fa8973c297f35bdf076ae501f9a1fd Mon Sep 17 00:00:00 2001 From: "Theunis J. Botha" Date: Wed, 8 Sep 2021 05:44:51 +0200 Subject: [PATCH] also for systems --- dist/r3.js | 9 +++++++-- package.json | 2 +- r3.php | 27 +++------------------------ src/r3/r3-r3.js | 4 ++-- src/r3/r3-system/r3-system-input.js | 3 +++ src/r3/r3-system/r3-system-linking.js | 3 +++ src/r3/r3-system/r3-system-socket.js | 3 +++ src/r3/r3-system/r3-system.js | 7 +++++++ src/templates/system-base.template | 3 +++ src/templates/system.template | 3 +++ version | 2 +- 11 files changed, 36 insertions(+), 30 deletions(-) diff --git a/dist/r3.js b/dist/r3.js index 3293585..cfa7197 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '2.0.202'; - static compileDate = '2021 Sep 08 - 05:32:17 am'; + static version = '2.0.203'; + static compileDate = '2021 Sep 08 - 05:42:56 am'; } /** @@ -50,6 +50,11 @@ class System { System.Started = false; System.Subscriptions = {}; +System.SystemInput = 0x0; +System.SystemLinking = 0x1; +System.SystemSocket = 0x2; +System.MAX_SYSTEMS = 0x3; + class Event { constructor(options) { diff --git a/package.json b/package.json index 1287a79..d942685 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version" : "2.0.202", + "version" : "2.0.203", "description": "", "private": true, "dependencies": { diff --git a/r3.php b/r3.php index 278406c..c7cbc09 100755 --- a/r3.php +++ b/r3.php @@ -1097,35 +1097,13 @@ function generateIndex($types) $file = null; - if ($type === 'System') { - $file = str_replace('src/r3/r3-system', '.', $child->file); - } - - if ($type === 'Component') { - $file = str_replace('src/r3/r3-component', '.', $child->file); - } - - if ($type === 'Runtime') { - $file = str_replace('src/r3/r3-runtime', '.', $child->file); - } + $file = str_replace('src/r3/r3-' . strtolower($type), '.', $child->file); array_push($imports, "const " . $child->name . ' = require(\'' . $file . "');"); array_push($exports, $child->name); } - $indexFile = null; - - if ($type === 'System') { - $indexFile = 'src/r3/r3-system/index.js'; - } - - if ($type === 'Component') { - $indexFile = 'src/r3/r3-component/index.js'; - } - - if ($type === 'Runtime') { - $indexFile = 'src/r3/r3-runtime/index.js'; - } + $indexFile = 'src/r3/r3-'. strtolower($type) . '/index.js'; file_put_contents($indexFile, $template); @@ -1693,6 +1671,7 @@ if ($argv[2] == 'build-dist') { generateOutOfClassImplementationDefines( $graph, [ + 'System', 'Component', 'Runtime' ] diff --git a/src/r3/r3-r3.js b/src/r3/r3-r3.js index e388488..c5b65a8 100644 --- a/src/r3/r3-r3.js +++ b/src/r3/r3-r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '2.0.202'; - static compileDate = '2021 Sep 08 - 05:32:17 am'; + static version = '2.0.203'; + static compileDate = '2021 Sep 08 - 05:42:56 am'; } //GENERATED_IMPORTS_START diff --git a/src/r3/r3-system/r3-system-input.js b/src/r3/r3-system/r3-system-input.js index 5943fbb..2cc5b3d 100644 --- a/src/r3/r3-system/r3-system-input.js +++ b/src/r3/r3-system/r3-system-input.js @@ -488,6 +488,9 @@ class SystemInput extends System { //GENERATED_STATIC_OPTIONS_INIT_START //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/src/r3/r3-system/r3-system-linking.js b/src/r3/r3-system/r3-system-linking.js index a65c6eb..72668bc 100644 --- a/src/r3/r3-system/r3-system-linking.js +++ b/src/r3/r3-system/r3-system-linking.js @@ -291,6 +291,9 @@ class SystemLinking extends System { //GENERATED_STATIC_OPTIONS_INIT_START //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/src/r3/r3-system/r3-system-socket.js b/src/r3/r3-system/r3-system-socket.js index c36ad78..483ee34 100644 --- a/src/r3/r3-system/r3-system-socket.js +++ b/src/r3/r3-system/r3-system-socket.js @@ -244,6 +244,9 @@ class SystemSocket extends System { //GENERATED_STATIC_OPTIONS_INIT_START //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/src/r3/r3-system/r3-system.js b/src/r3/r3-system/r3-system.js index 3599f89..9b7d382 100644 --- a/src/r3/r3-system/r3-system.js +++ b/src/r3/r3-system/r3-system.js @@ -97,6 +97,13 @@ System.Started = false; System.Subscriptions = {}; //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +System.SystemInput = 0x0; +System.SystemLinking = 0x1; +System.SystemSocket = 0x2; +System.MAX_SYSTEMS = 0x3; +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/src/templates/system-base.template b/src/templates/system-base.template index 04e524d..769f32d 100644 --- a/src/templates/system-base.template +++ b/src/templates/system-base.template @@ -48,6 +48,9 @@ class CLASS_NAME { //GENERATED_STATIC_OPTIONS_INIT_START //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/src/templates/system.template b/src/templates/system.template index 235f0f1..c5d5660 100644 --- a/src/templates/system.template +++ b/src/templates/system.template @@ -53,6 +53,9 @@ class CLASS_NAME extends EXTEND_CLASS { //GENERATED_STATIC_OPTIONS_INIT_START //GENERATED_STATIC_OPTIONS_INIT_END +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START +//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END + //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END diff --git a/version b/version index 7835115..8535ec3 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.202 \ No newline at end of file +2.0.203 \ No newline at end of file