Private
currentThe level of the currently running Phase
in the Tree (note that such phase is not actually in the Tree while it is running)
Private
deferredTrue if a "deferred" level exists
Private
levelsStorage for all levels in the tree. This is a simple array because only one Phase may have "children" at a time.
Private
addAdds a Phase
after the first occurence of the given type, or to the top of the Tree if no such phase exists
The Phase
to be added
A PhaseString
representing the type to search for
Clears the Tree
If true
, leaves the top level of the tree intact
The parameter on this method exists because PhaseManager.clearPhaseQueue
previously (probably by mistake) ignored phaseQueuePrepend
.
This is (probably by mistake) relied upon by certain ME functions.
Determines if a particular phase exists in the Tree
The type
of phase to search for
Optional
phaseFilter: PhaseConditionFunc<P>A PhaseConditionFunc
to specify conditions for the phase
Whether a matching phase exists
Finds a particular Phase
in the Tree by searching in pop order
The type
of phase to search for
Optional
phaseFilter: PhaseConditionFunc<P>A PhaseConditionFunc
to specify conditions for the phase
The matching Phase
, or undefined
if none exists
Finds a particular Phase
in the Tree by searching in pop order
The type
of phase to search for
Optional
phaseFilter: PhaseConditionFunc<P>A PhaseConditionFunc
to specify conditions for the phase
The matching Phase
, or undefined
if none exists
Finds and removes a single Phase
from the Tree
The type
of phase to search for
Optional
phaseFilter: PhaseConditionFunc<P>A PhaseConditionFunc
to specify conditions for the phase
Whether a removal occurred
Removes all occurrences of Phase
s of the given type
The type
of phase to search for
The PhaseTree is the central storage location for
Phase
s by thePhaseManager
.It has a tiered structure, where unshifted phases are added one level above the currently running Phase. Phases are generally popped from the Tree in FIFO order.
Dynamically ordered phases are queued into the Tree only as
Marker
s and as such are not guaranteed to run FIFO (otherwise, they would not be dynamic)