Class AbstractControlActor

    • Field Detail

      • m_Compatibility

        protected Compatibility m_Compatibility
        the compatibility class in use.
      • m_PauseStateManager

        protected PauseStateManager m_PauseStateManager
        the pause state manager.
      • m_SetUpSubActors

        protected boolean m_SetUpSubActors
        whether the sub-actors were set up.
    • Constructor Detail

      • AbstractControlActor

        public AbstractControlActor()
    • Method Detail

      • reset

        protected void reset()
        Resets the actor.
        Overrides:
        reset in class AbstractActor
      • setParent

        public void setParent​(Actor value)
        Sets the parent of this actor, e.g., the group it belongs to.
        Specified by:
        setParent in interface Actor
        Overrides:
        setParent in class AbstractActor
        Parameters:
        value - the new parent
      • forceVariables

        protected void forceVariables​(Variables value)
        Updates the Variables instance in use.

        Use with caution!
        Overrides:
        forceVariables in class AbstractActor
        Parameters:
        value - the instance to use
      • getActorHandlerInfo

        public abstract ActorHandlerInfo getActorHandlerInfo()
        Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.
        Specified by:
        getActorHandlerInfo in interface ActorHandler
        Returns:
        the info
      • size

        public abstract int size()
        Returns the size of the group.
        Specified by:
        size in interface ActorHandler
        Returns:
        the size
      • active

        public int active()
        Returns the number of non-skipped actors.
        Returns:
        the 'active' actors
      • firstActive

        public Actor firstActive()
        Returns the first non-skipped actor.
        Specified by:
        firstActive in interface ActorHandler
        Returns:
        the first 'active' actor, null if none available
      • lastActive

        public Actor lastActive()
        Returns the last non-skipped actor.
        Specified by:
        lastActive in interface ActorHandler
        Returns:
        the last 'active' actor, null if none available
      • firstInputConsumer

        public Actor firstInputConsumer()
        Returns the first non-skipped InputConsumer.
        Returns:
        the first 'active' InputConsumer, null if none available
      • get

        public abstract Actor get​(int index)
        Returns the actor at the given position.
        Specified by:
        get in interface ActorHandler
        Parameters:
        index - the position
        Returns:
        the actor
      • set

        public abstract String set​(int index,
                                   Actor actor)
        Sets the actor at the given position.
        Specified by:
        set in interface ActorHandler
        Parameters:
        index - the position
        actor - the actor to set at this position
        Returns:
        null if successful, otherwise error message
      • indexOf

        public abstract int indexOf​(String actor)
        Returns the index of the actor.
        Specified by:
        indexOf in interface ActorHandler
        Parameters:
        actor - the name of the actor to look for
        Returns:
        the index of -1 if not found
      • updateParent

        protected void updateParent()
        Updates the parent of all actors in this group.
      • canInspectOptions

        public boolean canInspectOptions​(Class cls)
        Checks whether the class' options can be inspected. By default, arrays of actors (i.e., the control actor's sub-actors) won't be inspected, as they do it themselves.
        Specified by:
        canInspectOptions in interface VariablesInspectionHandler
        Overrides:
        canInspectOptions in class AbstractActor
        Parameters:
        cls - the class to check
        Returns:
        true if it can be inspected, false otherwise
      • setUpSubActors

        protected String setUpSubActors()
        Performs the setUp of the sub-actors.
        Returns:
        null if everything is fine, otherwise error message
      • check

        public String check()
        Performs checks on the "sub-actors". Default implementation does nothing.
        Specified by:
        check in interface ActorHandler
        Returns:
        null
      • pauseExecution

        public void pauseExecution()
        Pauses the execution.
        Specified by:
        pauseExecution in interface Pausable
      • isPaused

        public boolean isPaused()
        Returns whether the object is currently paused.
        Specified by:
        isPaused in interface Pausable
        Returns:
        true if object is paused
      • resumeExecution

        public void resumeExecution()
        Resumes the execution.
        Specified by:
        resumeExecution in interface Pausable
      • wrapUpSubFlow

        public void wrapUpSubFlow()
        Wraps up the sub-actors, freeing up memory.
        Specified by:
        wrapUpSubFlow in interface SubFlowWrapUp
      • isSubFlowWrappedUp

        public boolean isSubFlowWrappedUp()
        Checks whether the sub-flow has been wrapped up.
        Specified by:
        isSubFlowWrappedUp in interface SubFlowWrapUp
        Returns:
        true if sub-flow was wrapped up