summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-06-14 21:45:21 +0000
committerjabiertxof <info@marker.es>2016-06-14 21:45:21 +0000
commite17c2195890b267d2361b7feb80d89a71e69b1a3 (patch)
tree2588cc4d68d1e0156509563f02b6e163590f5e40 /src/sp-object.cpp
parentAdd snap to origin in double direction knots (diff)
parent[Bug #1300865] lcms2: crash in Fill and Stroke if linked color profile is mis... (diff)
downloadinkscape-e17c2195890b267d2361b7feb80d89a71e69b1a3.tar.gz
inkscape-e17c2195890b267d2361b7feb80d89a71e69b1a3.zip
update to trunk
(bzr r13645.1.158)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index db66eb3e6..d1659eedc 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -71,13 +71,17 @@ Inkscape::XML::NodeEventVector object_event_vector = {
SPObject::repr_order_changed
};
-// A friend class used to set internal members on SPObject so as to not expose settors in SPObject's public API
+/**
+ * A friend class used to set internal members on SPObject so as to not expose settors in SPObject's public API
+ */
class SPObjectImpl
{
public:
/**
* Null's the id member of an SPObject without attempting to free prior contents.
+ *
+ * @param[inout] obj Pointer to the object which's id shall be nulled.
*/
static void setIdNull( SPObject* obj ) {
if (obj) {
@@ -87,6 +91,9 @@ public:
/**
* Sets the id member of an object, freeing any prior content.
+ *
+ * @param[inout] obj Pointer to the object which's id shall be set.
+ * @param[in] id New id
*/
static void setId( SPObject* obj, gchar const* id ) {
if (obj && (id != obj->id) ) {
@@ -104,6 +111,9 @@ public:
static gchar *sp_object_get_unique_id(SPObject *object,
gchar const *defid);
+/**
+ * Constructor, sets all attributes to default values.
+ */
SPObject::SPObject()
: cloned(0), uflags(0), mflags(0), hrefcount(0), _total_hrefcount(0),
document(NULL), parent(NULL), children(NULL), _last_child(NULL),
@@ -126,6 +136,9 @@ SPObject::SPObject()
this->context_style = NULL;
}
+/**
+ * Destructor, frees the used memory and unreferences a potential successor of the object.
+ */
SPObject::~SPObject() {
g_free(this->_label);
g_free(this->_default_label);