[Smtk-developers] Heads up

David Thompson david.thompson at kitware.com
Thu Nov 30 11:03:57 EST 2017


Hi all,

I've just merged some changes to SMTK that might be of interest. Notably,

+ Adds an abstract PhraseModel class and a concrete ResourcePhraseModel class.
  A PhraseModel owns a DescriptivePhrase hierarchy and the SubphraseGenerator
  instances attached to it. The PhraseModel class maintains the hierarchy as
  operations and selections are performed by users.
  A PhraseModel may be configured by an smtk::view::View instance.
  PhraseModel provides some methods for its children to override that
  make managing the hierarchy much simpler. In particular, you may call
  updateChildren() on the phrase model and it will call observers (such as
  the new qtDescriptivePhraseModel) with a sequence of insert/remove/move changes
  that will update the GUI.
+ Adds a JSON deserialization for smtk::view::View and test that it matches
  the equivalent XML description.
+ Adds an observe() method to resource manager.
  Now it is possible to get notified when a resource is added/removed.
  Note that the notification comes *after* the operation that reads the
  resource has completed, so if you are observing the operation manager and
  the resource manager, you may be surprised at the order in which your
  listeners are called.
+ Both resources and resource managers are tracked with instances of pqProxy subclasses.
+ Adds a ParaView plugin panel that presents resources in a model-tree view.
  This has a bug currently where each resource is presented twice, but I'll fix
  that shortly.
+ Minimal registration of the model manager and attribute collection to the
  resource manager (no read/write/create methods are supplied) so that the
  resource manager can hold these resources.
+ Adds a DescriptivePhrase::visitChildren() method for traversing a phrase
  hierarchy.
+ Fixes issues with operator result creation.
  Model operators still need to use their Session's attribute collection to
  create the result while the new-style operators should use the operator
  manager. This will change again when the new operation manager is
  modified to use an attribute collection per operator rather than a single
  instance for the manager.
+ Implement more of ComponentItemDefinition and partially implement XML
  I/O of attributes with ComponentItems. (The associated components of an
  attribute are still not synchronized/serialized/deserialized, but child
  items of the attribute should be.)
+ Provides some model-operator-specific code to copy result
  summary items from ModelEntityItems to ComponentItems with
  similar names (now also defined in Session.cxx).
  In the long term, ModelEntityItem should disappear.
+ Makes Resource store a weak pointer to its manager,
  not a raw pointer. Since the manager may not hold the
  only shared pointer to a resource, the resource may outlive
  its manager and should still behave.

I tested CMB's ModelBuilder against this before merging and all but the usual suspects passed, so we should be OK bumping CMB to use these changes.

	David


More information about the Smtk-developers mailing list