Skip to content

refactor sample builder

m.puchner requested to merge RefactorSampleBuilder into develop

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.

Edited by m.puchner

Merge request reports

Loading