Override the equals() method in GeoDataContainer. Have it iterate over m_vector and check each feature for equality by downcasting it to possible children based on the nodeType(). Possible children are GeoDataDocument, GeoDataFolder, GeoDataNetworkLinkControl, GeoDataNetworkLink, GeoDataGroundOverlay, GeoDataPhotoOverlay, GeoDataScreenOverlay, GeoDataPlacemark and GeoDataTour, see http://api.kde.org/4.x-api/kdeedu-apidocs/marble/html/classMarble_1_1GeoDataFeature.html Add operator== and operator!= to GeoDataFolder and GeoDataDocument. For GeoDataFolder it only needs to return the result of equals() of its parent GeoDataContainer. For GeoDataDocument additionally the other members need to be checked. Extend TestEquality for new unit test methods for GeoDataFolder (no need for a GeoDataDocument unit test in this task). Make sure to compile Marble with the BUILD_MARBLE_TESTS=TRUE option enabled and run the test case from the build folder (run tests/TestEquality). Submit a review request at https://git.reviewboard.kde.org. Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
Since I finished working on the last two tasks for equality operators in container classes, I would like to continue working on this task if everyone is ok with that. I have a good amount of free time these days and a great programming mood :).
I say yes on behalf of everyone :-)
Git commit 62a88c28a70478196ad8600cf28200d0dc7d3f2a by Cruceru Calin-Cristian. Committed on 06/05/2014 at 18:24. Pushed by crucerucalincristian into branch 'master'. Equality operators for Container, Folder and Document REVIEW: 118010 M +102 -0 src/lib/marble/geodata/data/GeoDataContainer.cpp M +3 -0 src/lib/marble/geodata/data/GeoDataContainer.h M +18 -0 src/lib/marble/geodata/data/GeoDataDocument.cpp M +3 -0 src/lib/marble/geodata/data/GeoDataDocument.h M +10 -0 src/lib/marble/geodata/data/GeoDataFolder.cpp M +3 -0 src/lib/marble/geodata/data/GeoDataFolder.h M +1 -1 src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp M +75 -0 tests/TestEquality.cpp http://commits.kde.org/marble/62a88c28a70478196ad8600cf28200d0dc7d3f2a