refactor sample builder
To further remove SessionItem/-Model from sample model, the over-generic GUIDomainSampleVisitor
had to be replaced by a builder which uses the actual types and traverses the known sample structure. This eliminates level-counting, stepping up and down in leveled hierarchy to find anonymous pointers and so on. Nearly no SessionModel
usage is necessary in the new class GUISampleBuilder
. To my eyes it is also much clearer now what is happening when building the GUI sample from a domain sample.
Note: GUIDomainSampleVisitor
was the last implementation of INodeVisitor
. Therefore as a side effect, INodeVisitor
seems to be obsolete (and also the INode::accept()
method). However, INodeVisitor
is part of swig and therefore part of the Python API, so I am not sure whether it is really obsolete.