Create a new Circuit Project.
An array of ciruits to initially create this project with. Note that circuits can be added by calling addCircuit.
Add a new circuit to this project. This will cause the project to re-index itself, allowing thte circuit to be identified by name and ID.
The circuit to add to this project.
Attach a logger to this loggable object so that messages logged with log will be send to this logger. Note that this can be called multiple times and multiple loggers can be attached to the same object. Log messages will be sent to all attached loggers.
The logger to attach to this object.
Detach a logger from this loggable object so that messages logged with log will no longer be sent to it. If the logger is not attached, nothing happens.
The logger to detach from this object.
Get a reference to a circuit by the internal ID used in the data file it was loaded from.
The ID of the circuit to fetch.
A reference to the circuit.
Get a reference to a circuit by name.
The name of the circuit to fetch.
A reference to the circuit.
Get all of the ciruits in this project, making no consideration for which circuits are subcircuits or parent circuits.
An array of all the circuits in this project.
Everything that is loggable gets a unique ID, which can help identify instances of objects in logs when many such instances exist. This ID is normally generated automatically by CircuitLoggable when it is instantiated, unless this method has been by child classes.
A unique ID among all loggable objects.
Protected
logLog a message, sending it to all loggers associated with this loggable.
The log level to log the message at.
The message to log.
Optional
data: anyAny additional data to associate with the message.
Propagate all registered loggers (present and future) to the given loggable. This function will register the loggable object with the object it is being called on, establishing a parent-child relationship where all changes to the parent loggers will be propagated to the children.
The loggable object to attach all registered loggers to.
A Circuit Project is a collection of circuits which may or may not be interdependent on one onother. Projects may consist of a circuit and all of its subcircuits, or a collection of totally unrelated circuits.
"Projects" are a concept which came from CircuitVerse, where a project is a file, and ciruits are tabs in the CircuitVerse UI when the file is loaded.
This class will probably not be instantiated manually in end-user code; rather, the project loader (see loadProject and CircuitLoader) will parse circuit data and generate a project which compiles any circuits contained within that data.
This class is simply a data class for managing circuits, it does not perform any logic of its own. The most commonly used methods will probably be getCircuitById and getCircuitByName, as these allow you to fetch circuits and then actually execute them.
Not all CircuitLoaders may support fetching a circuit by name. In those cases, you will have to fetch circuits by ID or by index in the array returned by getCircuits, which will return circuits in the same order for the same file.
Author
Jordan Bancino