Bgplay Class
This is the Facade of the model layer. It manages all the collections of objects of the model layer and all the parameters needed to describe the domain.
Item Index
Methods
addNode
(
-
An
Adds a node to the model.
Parameters:
-
An
Objectinstance of Node
addSource
(
-
An
Adds a source to the model.
Parameters:
-
An
Objectinstance of Source
addTarget
(
-
An
Adds a target to the model.
Parameters:
-
An
Objectinstance of Target
getNode
(
Object
-
An
Returns a node given an ID
Parameters:
-
An
StringID of a node
Returns:
Object:
The node with that ID
getSource
(
Object
-
An
Returns a source given an ID
Parameters:
-
An
StringID for a source
Returns:
Object:
The source with that ID
getTarget
(
Object
-
An
Returns a target given an ID
Parameters:
-
An
StringID for a target
Returns:
Object:
The target with that ID
setCurInstant
(
-
An
-
If
Set a new current instant. It is an additional level of indirection compared to the native Backbone's set method.
Parameters:
-
An
Objectinstance of Instant
-
If
Booleantrue a "change" event will be triggered
updateState
()
Forces the update of the model.
validate
(
Array
-
A
The validation method of Bgplay. This method is used to check the initialization parameters.
Parameters:
-
A
Mapmap of parameters
Returns:
Array:
An array of {String} errors