Interface Engine

All Superinterfaces:
AttributeObject, NamedObject
All Known Implementing Classes:
DrawingEngine, MeshEngine, MorphDrawEngine, NeuroMeshEngine, ShapeEngine, VolumeEngine

public interface Engine
extends AttributeObject
Interface for all "engine" classes; i.e., instantiable classes which hold attributes and do work. An engine is specified by a set of "operations". Each operation can be implemented by a set of "methods". The combination of operation & method specifies what computation will be performed.

Each operation/method is fully specified by a corresponding AttributeList, which must be set prior to calling that method.

Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Method Summary

    Modifier and Type Method Description
    boolean callMethod​(java.lang.String operation, java.lang.String method, java.util.ArrayList<?> params, ProgressUpdater progress)
    Calls the specified operation/method pair.
    boolean callMethod​(java.lang.String operation, java.lang.String method, ProgressUpdater progress)
    Calls the specified operation/method pair.
    AttributeList getAttributes​(java.lang.String operation, java.lang.String method)
    Returns the attributes list corresponding to the operation and method.
    java.util.ArrayList<java.lang.String> getMethods​(java.lang.String operation)
    Returns a list of methods implementing a particular operation.
    java.util.ArrayList<java.lang.String> getOperations()
    Returns a list of the operations available for this Engine.

    Methods inherited from interface mgui.interfaces.attributes.AttributeObject

    getAttribute, getAttributes, getAttributeValue, setAttribute, setAttributes

    Methods inherited from interface mgui.interfaces.NamedObject

    getName, setName
  • Method Details

    • getOperations

      java.util.ArrayList<java.lang.String> getOperations()
      Returns a list of the operations available for this Engine. Operations signify a general operation, which can be implemented through any number of "methods".
      Returns:
    • getMethods

      java.util.ArrayList<java.lang.String> getMethods​(java.lang.String operation)
      Returns a list of methods implementing a particular operation.
      Parameters:
      operation -
      Returns:
    • callMethod

      boolean callMethod​(java.lang.String operation, java.lang.String method, ProgressUpdater progress)
      Calls the specified operation/method pair. Returns true if the operation was successful.
      Parameters:
      operation - Operation to perform.
      method - Method with which to perform operation. Can be null if this operation has no sub-methods
      progress - Optional progress updater (can be null)
      Returns:
    • callMethod

      boolean callMethod​(java.lang.String operation, java.lang.String method, java.util.ArrayList<?> params, ProgressUpdater progress)
      Calls the specified operation/method pair. Returns true if the operation was successful.
      Parameters:
      operation - Operation to perform.
      method - Method with which to perform operation. Can be null if this operation has no sub-methods
      params - A list of additional parameters (not in the attributes) for this method
      progress - Optional progress updater (can be null)
      Returns:
    • getAttributes

      AttributeList getAttributes​(java.lang.String operation, java.lang.String method)
      Returns the attributes list corresponding to the operation and method.
      Parameters:
      key -
      Returns:
      The corresponding attributes, or null if no such combination of operation/ method exists.