ProcedureCoordinator

@objcMembers public class ProcedureCoordinator: NSObject

Coordinates the logic of all procedure blocks inside a WorkbenchViewController.

  • Block name for the procedure definition with no return value

    Declaration

    Swift

    public static let BLOCK_DEFINITION_NO_RETURN = "procedures_defnoreturn"
  • Block name for the procedure definition with a return value

    Declaration

    Swift

    public static let BLOCK_DEFINITION_RETURN = "procedures_defreturn"
  • Block name for the procedure caller with no return value

    Declaration

    Swift

    public static let BLOCK_CALLER_NO_RETURN = "procedures_callnoreturn"
  • Block name for the procedure caller with a return value

    Declaration

    Swift

    public static let BLOCK_CALLER_RETURN = "procedures_callreturn"
  • Block name for the if-return block.

    Declaration

    Swift

    public static let BLOCK_IF_RETURN = "procedures_ifreturn"
  • The workbench that this coordinator is synchronized with

    Declaration

    Swift

    public private(set) weak var workbench: WorkbenchViewController?
  • Synchronizes this coordinator with a workbench so that all procedure definition/caller blocks in the main workspace are in a proper state.

    Here are some examples of what can be defined as a proper state:

  • Each procedure definition block in the workspace is unique.
  • All procedure definition blocks defined in the workspace must have an associated caller block in the toolbox.
  • No procedure caller block exists in the workspace without an associated definition block.
  • All parameters used in procedure definition blocks are created as variables inside workbench.variableNameManager.

  • Note

    workbench must have its toolbox and workspace loaded, or else this method does nothing but assign workbench to self.workbench.

    Declaration

    Swift

    public func syncWithWorkbench(_ workbench: WorkbenchViewController?)