Skip to content
  • T.J. Corona's avatar
    Refactor operators. · dc574a3e
    T.J. Corona authored
    This commit contains many changes made by Haocheng, David and myself.
    It performs the following:
    
    a) move operators out of model and have them operate indpendently from
       model sessions
    b) operators now each have their own attribute collection, rather than being
       represented as single attributes from an attribute collection
    c) Separate XML descriptions from the base operator, loosening the requirement
       on operators to simply have a descriptive attribute (XML descriptions are
       now supported as a subclass of the base operator). This facilitates the
       construction of python operators without requiring an XML string describing
       their inputs
    c) introduce an operation manager that tracks the availability of operators.
       It has the following properties:
       i.   Registration of operators via a unique name (usually the c++ name of
            the operator)
       ii.  Provide a connection to a resource manager so that operations that
            construct resources will automatically register the new resources to
            the manager
       iii. Provide a list of available operators given an input selection (i.e.
            show which operators accept a given input)
    d) allow read/write locks on operations' input resources and add tests for
       asynchronous operations
    e) break static registration of operations and resources into a set of
       libraries that accompany the libraries in which they are defined. A library
       that provides static registration of a resource and associated operations
       for library smtkFoo is called smtkFooEnvironment, and the registration
       occurs in the foo::environment namespace
    f) deprecate the exodus session
    g) convert smtk::model and polygon, mesh and discrete sessions to use
       nlohmann::json instead of cJSON. With this change, we can hopefully remove
       cJSON from smtk
    h) provide operations for creating, loading and saving smtk resources
    i) update tests to use the new operation framework
    
    This merge is a work in progress, but has become too large to avoid merging
    into the msater branch. The outstanding issues are
    
    a) remove smtk::model::Operation from smtk (it is still required for the qt
       bindings)
    b) rename smtk::operation::NewOp smtk::operation::Operator
    c) fix Qt bindings to use the new operation infrastructure
    d) fix the infrastructure for meshing interop with remus to avoid using json
       fragments
    e) remove cJSON from smtk
    f) switch resources' read/write/create methods from bare functors to smtk
       operators. This is more in keeping with the pattern of using operators to
       affect resources
    g) enable CGM session
    h) enable matplotlib extension
    dc574a3e