diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-06 07:22:32 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-06 07:22:32 +0000 |
| commit | 1aaf9a0ee3da28012bf43cfa61e2e5fa933edd2e (patch) | |
| tree | 1db3869074d0bfc803c4ec12516d2a557347c676 /src/sp-object.h | |
| parent | another c++ification for sp-object.h/cpp and still in progress... (diff) | |
| download | inkscape-1aaf9a0ee3da28012bf43cfa61e2e5fa933edd2e.tar.gz inkscape-1aaf9a0ee3da28012bf43cfa61e2e5fa933edd2e.zip | |
C++ification of SPObject continued along with the onset of XML Privatisation. Users may checkout [grep -Ir XML Tree *] in the source code and all the places where the XML node/Tree is being used shall be reflected.
(bzr r9546.1.5)
Diffstat (limited to 'src/sp-object.h')
| -rw-r--r-- | src/sp-object.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/sp-object.h b/src/sp-object.h index cb7a5a6ce..e1d49b041 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -46,7 +46,7 @@ /* Convenience stuff */ #define SP_OBJECT_ID(o) (((SPObject *) (o))->getId()) -#define SP_OBJECT_REPR(o) (((SPObject *) (o))->repr) +#define SP_OBJECT_REPR(o) (((SPObject *) (o))->getRepr()) #define SP_OBJECT_DOCUMENT(o) (((SPObject *) (o))->document) #define SP_OBJECT_PARENT(o) (((SPObject *) (o))->parent) #define SP_OBJECT_NEXT(o) (((SPObject *) (o))->next) @@ -137,7 +137,8 @@ SPObject *sp_object_href(SPObject *object, gpointer owner); SPObject *sp_object_hunref(SPObject *object, gpointer owner); /// A refcounting tree node object. -struct SPObject : public GObject { +class SPObject : public GObject { + public: enum CollectionPolicy { COLLECT_WITH_PARENT, ALWAYS_COLLECT @@ -154,10 +155,11 @@ struct SPObject : public GObject { SPObject *children; /* Our children */ SPObject *_last_child; /* Remembered last child */ SPObject *next; /* Next object in linked list */ - Inkscape::XML::Node *repr; /* Our xml representation */ + //Inkscape::XML::Node *repr; /* Our xml representation */ private: gchar *id; /* Our very own unique id */ + Inkscape::XML::Node *repr; /* Our xml representation */ public: /** @@ -165,6 +167,17 @@ public: */ gchar const* getId() const; + /** + * Returns the XML representation of tree + */ + //Inkscape::XML::Node const* getRepr() const; + Inkscape::XML::Node * getRepr(); + + /** + * Returns the XML representation of tree + */ + Inkscape::XML::Node const* getRepr() const; + /** @brief cleans up an SPObject, releasing its references and * requesting that references to it be released */ |
