[Marble-devel] Kml Parser complexity

Bastian Holst bastianholst at gmx.de
Thu May 27 20:23:31 CEST 2010


Hi,

In my opinion the structure of our current KML-parser is too complex.
Additionally I do not like the idea of casting around that often as it happens 
in our current KML parser.

If I understand and remember correctly a line like:
return &parentItem.nodeAs<GeoDataRegion>()->lod();
and the changing of these pointers attributes (as it is done later) will 
depend on GeoDataRegion::lod() returning the stored object itself and not a 
copy, but nobody can ensure that.

As a solution for that problem and to reduce the complexity of the parser, I'd 
like to change the structure to the structure which can be seen in the 
attachement.
To my mind this doesn't reduce the flexibility of the parser, but makes it a 
lot more easier to understand.
What do you think?

Note: The code in the attachement is just a quick draft and contains a lot of 
bugs ;).

Best regards
Bastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TagHandler.cpp
Type: text/x-c++src
Size: 1678 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/marble-devel/attachments/20100527/71b2dd72/attachment.cpp 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/marble-devel/attachments/20100527/71b2dd72/attachment.sig 


More information about the Marble-devel mailing list