Hello
The object of the C++ refactoring GSoC project by Abhishek was to better separate the object tree (interpretation) and the XML tree (representation). But the recent merge of his work made it clear that he potentially made things much worse!
Abhishek's patch introduces these functions:
void attach(SPObject *object, SPObject *prev); void reorder(SPObject *prev); void detach(SPObject *object); long long int getIntAttribute(char const *key, long long int def); unsigned getPosition(); gchar const * getAttribute(gchar const *name,SPException *ex=0) const; void appendChild(Inkscape::XML::Node *child); void addChild(Inkscape::XML::Node *child,Inkscape::XML::Node *prev=0); void setKeyValue(unsigned int key, gchar const *value); void setAttribute(gchar const *key, gchar const *value, SPException *ex=0); void readAttr(gchar const *key); void removeAttribute(gchar const *key, SPException *ex=0); bool storeAsDouble( gchar const *key, double *val ) const;
All of those are public and operate directly on the XML tree - exactly the type of operation that the project was supposed to reduce!
What do we do now? At the least, all the functions listed above should be made private.
Regards, Krzysztof