[gnome-builder/wip/slaf/xml-pack: 18/56] xml-pack: add attributes handling to IdeXmlSymbolNode
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/slaf/xml-pack: 18/56] xml-pack: add attributes handling to IdeXmlSymbolNode
- Date: Thu, 13 Jul 2017 12:20:32 +0000 (UTC)
commit 8c777002713294331950acefa6125e57c5e47940
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun May 14 22:53:44 2017 +0200
xml-pack: add attributes handling to IdeXmlSymbolNode
plugins/xml-pack/ide-xml-symbol-node.c | 24 ++++++++++++++++++++++++
plugins/xml-pack/ide-xml-symbol-node.h | 3 +++
2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-symbol-node.c b/plugins/xml-pack/ide-xml-symbol-node.c
index 6965d04..f1fb888 100644
--- a/plugins/xml-pack/ide-xml-symbol-node.c
+++ b/plugins/xml-pack/ide-xml-symbol-node.c
@@ -45,6 +45,7 @@ struct _IdeXmlSymbolNode
gint nb_children;
gint nb_internal_children;
GFile *file;
+ gchar **attributes_names;
NodeRange start_tag;
NodeRange end_tag;
@@ -116,6 +117,9 @@ ide_xml_symbol_node_finalize (GObject *object)
g_clear_object (&self->file);
+ if (self->attributes_names != NULL)
+ g_strfreev (self->attributes_names);
+
G_OBJECT_CLASS (ide_xml_symbol_node_parent_class)->finalize (object);
}
@@ -572,3 +576,23 @@ ide_xml_symbol_node_set_value (IdeXmlSymbolNode *self,
if (value != NULL)
self->value = g_strdup (value);
}
+
+void
+ide_xml_symbol_node_take_attributes_names (IdeXmlSymbolNode *self,
+ gchar **attributes_names)
+{
+ g_return_if_fail (IDE_IS_XML_SYMBOL_NODE (self));
+
+ if (self->attributes_names != NULL)
+ g_strfreev (self->attributes_names);
+
+ self->attributes_names = attributes_names;
+}
+
+const gchar **
+ide_xml_symbol_node_get_attributes_names (IdeXmlSymbolNode *self)
+{
+ g_return_val_if_fail (IDE_IS_XML_SYMBOL_NODE (self), NULL);
+
+ return (const gchar **)self->attributes_names;
+}
diff --git a/plugins/xml-pack/ide-xml-symbol-node.h b/plugins/xml-pack/ide-xml-symbol-node.h
index 3458d27..8ee0ea4 100644
--- a/plugins/xml-pack/ide-xml-symbol-node.h
+++ b/plugins/xml-pack/ide-xml-symbol-node.h
@@ -88,6 +88,9 @@ void ide_xml_symbol_node_set_element_name (Ide
const gchar
*element_name);
void ide_xml_symbol_node_set_value (IdeXmlSymbolNode *self,
const gchar *value);
+const gchar **ide_xml_symbol_node_get_attributes_names (IdeXmlSymbolNode *self);
+void ide_xml_symbol_node_take_attributes_names (IdeXmlSymbolNode *self,
+ gchar
**attributes_names);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]