Hi all,
Above changes are available in trunk now :)
Below you have some hints about using new features: - ObjectSet is a new class, which is a base for Selection and it doesn't have any limits of instances number. Its behaviour is almost the same like Selection before, so if you want to use it, just create new object. - Some functions like itemList() or reprList() are removed. There are new functions like objects(), items(), xmlNodes() returning ranges instead vectors (no need to copy pointers, lazy using) - SPObject has new children list. For example, if you want to iterate it, just type "for(auto& child: object->children)" - Tests are split into separate executables to know which test failed after "make test"
All changes are introduced in revision 15047.
Best regards, Adrian
On 29 July 2016 at 12:38, Adrian Boguszewski <adrbogus1@...3350...> wrote:
Hi all,
I've already finished my GSoC task, which is "P5. Better data structure for selections". In details I've done:
- created ObjectSet class to be a base class for Selection - ObjectSet has
a multi_index_container from Boost (http://www.boost.org/doc/ libs/1_61_0/libs/multi_index/doc/tutorial/basics.html) instead many containers like vectors, lists and sets
- created appropiate tests for this class in GoogleTest framework
- replaced some functions returning vector to return range (
http://www.boost.org/doc/libs/1_61_0/libs/range/doc/ html/range/reference/adaptors/introduction.html)
- replaced own children list implementation from SPObject with boost
intrusive list
- added tests for new children list
- replaced parameters in some functions (Selection with ObjectSet)
- improved spray tool (there is no need to use selection now)
Changes are ready and exist on my branch (https://code.launchpad.net/~ adrianboguszewski/inkscape/adrian). They will by merged to trunk in the near future. I'm waiting for c++11 flag :)
As I still have about three weeks till GSoC end, I decided to start another project, which is new SAX parser.
Best regards, Adrian