diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-19 12:20:59 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-19 15:02:57 +0000 |
commit | bfc7f380a0867044a1642181f2dc002ab88376c9 (patch) | |
tree | bf4f93f4e52acc103f29d04e49d06bf9875f83dd /build_scripts/utils.py | |
parent | 99bfe460b85ccb3562e10f12972852233870e649 (diff) |
libshikoken: Refactor the Visitor class hierarchy
Implementing the deleteInMainThread feature requires being able to
collect a list of destructors and potentially storing it. This
requires splitting out the actual deallocation/destructor calls from
the DtorCallerVisitor and DeallocVisitor classes.
Since this is the only use of the virtual HierarchyVisitor::done()
method (and it does not really belong to the visitor pattern), remove
it.
Change the void visit() method into a bool from which true can be
returned to terminate. The finish()/wasFinished() methods can then
also be removed from HierarchyVisitor and the code simplified
accordingly.
Replace the DtorCallerVisitor and DeallocVisitor classes
by DtorAccumulatorVisitor that collects a list of DestructorEntry
structs containing destructor function and C++ instance.
Polish the code a bit, use member initialization, add override, move
implementations to source and some spacing for clarity.
Task-number: PYSIDE-810
Change-Id: I5e3ef6df753679ec111a5f0d1b75305bd5cf1c0c
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/utils.py')
0 files changed, 0 insertions, 0 deletions