diff --git a/.r3_history b/.r3_history index 3060834..17df084 100644 --- a/.r3_history +++ b/.r3_history @@ -12,3 +12,4 @@ r3 create Image extends Component ./r3-component/ r3 create SystemInput system r3 create Input extends Component ./r3-component/ r3 create Touch extends Input ./r3-component/ +r3 create Runtime extends Event ./r3-runtime/ diff --git a/dist/r3.js b/dist/r3.js index 9b4eb89..ac29d04 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '2.0.185'; - static compileDate = '2021 Sep 07 - 07:56:14 am'; + static version = '2.0.191'; + static compileDate = '2021 Sep 07 - 08:41:16 am'; } /** @@ -29,8 +29,6 @@ class System { Object.assign(this, options); - Event.Emit(Event.OBJECT_INITIALIZED, this); - } } @@ -50,8 +48,6 @@ class Event { Object.assign(this, options); - Event.Emit(Event.OBJECT_INITIALIZED, this); - } /** @@ -282,15 +278,16 @@ Event.MOUSE_MOVE = 0xd; Event.MOUSE_UP = 0xe; Event.MOUSE_WHEEL = 0xf; Event.OBJECT_CREATED = 0x10; -Event.OBJECT_INITIALIZED = 0x11; -Event.PAUSE = 0x12; -Event.RESTART = 0x13; -Event.START = 0x14; -Event.TOUCH_CANCEL = 0x15; -Event.TOUCH_END = 0x16; -Event.TOUCH_MOVE = 0x17; -Event.TOUCH_START = 0x18; -Event.MAX_EVENTS = 0x19; +Event.PAUSE = 0x11; +Event.RESTART = 0x12; +Event.START = 0x13; +Event.TOUCH_CANCEL = 0x14; +Event.TOUCH_END = 0x15; +Event.TOUCH_MOVE = 0x16; +Event.TOUCH_START = 0x17; +Event.UPDATE_FROM_INSTANCE_AFTER = 0x18; +Event.UPDATE_FROM_INSTANCE_BEFORE = 0x19; +Event.MAX_EVENTS = 0x1a; Event.GetEventName = function(eventId) { @@ -311,14 +308,15 @@ Event.GetEventName = function(eventId) { case 0xe : return 'mouse_up'; case 0xf : return 'mouse_wheel'; case 0x10 : return 'object_created'; - case 0x11 : return 'object_initialized'; - case 0x12 : return 'pause'; - case 0x13 : return 'restart'; - case 0x14 : return 'start'; - case 0x15 : return 'touch_cancel'; - case 0x16 : return 'touch_end'; - case 0x17 : return 'touch_move'; - case 0x18 : return 'touch_start'; + case 0x11 : return 'pause'; + case 0x12 : return 'restart'; + case 0x13 : return 'start'; + case 0x14 : return 'touch_cancel'; + case 0x15 : return 'touch_end'; + case 0x16 : return 'touch_move'; + case 0x17 : return 'touch_start'; + case 0x18 : return 'update_from_instance_after'; + case 0x19 : return 'update_from_instance_before'; default : throw new Error('Event type not defined : ' + eventId); } @@ -337,8 +335,6 @@ class Utils { Object.assign(this, options); - Event.Emit(Event.OBJECT_INITIALIZED, this); - } static GetFirstParent(object, constructor) { @@ -1634,12 +1630,8 @@ class SystemInput extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } /** @@ -1935,12 +1927,8 @@ class SystemLinking extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } /** @@ -2094,12 +2082,8 @@ class SystemSocket extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } /** @@ -2221,12 +2205,8 @@ class SystemTest extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } /** @@ -2340,10 +2320,6 @@ class SystemTest extends System { - Of the form x= - - Of the form x= - **/ class R3Object extends Event { @@ -2356,16 +2332,12 @@ class R3Object extends Event { super(options); - this.emit(Event.OBJECT_CREATED, this); - if (typeof options.register === 'undefined') { options.register = true; } Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } } @@ -2431,7 +2403,7 @@ class R3Object extends Event { Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Static Properties: @@ -2440,25 +2412,24 @@ class R3Object extends Event { Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Static Methods: - Of the form x= - - Of the form x= - **/ class Component extends R3Object { @@ -2471,22 +2442,14 @@ class Component extends R3Object { super(options); - this.emit(Event.OBJECT_CREATED, this); - - if (typeof options.runtime === 'undefined') { - options.runtime = R3.Runtime.DEFAULT; - } - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - this.emit(Event.COMPONENT_CREATED, this); } /** * createInstance() - * - No comment + * - Creates an instance of this object based on the current runtime */ createInstance() { @@ -2495,7 +2458,6 @@ class Component extends R3Object { this.getRuntime().createInstance( this, { - 'runtime': this.runtime } ) this.emit(Event.INSTANCE_CREATED, this); @@ -2504,7 +2466,7 @@ class Component extends R3Object { /** * dispose() - * - No comment + * - Disposes of this object by disposing the instance first. */ dispose() { @@ -2523,7 +2485,7 @@ class Component extends R3Object { /** * disposeInstance() - * - No comment + * - Disposes of the runtime instance. */ disposeInstance() { @@ -2532,9 +2494,21 @@ class Component extends R3Object { } + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + */ + updateFromInstance() { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + /** * getRuntime() - * - No comment + * - Gets the current runtime object */ getRuntime() { @@ -2625,10 +2599,6 @@ class Component extends R3Object { - Of the form x= - - Of the form x= - **/ class Project extends R3Object { @@ -2641,12 +2611,8 @@ class Project extends R3Object { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } } @@ -2712,7 +2678,7 @@ class Project extends R3Object { Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -2721,16 +2687,19 @@ class Project extends R3Object { Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -2754,10 +2723,6 @@ class Project extends R3Object { - Of the form x= - - Of the form x= - **/ class Image extends Component { @@ -2770,12 +2735,8 @@ class Image extends Component { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } } @@ -2841,7 +2802,7 @@ class Image extends Component { Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -2850,16 +2811,19 @@ class Image extends Component { Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -2883,10 +2847,6 @@ class Image extends Component { - Of the form x= - - Of the form x= - **/ class Input extends Component { @@ -2899,12 +2859,8 @@ class Input extends Component { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - this.emit(Event.INPUT_COMPONENT_INITIALIZED); } @@ -2971,7 +2927,7 @@ class Input extends Component { Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -2980,16 +2936,19 @@ class Input extends Component { Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -3031,10 +2990,6 @@ class Input extends Component { - Of the form x= - - Of the form x= - **/ class Touch extends Input { @@ -3047,12 +3002,8 @@ class Touch extends Input { super(options); - this.emit(Event.OBJECT_CREATED, this); - Object.assign(this, options); - this.emit(Event.OBJECT_INITIALIZED, this); - } } @@ -3082,7 +3033,6 @@ R3.Component.Input = Input; R3.Component.Touch = Touch; R3.Input = Input; R3.Input.Touch = Touch; -R3.Runtime = Runtime; console.log('r3.js - version ' + R3.version + ' compiled ' + R3.compileDate); diff --git a/package.json b/package.json index a93f483..e3892e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version" : "2.0.185", + "version" : "2.0.191", "description": "", "private": true, "dependencies": { diff --git a/src/r3/r3-component/r3-component.js b/src/r3/r3-component/r3-component.js index 073f0f5..6ec1e5a 100644 --- a/src/r3/r3-component/r3-component.js +++ b/src/r3/r3-component/r3-component.js @@ -65,7 +65,7 @@ const R3Object = require('.././r3-r3-object.js'); Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Static Properties: @@ -74,16 +74,19 @@ const R3Object = require('.././r3-r3-object.js'); Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Static Methods: @@ -91,12 +94,9 @@ const R3Object = require('.././r3-r3-object.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START - runtime=R3.Runtime.DEFAULT CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -107,10 +107,11 @@ const R3Object = require('.././r3-r3-object.js'); CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END CUSTOM_METHODS_START - createInstance() - dispose() - disposeInstance() - getRuntime() + createInstance() - Creates an instance of this object based on the current runtime + dispose() - Disposes of this object by disposing the instance first. + disposeInstance() - Disposes of the runtime instance. + updateFromInstance() - Updates this object by copying the values of its instance into the current object. + getRuntime() - Gets the current runtime object CUSTOM_METHODS_END CUSTOM_STATIC_METHODS_START @@ -129,12 +130,7 @@ class Component extends R3Object { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START - if (typeof options.runtime === 'undefined') { - options.runtime = R3.Runtime.DEFAULT; - } //GENERATED_OPTIONS_INIT_END //CUSTOM_OPTIONS_INIT_START @@ -145,8 +141,6 @@ class Component extends R3Object { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START this.emit(Event.COMPONENT_CREATED, this); //CUSTOM_AFTER_INIT_END @@ -157,7 +151,7 @@ class Component extends R3Object { /** * createInstance() - * - No comment + * - Creates an instance of this object based on the current runtime */ createInstance() { @@ -168,7 +162,6 @@ class Component extends R3Object { this, { //GENERATED_CREATE_INSTANCE_OPTIONS_START - 'runtime': this.runtime //GENERATED_CREATE_INSTANCE_OPTIONS_END } ) @@ -182,7 +175,7 @@ class Component extends R3Object { /** * dispose() - * - No comment + * - Disposes of this object by disposing the instance first. */ dispose() { @@ -206,7 +199,7 @@ class Component extends R3Object { /** * disposeInstance() - * - No comment + * - Disposes of the runtime instance. */ disposeInstance() { @@ -220,9 +213,30 @@ class Component extends R3Object { } + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + */ + updateFromInstance() { + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_START + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_START + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END + + } + /** * getRuntime() - * - No comment + * - Gets the current runtime object */ getRuntime() { diff --git a/src/r3/r3-component/r3-image.js b/src/r3/r3-component/r3-image.js index 300df46..341ffb9 100644 --- a/src/r3/r3-component/r3-image.js +++ b/src/r3/r3-component/r3-image.js @@ -65,7 +65,7 @@ const Component = require('.././r3-component.js'); Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -74,16 +74,19 @@ const Component = require('.././r3-component.js'); Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -109,11 +112,9 @@ const Component = require('.././r3-component.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -142,8 +143,6 @@ class Image extends Component { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -155,8 +154,6 @@ class Image extends Component { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-component/r3-input.js b/src/r3/r3-component/r3-input.js index 250bbe0..ef1828b 100644 --- a/src/r3/r3-component/r3-input.js +++ b/src/r3/r3-component/r3-input.js @@ -65,7 +65,7 @@ const Component = require('.././r3-component.js'); Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -74,16 +74,19 @@ const Component = require('.././r3-component.js'); Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -109,11 +112,9 @@ const Component = require('.././r3-component.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -142,8 +143,6 @@ class Input extends Component { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -155,8 +154,6 @@ class Input extends Component { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START this.emit(Event.INPUT_COMPONENT_INITIALIZED); //CUSTOM_AFTER_INIT_END diff --git a/src/r3/r3-component/r3-touch.js b/src/r3/r3-component/r3-touch.js index 32802a9..8c53fa5 100644 --- a/src/r3/r3-component/r3-touch.js +++ b/src/r3/r3-component/r3-touch.js @@ -65,7 +65,7 @@ const Input = require('.././r3-input.js'); Inherited Properties: - - runtime (Default value R3.Runtime.DEFAULT) + Inherited Static Properties: @@ -74,16 +74,19 @@ const Input = require('.././r3-input.js'); Inherited Methods: - createInstance() - No comment + Creates an instance of this object based on the current runtime - dispose() - No comment + Disposes of this object by disposing the instance first. - disposeInstance() - No comment + Disposes of the runtime instance. + + - updateFromInstance() + Updates this object by copying the values of its instance into the current object. - getRuntime() - No comment + Gets the current runtime object Inherited Static Methods: @@ -127,11 +130,9 @@ const Input = require('.././r3-input.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -160,8 +161,6 @@ class Touch extends Input { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -173,8 +172,6 @@ class Touch extends Input { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-event.js b/src/r3/r3-event.js index ae44e53..aa91681 100644 --- a/src/r3/r3-event.js +++ b/src/r3/r3-event.js @@ -45,8 +45,6 @@ class Event { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - Event.Emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } @@ -323,15 +321,16 @@ Event.MOUSE_MOVE = 0xd; Event.MOUSE_UP = 0xe; Event.MOUSE_WHEEL = 0xf; Event.OBJECT_CREATED = 0x10; -Event.OBJECT_INITIALIZED = 0x11; -Event.PAUSE = 0x12; -Event.RESTART = 0x13; -Event.START = 0x14; -Event.TOUCH_CANCEL = 0x15; -Event.TOUCH_END = 0x16; -Event.TOUCH_MOVE = 0x17; -Event.TOUCH_START = 0x18; -Event.MAX_EVENTS = 0x19; +Event.PAUSE = 0x11; +Event.RESTART = 0x12; +Event.START = 0x13; +Event.TOUCH_CANCEL = 0x14; +Event.TOUCH_END = 0x15; +Event.TOUCH_MOVE = 0x16; +Event.TOUCH_START = 0x17; +Event.UPDATE_FROM_INSTANCE_AFTER = 0x18; +Event.UPDATE_FROM_INSTANCE_BEFORE = 0x19; +Event.MAX_EVENTS = 0x1a; Event.GetEventName = function(eventId) { @@ -352,14 +351,15 @@ Event.GetEventName = function(eventId) { case 0xe : return 'mouse_up'; case 0xf : return 'mouse_wheel'; case 0x10 : return 'object_created'; - case 0x11 : return 'object_initialized'; - case 0x12 : return 'pause'; - case 0x13 : return 'restart'; - case 0x14 : return 'start'; - case 0x15 : return 'touch_cancel'; - case 0x16 : return 'touch_end'; - case 0x17 : return 'touch_move'; - case 0x18 : return 'touch_start'; + case 0x11 : return 'pause'; + case 0x12 : return 'restart'; + case 0x13 : return 'start'; + case 0x14 : return 'touch_cancel'; + case 0x15 : return 'touch_end'; + case 0x16 : return 'touch_move'; + case 0x17 : return 'touch_start'; + case 0x18 : return 'update_from_instance_after'; + case 0x19 : return 'update_from_instance_before'; default : throw new Error('Event type not defined : ' + eventId); } diff --git a/src/r3/r3-project.js b/src/r3/r3-project.js index 22e0553..664492b 100644 --- a/src/r3/r3-project.js +++ b/src/r3/r3-project.js @@ -81,11 +81,9 @@ const R3Object = require('./r3-r3-object.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -114,8 +112,6 @@ class Project extends R3Object { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -127,8 +123,6 @@ class Project extends R3Object { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-r3-object.js b/src/r3/r3-r3-object.js index 02c1547..6594e49 100644 --- a/src/r3/r3-r3-object.js +++ b/src/r3/r3-r3-object.js @@ -62,12 +62,10 @@ const Event = require('./r3-event.js'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START register=true CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END @@ -96,8 +94,6 @@ class R3Object extends Event { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START if (typeof options.register === 'undefined') { options.register = true; @@ -112,8 +108,6 @@ class R3Object extends Event { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-r3.js b/src/r3/r3-r3.js index 9631e3e..62535cb 100644 --- a/src/r3/r3-r3.js +++ b/src/r3/r3-r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '2.0.185'; - static compileDate = '2021 Sep 07 - 07:56:14 am'; + static version = '2.0.191'; + static compileDate = '2021 Sep 07 - 08:41:16 am'; } //GENERATED_IMPORTS_START diff --git a/src/r3/r3-runtime/index.js b/src/r3/r3-runtime/index.js new file mode 100644 index 0000000..3ec585c --- /dev/null +++ b/src/r3/r3-runtime/index.js @@ -0,0 +1,10 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//GENERATED_INDEX_BODY_START +//GENERATED_INDEX_BODY_END + +module.exports = { + //GENERATED_EXPORTS_START + //GENERATED_EXPORTS_END +} diff --git a/src/r3/r3-runtime/r3-runtime.js b/src/r3/r3-runtime/r3-runtime.js new file mode 100644 index 0000000..d354ff4 --- /dev/null +++ b/src/r3/r3-runtime/r3-runtime.js @@ -0,0 +1,70 @@ +const Utils = require('.././r3-utils'); +const Event = require('.././r3-event.js'); + +/** + + GENERATED_INHERITED_START + + GENERATED_INHERITED_END + + CUSTOM_OPTIONS_START + CUSTOM_OPTIONS_END + + CUSTOM_INSTANCE_OPTIONS_MAPPING_START + CUSTOM_INSTANCE_OPTIONS_MAPPING_END + + CUSTOM_LINKED_OBJECTS_START + CUSTOM_LINKED_OBJECTS_END + + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + CUSTOM_METHODS_START + CUSTOM_METHODS_END + + CUSTOM_STATIC_METHODS_START + CUSTOM_STATIC_METHODS_END + + **/ + +class Runtime extends Event { + + //GENERATED_CONSTRUCTOR_EXTENDS_START + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + //GENERATED_OPTIONS_INIT_START + //GENERATED_OPTIONS_INIT_END + + //CUSTOM_OPTIONS_INIT_START + //CUSTOM_OPTIONS_INIT_END + + Object.assign(this, options); + + //CUSTOM_BEFORE_INIT_START + //CUSTOM_BEFORE_INIT_END + + //CUSTOM_AFTER_INIT_START + //CUSTOM_AFTER_INIT_END + } + //GENERATED_CONSTRUCTOR_EXTENDS_END + + //GENERATED_METHODS_START + //GENERATED_METHODS_END + + //GENERATED_STATIC_METHODS_START + //GENERATED_STATIC_METHODS_END + + //CUSTOM_IMPLEMENTATION_START + //CUSTOM_IMPLEMENTATION_END +} + +//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START +//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END + +module.exports = Runtime; diff --git a/src/r3/r3-system/r3-system-input.js b/src/r3/r3-system/r3-system-input.js index 5d6a94e..f3200ae 100644 --- a/src/r3/r3-system/r3-system-input.js +++ b/src/r3/r3-system/r3-system-input.js @@ -100,8 +100,6 @@ class SystemInput extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -113,8 +111,6 @@ class SystemInput extends System { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-system/r3-system-linking.js b/src/r3/r3-system/r3-system-linking.js index 71d463a..d37a4ac 100644 --- a/src/r3/r3-system/r3-system-linking.js +++ b/src/r3/r3-system/r3-system-linking.js @@ -92,8 +92,6 @@ class SystemLinking extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -105,8 +103,6 @@ class SystemLinking extends System { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-system/r3-system-socket.js b/src/r3/r3-system/r3-system-socket.js index 99dfa93..a9903b9 100644 --- a/src/r3/r3-system/r3-system-socket.js +++ b/src/r3/r3-system/r3-system-socket.js @@ -90,8 +90,6 @@ class SystemSocket extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -103,8 +101,6 @@ class SystemSocket extends System { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-system/r3-system-test.js b/src/r3/r3-system/r3-system-test.js index 1f8bf30..c32f554 100644 --- a/src/r3/r3-system/r3-system-test.js +++ b/src/r3/r3-system/r3-system-test.js @@ -90,8 +90,6 @@ class SystemTest extends System { super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -103,8 +101,6 @@ class SystemTest extends System { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-system/r3-system.js b/src/r3/r3-system/r3-system.js index 1068a6a..706ee81 100644 --- a/src/r3/r3-system/r3-system.js +++ b/src/r3/r3-system/r3-system.js @@ -55,8 +55,6 @@ class System { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - Event.Emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/r3/r3-utils.js b/src/r3/r3-utils.js index 9ffe003..cfb42ad 100644 --- a/src/r3/r3-utils.js +++ b/src/r3/r3-utils.js @@ -39,8 +39,6 @@ class Utils { //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - Event.Emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } diff --git a/src/templates/constructor.template b/src/templates/constructor.template index 78197a3..60deb05 100644 --- a/src/templates/constructor.template +++ b/src/templates/constructor.template @@ -17,8 +17,6 @@ //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - Event.Emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } \ No newline at end of file diff --git a/src/templates/constructor_extends.template b/src/templates/constructor_extends.template index 4572489..e2ab17d 100644 --- a/src/templates/constructor_extends.template +++ b/src/templates/constructor_extends.template @@ -6,8 +6,6 @@ super(options); - this.emit(Event.OBJECT_CREATED, this); - //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END @@ -19,8 +17,6 @@ //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END - this.emit(Event.OBJECT_INITIALIZED, this); - //CUSTOM_AFTER_INIT_START //CUSTOM_AFTER_INIT_END } \ No newline at end of file diff --git a/src/templates/extends.template b/src/templates/extends.template index e0b86a0..dea1740 100644 --- a/src/templates/extends.template +++ b/src/templates/extends.template @@ -8,11 +8,9 @@ const EXTEND_CLASS = require('INCLUDE_PATH/EXTEND_CLASS_FILE_NAME'); GENERATED_INHERITED_END - Of the form x= CUSTOM_OPTIONS_START CUSTOM_OPTIONS_END - Of the form x= CUSTOM_INSTANCE_OPTIONS_MAPPING_START CUSTOM_INSTANCE_OPTIONS_MAPPING_END diff --git a/src/templates/token.db b/src/templates/token.db index 9fb7069..ee6a233 100644 --- a/src/templates/token.db +++ b/src/templates/token.db @@ -46,6 +46,7 @@ GENERATED_STATIC_STOP_METHOD GENERATED_STATIC_SUBSCRIBE_METHOD GENERATED_STOP_METHOD GENERATED_SUBSCRIBE_METHOD +GENERATED_UPDATE_FROM_INSTANCE_METHOD GENERATED_UPDATE_FROM_INSTANCE_OPTIONS GENERATED_UPDATE_INSTANCE_OPTIONS CUSTOM_AFTER_INIT @@ -95,3 +96,4 @@ CUSTOM_STATIC_STOP_METHOD CUSTOM_STATIC_SUBSCRIBE_METHOD CUSTOM_STOP_METHOD CUSTOM_SUBSCRIBE_METHOD +CUSTOM_UPDATE_FROM_INSTANCE_METHOD diff --git a/version b/version index fb003ae..28a5868 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.185 \ No newline at end of file +2.0.191 \ No newline at end of file