SMTK 24.01 Release Notes

See also SMTK 23.04 Release Notes for previous changes.

API-Breaking Changes

We have been forced to remove smtk::task::Adaptor::reconfigureTask() which has been replaced by smtk::task::Adaptor::updateDownstreamTask(State upstreamPrev, State upstreamNext) and is a pure virtual method that must be overridden. Normally we would have deprecated the method but the issue is that derived classes may have overridden reconfigureTask and it would have been difficult to indicate these methods needed to be replaced. By removing this virtual method, the compiler will now see these overridden methods as errors.

SMTK Changes to Graph Resource

Run-time Arcs

Graph resources now support the run-time creation of arc types. This is implemented by making the smtk::graph::ArcImplementation template inherit and implement a pure virtual smtk::graph::ArcImplementationBase class. Arc types may be created via a new smtk::graph::CreateArcType operation and arcs of any type may be created via the smtk::graph::CreateArc operation.

See the Qt documentation for user-interface elements that support arc creation and deletion.

Graph arc storage

In order to support run-time arc types, the smtk::graph::ArcMap class no longer inherits smtk::common::TypeContainer. Instead, it owns an unordered map from string tokens to shared pointers to smtk::graph::ArcImplementationBase. The smtk::graph::ArcImplementation template inherits this base type in order to provide virtual-method access to arcs (in addition to the high speed interface unique to the arc traits object).

Finding Corresponding Nodes Along an Arc

The graph resource now includes a function, findArcCorrespondences(), that takes in an arc type (as a template parameter), a pair of nodes (say n1 and n2), and a lambda that can compare nodes via the arc (one to n1 and the other attached to n2). The function then returns pairs of nodes attached to n1 and n2, respectively. If no correspondence for a node is found, then a null pointer is stored in one entry of the pair.

Query Grammar

The graph-resource query grammar has been extended to allow “bare” component type-names.

For example, if your filter-query was 'SomeNodeType' [string{'name'='foo'}], it is now also legal to write SomeNodeType [string{'name'='foo'}] (i.e., no single-quotes required around the node’s type-name). This simplifies some upcoming changes for run-time arcs. Single-quoted component names imply an exact match to the object type, while bare type-names also match derived objects. For example, if class B inherits A, then a filter-query 'A' will only match instances of A and not B while A will match instances of B as well.

This testing of derived types is accomplished by checking whether a query-filter token is present in a std::unordered_set<smtk::string::Token> computed once at run-time, so it is efficient.