ENH: Improving Performance for Large Phrase Models
Deprecated Old Style Visitor Signature
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The deprecated signature returned a boolean. The support form now returns a smtk::common::Visit Enum.
.. code-block:: c++
// Deprecated Form
using SourceVisitor = std::function<bool(
const smtk::resource::ManagerPtr&,
const smtk::operation::ManagerPtr&,
const smtk::view::ManagerPtr&,
const smtk::view::SelectionPtr&)>;
// New Form
using SourceVisitorFunction = std::function<smtk::common::Visit(
const smtk::resource::ManagerPtr&,
const smtk::operation::ManagerPtr&,
const smtk::view::ManagerPtr&,
const smtk::view::SelectionPtr&)>;
Added Map to find Descriptive Phrase by Persistent Object
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PhraseModel now maintains a map a Persistent Object's UUIDs to a set of
Descriptive Phrases that contains that Persistent Object. PhraseModel::trigger method now maintains the map
on Persistent Object insertion or removal.
The method PhraseModel::uuidPhraseMap returns the map.
Also added a protected method PhraseModel::removeFromMap to remove Descriptive Phrases from the map.
TriggerDataChanged Emits 1 Trigger
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Previously, this method would result in a trigger per Phrase in the model. Now it will only trigger for the root of the model.
DescriptivePhrase Changes