Bug 331671 - Equality operator for GeoDataTour and related classes
Summary: Equality operator for GeoDataTour and related classes
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.7 (KDE 4.12)
Platform: unspecified Linux
: NOR task
Target Milestone: ---
Assignee: Sanjiban Bairagya
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-03-02 07:38 UTC by Dennis Nienhüser
Modified: 2014-03-02 19:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2014-03-02 07:38:49 UTC
Make it possible to check for equality of GeoDataTour instances
- Add operator== to GeoDataAnimatedUpdate, GeoDataSoundCue, GeoDataTourControl and GeoDataWait
- Add operator== to GeoDataPlaylist. Return false if the size() of the playlists differ. Otherwise iterate over all primitives and do the following: If the nodeType of two primitives with the same index differs, return false. Otherwise cast it to the respective GeoData* class (GeoDataAnimatedUpdate, GeoDataFlyTo, GeoDataSoundCue, GeoDataTourControl or GeoDataWait) and check their equality using their operator==.
- Add operator== to GeoDataTour, which checks if the playlists of two Tours are equal

If bug 331666 is done by the time you work on this, integrate the equals() method of GeoDataObject into the operator== implementations.

Make sure to compile Marble with the following cmake options enabled: BUILD_MARBLE_TESTS=TRUE, BUILD_MARBLE_TOOLS=TRUE. Execute tests/TestEquality and make sure no errors come up. Use tools/kml2kml to analyze errors and fix the tag writers, if needed. Submit a review request at https://git.reviewboard.kde.org with the marble group as reviewers.

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.
Comment 1 Sanjiban Bairagya 2014-03-02 08:16:23 UTC
I want to work on this task
Comment 2 Dennis Nienhüser 2014-03-02 19:02:52 UTC
Git commit 1d270395757c852ace9348b8a20af327627789c3 by Dennis Nienhüser.
Committed on 02/03/2014 at 19:02.
Pushed by nienhueser into branch 'master'.

Equality operator for GeoDataTour and related classes
REVIEW: 116531

M  +10   -0    src/lib/marble/geodata/data/GeoDataAnimatedUpdate.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataAnimatedUpdate.h
M  +63   -0    src/lib/marble/geodata/data/GeoDataPlaylist.cpp
M  +3    -0    src/lib/marble/geodata/data/GeoDataPlaylist.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataSoundCue.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataSoundCue.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataTour.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataTour.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataTourControl.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataTourControl.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataUpdate.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataUpdate.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataWait.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataWait.h
M  +63   -0    tests/TestEquality.cpp

http://commits.kde.org/marble/1d270395757c852ace9348b8a20af327627789c3
Comment 3 Dennis Nienhüser 2014-03-02 19:13:49 UTC
Git commit 09f6af7eda05e8014d7cd9ea7f92417977c75445 by Dennis Nienhüser, on behalf of Sanjiban Bairagya.
Committed on 02/03/2014 at 19:10.
Pushed by nienhueser into branch 'master'.

Equality operator for GeoDataTour and related classes
REVIEW: 116531

M  +10   -0    src/lib/marble/geodata/data/GeoDataAnimatedUpdate.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataAnimatedUpdate.h
M  +63   -0    src/lib/marble/geodata/data/GeoDataPlaylist.cpp
M  +3    -0    src/lib/marble/geodata/data/GeoDataPlaylist.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataSoundCue.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataSoundCue.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataTour.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataTour.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataTourControl.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataTourControl.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataUpdate.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataUpdate.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataWait.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataWait.h
M  +63   -0    tests/TestEquality.cpp

http://commits.kde.org/marble/09f6af7eda05e8014d7cd9ea7f92417977c75445