[aravis/dom] dom: introduce ArvGcNode, as a base class for feature and property nodes.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis/dom] dom: introduce ArvGcNode, as a base class for feature and property nodes.
- Date: Tue, 28 Feb 2012 13:54:14 +0000 (UTC)
commit ce0ca7855eeb4f7f1accc415c32738e719186bb6
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Tue Feb 28 14:53:23 2012 +0100
dom: introduce ArvGcNode, as a base class for feature and property nodes.
src/Makefile.am | 4 ++-
src/arv.h | 2 +
src/arvgc.c | 5 +--
src/arvgcboolean.c | 2 +-
src/arvgccategory.c | 2 +-
src/arvgccommand.c | 2 +-
src/arvgcconverter.c | 2 +-
src/arvgcenumentry.c | 2 +-
src/arvgcenumeration.c | 2 +-
src/arvgcfeaturenode.c | 44 ++++++++++++------------
src/arvgcfeaturenode.h | 12 +++---
src/arvgcfloatnode.c | 2 +-
src/arvgcintegernode.c | 2 +-
src/arvgcnode.c | 64 ++++++++++++++++++++++++++++++++++++
src/arvgcnode.h | 53 +++++++++++++++++++++++++++++
src/arvgcport.c | 2 +-
src/arvgcregister.c | 2 +-
src/arvgcregisterdescriptionnode.c | 2 +-
src/arvgcswissknife.c | 2 +-
src/arvtypes.h | 3 +-
20 files changed, 166 insertions(+), 45 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 310075c..66bcefe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,7 +24,7 @@ BUILT_SOURCES = arvenumtypes.h arvenumtypes.c
EXTRA_DIST += arvenumtypes.h.template \
arvenumtypes.c.template
-libaravis_ ARAVIS_API_VERSION@_la_LIBADD = \
+libaravis_ ARAVIS_API_VERSION@_la_LIBADD = \
$(ARAVIS_LIBS)
ARAVIS_SRCS = \
@@ -45,6 +45,7 @@ ARAVIS_SRCS = \
arvdomimplementation.c \
arvcamera.c \
arvgc.c \
+ arvgcnode.c \
arvgcpropertynode.c \
arvgcfeaturenode.c \
arvgcregisterdescriptionnode.c \
@@ -100,6 +101,7 @@ ARAVIS_HDRS = \
arvdomimplementation.h \
arvcamera.h \
arvgc.h \
+ arvgcnode.h \
arvgcpropertynode.h \
arvgcfeaturenode.h \
arvgcregisterdescriptionnode.h \
diff --git a/src/arv.h b/src/arv.h
index 87e284f..e4d2f3f 100644
--- a/src/arv.h
+++ b/src/arv.h
@@ -40,6 +40,8 @@
#include <arvdomparser.h>
#include <arvcamera.h>
#include <arvgc.h>
+#include <arvgcnode.h>
+#include <arvgcpropertynode.h>
#include <arvgcfeaturenode.h>
#include <arvgccategory.h>
#include <arvgcboolean.h>
diff --git a/src/arvgc.c b/src/arvgc.c
index c42eb1c..891db77 100644
--- a/src/arvgc.c
+++ b/src/arvgc.c
@@ -30,6 +30,7 @@
*/
#include <arvgc.h>
+#include <arvgcnode.h>
#include <arvgcpropertynode.h>
#include <arvgcregisterdescriptionnode.h>
#include <arvgccategory.h>
@@ -56,9 +57,7 @@ static GObjectClass *parent_class = NULL;
static gboolean
arv_gc_can_append_child (ArvDomNode *self, ArvDomNode *child)
{
- /* FIXME */
-
- return TRUE;
+ return ARV_IS_GC_NODE (child);
}
/* ArvDomDocument implementation */
diff --git a/src/arvgcboolean.c b/src/arvgcboolean.c
index 0f52f79..0f3c037 100644
--- a/src/arvgcboolean.c
+++ b/src/arvgcboolean.c
@@ -140,4 +140,4 @@ arv_gc_boolean_class_init (ArvGcBooleanClass *this_class)
/* ArvGcInteger interface implementation */
-G_DEFINE_TYPE (ArvGcBoolean, arv_gc_boolean, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcBoolean, arv_gc_boolean, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgccategory.c b/src/arvgccategory.c
index 31012e3..1431ae4 100644
--- a/src/arvgccategory.c
+++ b/src/arvgccategory.c
@@ -126,4 +126,4 @@ arv_gc_category_class_init (ArvGcCategoryClass *this_class)
dom_node_class->can_append_child = arv_gc_category_can_append_child;
}
-G_DEFINE_TYPE (ArvGcCategory, arv_gc_category, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcCategory, arv_gc_category, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgccommand.c b/src/arvgccommand.c
index 70d9211..eba47a3 100644
--- a/src/arvgccommand.c
+++ b/src/arvgccommand.c
@@ -128,4 +128,4 @@ arv_gc_command_class_init (ArvGcCommandClass *this_class)
gc_feature_node_class->add_element = arv_gc_command_add_element;
}
-G_DEFINE_TYPE (ArvGcCommand, arv_gc_command, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcCommand, arv_gc_command, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgcconverter.c b/src/arvgcconverter.c
index 9cb9649..538b4ea 100644
--- a/src/arvgcconverter.c
+++ b/src/arvgcconverter.c
@@ -304,6 +304,6 @@ arv_gc_converter_float_interface_init (ArvGcFloatInterface *interface)
interface->set_value = arv_gc_converter_set_float_value;
}
-G_DEFINE_TYPE_WITH_CODE (ArvGcConverter, arv_gc_converter, ARV_TYPE_GC_NODE,
+G_DEFINE_TYPE_WITH_CODE (ArvGcConverter, arv_gc_converter, ARV_TYPE_GC_FEATURE_NODE,
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_INTEGER, arv_gc_converter_integer_interface_init)
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_FLOAT, arv_gc_converter_float_interface_init))
diff --git a/src/arvgcenumentry.c b/src/arvgcenumentry.c
index 2dfd537..1908c8a 100644
--- a/src/arvgcenumentry.c
+++ b/src/arvgcenumentry.c
@@ -100,4 +100,4 @@ arv_gc_enum_entry_class_init (ArvGcEnumEntryClass *this_class)
gc_feature_node_class->add_element = arv_gc_enum_entry_add_element;
}
-G_DEFINE_TYPE (ArvGcEnumEntry, arv_gc_enum_entry, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcEnumEntry, arv_gc_enum_entry, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgcenumeration.c b/src/arvgcenumeration.c
index e91ef50..e2a7ddd 100644
--- a/src/arvgcenumeration.c
+++ b/src/arvgcenumeration.c
@@ -239,4 +239,4 @@ arv_gc_enumeration_class_init (ArvGcEnumerationClass *this_class)
gc_feature_node_class->get_value_as_string = arv_gc_enumeration_get_value_as_string;
}
-G_DEFINE_TYPE (ArvGcEnumeration, arv_gc_enumeration, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcEnumeration, arv_gc_enumeration, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgcfeaturenode.c b/src/arvgcfeaturenode.c
index 9906688..eeb19dd 100644
--- a/src/arvgcfeaturenode.c
+++ b/src/arvgcfeaturenode.c
@@ -56,7 +56,7 @@ struct _ArvGcFeatureNodePrivate {
const char *
arv_gc_feature_node_get_name (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), NULL);
return node->priv->name;
}
@@ -64,7 +64,7 @@ arv_gc_feature_node_get_name (ArvGcFeatureNode *node)
const char *
arv_gc_feature_node_get_tooltip (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), NULL);
return node->priv->tooltip;
}
@@ -72,7 +72,7 @@ arv_gc_feature_node_get_tooltip (ArvGcFeatureNode *node)
const char *
arv_gc_feature_node_get_description (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), NULL);
return node->priv->description;
}
@@ -80,7 +80,7 @@ arv_gc_feature_node_get_description (ArvGcFeatureNode *node)
const char *
arv_gc_feature_node_get_display_name (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), NULL);
return node->priv->display_name;
}
@@ -88,7 +88,7 @@ arv_gc_feature_node_get_display_name (ArvGcFeatureNode *node)
gboolean
arv_gc_feature_node_is_available (ArvGcFeatureNode *gc_feature_node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (gc_feature_node), FALSE);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (gc_feature_node), FALSE);
return arv_gc_get_int64_from_value (gc_feature_node->priv->genicam, &gc_feature_node->priv->is_implemented) != 0 &&
arv_gc_get_int64_from_value (gc_feature_node->priv->genicam, &gc_feature_node->priv->is_available) != 0;
@@ -111,7 +111,7 @@ _set_attribute (ArvGcFeatureNode *node, const char *name, const char *value)
void
arv_gc_feature_node_set_attribute (ArvGcFeatureNode *node, const char *name, const char *value)
{
- g_return_if_fail (ARV_IS_GC_NODE (node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (node));
g_return_if_fail (name != NULL);
ARV_GC_FEATURE_NODE_GET_CLASS (node)->set_attribute (node, name, value);
@@ -139,7 +139,7 @@ _add_element (ArvGcFeatureNode *node, const char *name, const char *content, con
void
arv_gc_feature_node_add_element (ArvGcFeatureNode *node, const char *name, const char *content, const char **attributes)
{
- g_return_if_fail (ARV_IS_GC_NODE (node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (node));
g_return_if_fail (name != NULL);
arv_log_genicam ("[GcNode::add_element] Add %s [%s]",
@@ -153,8 +153,8 @@ arv_gc_feature_node_can_add_child (ArvGcFeatureNode *node, ArvGcFeatureNode *chi
{
ArvGcFeatureNodeClass *node_class;
- g_return_val_if_fail (ARV_IS_GC_NODE (node), FALSE);
- g_return_val_if_fail (ARV_IS_GC_NODE (child), FALSE);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), FALSE);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (child), FALSE);
node_class = ARV_GC_FEATURE_NODE_GET_CLASS (node);
if (node_class->can_add_child == NULL)
@@ -166,8 +166,8 @@ arv_gc_feature_node_can_add_child (ArvGcFeatureNode *node, ArvGcFeatureNode *chi
void
arv_gc_feature_node_add_child (ArvGcFeatureNode *node, ArvGcFeatureNode *child)
{
- g_return_if_fail (ARV_IS_GC_NODE (node));
- g_return_if_fail (ARV_IS_GC_NODE (child));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (child));
node->priv->childs = g_slist_append (node->priv->childs, child);
node->priv->n_childs++;
@@ -185,7 +185,7 @@ arv_gc_feature_node_add_child (ArvGcFeatureNode *node, ArvGcFeatureNode *child)
const GSList *
arv_gc_feature_node_get_childs (ArvGcFeatureNode *gc_feature_node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (gc_feature_node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (gc_feature_node), NULL);
return gc_feature_node->priv->childs;
}
@@ -193,7 +193,7 @@ arv_gc_feature_node_get_childs (ArvGcFeatureNode *gc_feature_node)
unsigned int
arv_gc_feature_node_get_n_childs (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), 0);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), 0);
return node->priv->n_childs;
}
@@ -203,7 +203,7 @@ arv_gc_feature_node_new (void)
{
ArvGcFeatureNode *node;
- node = g_object_new (ARV_TYPE_GC_NODE, NULL);
+ node = g_object_new (ARV_TYPE_GC_FEATURE_NODE, NULL);
return node;
}
@@ -211,7 +211,7 @@ arv_gc_feature_node_new (void)
void
arv_gc_feature_node_set_genicam (ArvGcFeatureNode *node, ArvGc *genicam)
{
- g_return_if_fail (ARV_IS_GC_NODE (node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (node));
g_return_if_fail (genicam == NULL || ARV_IS_GC (genicam));
node->priv->genicam = genicam;
@@ -228,7 +228,7 @@ arv_gc_feature_node_set_genicam (ArvGcFeatureNode *node, ArvGc *genicam)
ArvGc *
arv_gc_feature_node_get_genicam (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), NULL);
return node->priv->genicam;
}
@@ -238,7 +238,7 @@ arv_gc_feature_node_get_value_type (ArvGcFeatureNode *node)
{
ArvGcFeatureNodeClass *node_class;
- g_return_val_if_fail (ARV_IS_GC_NODE (node), 0);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), 0);
node_class = ARV_GC_FEATURE_NODE_GET_CLASS (node);
if (node_class->get_value_type != NULL)
@@ -260,7 +260,7 @@ arv_gc_feature_node_set_value_from_string (ArvGcFeatureNode *gc_feature_node, co
{
ArvGcFeatureNodeClass *node_class;
- g_return_if_fail (ARV_IS_GC_NODE (gc_feature_node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (gc_feature_node));
g_return_if_fail (string != NULL);
node_class = ARV_GC_FEATURE_NODE_GET_CLASS (gc_feature_node);
@@ -284,7 +284,7 @@ arv_gc_feature_node_get_value_as_string (ArvGcFeatureNode *gc_feature_node)
{
ArvGcFeatureNodeClass *node_class;
- g_return_val_if_fail (ARV_IS_GC_NODE (gc_feature_node), NULL);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (gc_feature_node), NULL);
node_class = ARV_GC_FEATURE_NODE_GET_CLASS (gc_feature_node);
if (node_class->get_value_as_string != NULL)
@@ -296,7 +296,7 @@ arv_gc_feature_node_get_value_as_string (ArvGcFeatureNode *gc_feature_node)
void
arv_gc_feature_node_inc_modification_count (ArvGcFeatureNode *gc_feature_node)
{
- g_return_if_fail (ARV_IS_GC_NODE (gc_feature_node));
+ g_return_if_fail (ARV_IS_GC_FEATURE_NODE (gc_feature_node));
gc_feature_node->priv->modification_count++;
}
@@ -304,7 +304,7 @@ arv_gc_feature_node_inc_modification_count (ArvGcFeatureNode *gc_feature_node)
gint
arv_gc_feature_node_get_modification_count (ArvGcFeatureNode *node)
{
- g_return_val_if_fail (ARV_IS_GC_NODE (node), 0);
+ g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), 0);
return node->priv->modification_count;
}
@@ -312,7 +312,7 @@ arv_gc_feature_node_get_modification_count (ArvGcFeatureNode *node)
static void
arv_gc_feature_node_init (ArvGcFeatureNode *gc_feature_node)
{
- gc_feature_node->priv = G_TYPE_INSTANCE_GET_PRIVATE (gc_feature_node, ARV_TYPE_GC_NODE, ArvGcFeatureNodePrivate);
+ gc_feature_node->priv = G_TYPE_INSTANCE_GET_PRIVATE (gc_feature_node, ARV_TYPE_GC_FEATURE_NODE, ArvGcFeatureNodePrivate);
gc_feature_node->priv->name = NULL;
gc_feature_node->priv->tooltip = NULL;
diff --git a/src/arvgcfeaturenode.h b/src/arvgcfeaturenode.h
index 910b7d7..33c4009 100644
--- a/src/arvgcfeaturenode.h
+++ b/src/arvgcfeaturenode.h
@@ -28,12 +28,12 @@
G_BEGIN_DECLS
-#define ARV_TYPE_GC_NODE (arv_gc_feature_node_get_type ())
-#define ARV_GC_FEATURE_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ARV_TYPE_GC_NODE, ArvGcFeatureNode))
-#define ARV_GC_FEATURE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ARV_TYPE_GC_NODE, ArvGcFeatureNodeClass))
-#define ARV_IS_GC_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ARV_TYPE_GC_NODE))
-#define ARV_IS_GC_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ARV_TYPE_GC_NODE))
-#define ARV_GC_FEATURE_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ARV_TYPE_GC_NODE, ArvGcFeatureNodeClass))
+#define ARV_TYPE_GC_FEATURE_NODE (arv_gc_feature_node_get_type ())
+#define ARV_GC_FEATURE_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ARV_TYPE_GC_FEATURE_NODE, ArvGcFeatureNode))
+#define ARV_GC_FEATURE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ARV_TYPE_GC_FEATURE_NODE, ArvGcFeatureNodeClass))
+#define ARV_IS_GC_FEATURE_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ARV_TYPE_GC_FEATURE_NODE))
+#define ARV_IS_GC_FEATURE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ARV_TYPE_GC_FEATURE_NODE))
+#define ARV_GC_FEATURE_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ARV_TYPE_GC_FEATURE_NODE, ArvGcFeatureNodeClass))
typedef struct _ArvGcFeatureNodePrivate ArvGcFeatureNodePrivate;
typedef struct _ArvGcFeatureNodeClass ArvGcFeatureNodeClass;
diff --git a/src/arvgcfloatnode.c b/src/arvgcfloatnode.c
index bab6dd4..1f949e0 100644
--- a/src/arvgcfloatnode.c
+++ b/src/arvgcfloatnode.c
@@ -255,5 +255,5 @@ arv_gc_float_node_float_interface_init (ArvGcFloatInterface *interface)
interface->impose_max = arv_gc_float_node_impose_max;
}
-G_DEFINE_TYPE_WITH_CODE (ArvGcFloatNode, arv_gc_float_node, ARV_TYPE_GC_NODE,
+G_DEFINE_TYPE_WITH_CODE (ArvGcFloatNode, arv_gc_float_node, ARV_TYPE_GC_FEATURE_NODE,
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_FLOAT, arv_gc_float_node_float_interface_init))
diff --git a/src/arvgcintegernode.c b/src/arvgcintegernode.c
index ab37dce..4a14f81 100644
--- a/src/arvgcintegernode.c
+++ b/src/arvgcintegernode.c
@@ -252,5 +252,5 @@ arv_gc_integer_node_integer_interface_init (ArvGcIntegerInterface *interface)
interface->impose_max = arv_gc_integer_node_impose_max;
}
-G_DEFINE_TYPE_WITH_CODE (ArvGcIntegerNode, arv_gc_integer_node, ARV_TYPE_GC_NODE,
+G_DEFINE_TYPE_WITH_CODE (ArvGcIntegerNode, arv_gc_integer_node, ARV_TYPE_GC_FEATURE_NODE,
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_INTEGER, arv_gc_integer_node_integer_interface_init))
diff --git a/src/arvgcnode.c b/src/arvgcnode.c
new file mode 100644
index 0000000..86ebfd3
--- /dev/null
+++ b/src/arvgcnode.c
@@ -0,0 +1,64 @@
+/* Aravis - Digital camera library
+ *
+ * Copyright  2009-2012 Emmanuel Pacaud
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Emmanuel Pacaud <emmanuel gnome org>
+ */
+
+/**
+ * SECTION: arvgcnode
+ * @short_description: Base class for all Genicam nodes
+ *
+ * #ArvGcNode provides a base class for the implementation of the different
+ * types of Genicam node.
+ */
+
+#include <arvgcnode.h>
+#include <arvgc.h>
+#include <arvmisc.h>
+#include <arvdebug.h>
+#include <string.h>
+
+static GObjectClass *parent_class = NULL;
+
+/* ArvDomNode implementation */
+
+/* ArvGcNode implementation */
+
+static void
+arv_gc_node_init (ArvGcNode *gc_node)
+{
+}
+
+static void
+arv_gc_node_finalize (GObject *object)
+{
+ parent_class->finalize (object);
+}
+
+static void
+arv_gc_node_class_init (ArvGcNodeClass *this_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (this_class);
+
+ parent_class = g_type_class_peek_parent (this_class);
+
+ object_class->finalize = arv_gc_node_finalize;
+}
+
+G_DEFINE_ABSTRACT_TYPE (ArvGcNode, arv_gc_node, ARV_TYPE_DOM_ELEMENT)
diff --git a/src/arvgcnode.h b/src/arvgcnode.h
new file mode 100644
index 0000000..934347d
--- /dev/null
+++ b/src/arvgcnode.h
@@ -0,0 +1,53 @@
+/* Aravis - Digital camera library
+ *
+ * Copyright  2009-2012 Emmanuel Pacaud
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Emmanuel Pacaud <emmanuel gnome org>
+ */
+
+#ifndef ARV_GC_NODE_H
+#define ARV_GC_NODE_H
+
+#include <arvtypes.h>
+#include <arvdomelement.h>
+
+G_BEGIN_DECLS
+
+#define ARV_TYPE_GC_NODE (arv_gc_node_get_type ())
+#define ARV_GC_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ARV_TYPE_GC_NODE, ArvGcNode))
+#define ARV_GC_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ARV_TYPE_GC_NODE, ArvGcNodeClass))
+#define ARV_IS_GC_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ARV_TYPE_GC_NODE))
+#define ARV_IS_GC_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ARV_TYPE_GC_NODE))
+#define ARV_GC_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ARV_TYPE_GC_NODE, ArvGcNodeClass))
+
+typedef struct _ArvGcNodePrivate ArvGcNodePrivate;
+typedef struct _ArvGcNodeClass ArvGcNodeClass;
+
+struct _ArvGcNode {
+ ArvDomElement base;
+};
+
+struct _ArvGcNodeClass {
+ ArvDomElementClass parent_class;
+};
+
+GType arv_gc_node_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/arvgcport.c b/src/arvgcport.c
index a583a97..ad7b05c 100644
--- a/src/arvgcport.c
+++ b/src/arvgcport.c
@@ -102,4 +102,4 @@ arv_gc_port_class_init (ArvGcPortClass *this_class)
dom_node_class->get_node_name = arv_gc_port_get_node_name;
}
-G_DEFINE_TYPE (ArvGcPort, arv_gc_port, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcPort, arv_gc_port, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgcregister.c b/src/arvgcregister.c
index 8f90a6e..76dc294 100644
--- a/src/arvgcregister.c
+++ b/src/arvgcregister.c
@@ -703,7 +703,7 @@ arv_gc_register_string_interface_init (ArvGcStringInterface *interface)
interface->get_max_length = arv_gc_register_get_max_string_length;
}
-G_DEFINE_TYPE_WITH_CODE (ArvGcRegister, arv_gc_register, ARV_TYPE_GC_NODE,
+G_DEFINE_TYPE_WITH_CODE (ArvGcRegister, arv_gc_register, ARV_TYPE_GC_FEATURE_NODE,
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_INTEGER, arv_gc_register_integer_interface_init)
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_FLOAT, arv_gc_register_float_interface_init)
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_STRING, arv_gc_register_string_interface_init))
diff --git a/src/arvgcregisterdescriptionnode.c b/src/arvgcregisterdescriptionnode.c
index 594c2ba..a445e65 100644
--- a/src/arvgcregisterdescriptionnode.c
+++ b/src/arvgcregisterdescriptionnode.c
@@ -74,4 +74,4 @@ arv_gc_register_description_node_class_init (ArvGcRegisterDescriptionNodeClass *
/* ArvGcInteger interface implementation */
-G_DEFINE_TYPE (ArvGcRegisterDescriptionNode, arv_gc_register_description_node, ARV_TYPE_GC_NODE)
+G_DEFINE_TYPE (ArvGcRegisterDescriptionNode, arv_gc_register_description_node, ARV_TYPE_GC_FEATURE_NODE)
diff --git a/src/arvgcswissknife.c b/src/arvgcswissknife.c
index 35d6c08..3e504a4 100644
--- a/src/arvgcswissknife.c
+++ b/src/arvgcswissknife.c
@@ -237,6 +237,6 @@ arv_gc_swiss_knife_float_interface_init (ArvGcFloatInterface *interface)
interface->set_value = arv_gc_swiss_knife_set_float_value;
}
-G_DEFINE_TYPE_WITH_CODE (ArvGcSwissKnife, arv_gc_swiss_knife, ARV_TYPE_GC_NODE,
+G_DEFINE_TYPE_WITH_CODE (ArvGcSwissKnife, arv_gc_swiss_knife, ARV_TYPE_GC_FEATURE_NODE,
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_INTEGER, arv_gc_swiss_knife_integer_interface_init)
G_IMPLEMENT_INTERFACE (ARV_TYPE_GC_FLOAT, arv_gc_swiss_knife_float_interface_init))
diff --git a/src/arvtypes.h b/src/arvtypes.h
index 3b6d0d0..94acaff 100644
--- a/src/arvtypes.h
+++ b/src/arvtypes.h
@@ -42,7 +42,8 @@ typedef struct _ArvDomText ArvDomText;
typedef struct _ArvGc ArvGc;
-typedef struct _ArvGcFeatureNode ArvGcFeatureNode;
+typedef struct _ArvGcNode ArvGcNode;
+typedef struct _ArvGcFeatureNode ArvGcFeatureNode;
typedef struct _ArvGcPropertyNode ArvGcPropertyNode;
typedef struct _ArvGcRegisterDescriptionNode ArvGcRegisterDescriptionNode;
typedef struct _ArvGcCategory ArvGcCategory;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]