Composer Core
Provide a manager capable of generate classes by composing different mixins.
Each composer can be defined as a normal class which provide public methods and getter and setter for their public properties.
Memory access
All the composers can store their data using the internal memory manager.
Composermemory;
Please, have a look at the manager documentation to learn how to use it.
create
and destroy
Each composer can expose a static create
method that is executed when the object is initialised, and a static destroy
method that is executed when the object is disposed. You can use it to clean up memory for each specific composer.
Quick example
; // Create a test composer static { data"test" = "testString"; } { return Composermemory; } // Create another composer... a little bit more useful... static { datalisteners = {}; } { const listeners = Composermemory; if !listenersname listenersname = ; listenersname; } { const listeners = Composermemory; if listenersname const index = listenersname; if index >= 0 listenersname; } { const listeners = Composermemory; if listenersevent for let callback of listenersevent ; } // Create a class composing the one just createdconst BaseClass = Composer; // You can then use it to create objects or extend it to create more complex classes.const obj = ; console; // "testString" obj;obj; // "2C3EDAC0-5764-421B-9EDF-0B953FA9C311"