[gxml] XNamespace: renamed from GNamespace



commit 69220c8ff5d03b09e0b86b8396bc10f05bf7137c
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Jul 4 23:51:18 2019 -0500

    XNamespace: renamed from GNamespace

 gxml/GXmlNamespace.vala   | 45 ---------------------------------------------
 gxml/XAttribute.vala      |  4 ++--
 gxml/XListChildren.vala   |  2 +-
 gxml/XListNamespaces.vala | 14 +++++++-------
 gxml/meson.build          |  2 +-
 5 files changed, 11 insertions(+), 56 deletions(-)
---
diff --git a/gxml/XAttribute.vala b/gxml/XAttribute.vala
index 398d71b..c4dd431 100644
--- a/gxml/XAttribute.vala
+++ b/gxml/XAttribute.vala
@@ -37,7 +37,7 @@ public class GXml.XAttribute : GXml.XNode, GXml.DomAttr
     owned get {
       var l = new Gee.ArrayList<GXml.Namespace> ();
       if (_attr->ns == null) return l;
-      l.add (new GNamespace (_attr->ns));
+      l.add (new XNamespace (_attr->ns));
       return l;
     }
   }
@@ -45,7 +45,7 @@ public class GXml.XAttribute : GXml.XNode, GXml.DomAttr
     owned get {
       if (_attr == null) return null;
       if (_attr->ns == null) return null;
-      return new GNamespace (_attr->ns);
+      return new XNamespace (_attr->ns);
     }
     set {
       if (_attr == null) return;
diff --git a/gxml/XListChildren.vala b/gxml/XListChildren.vala
index 971afe4..7b95018 100644
--- a/gxml/XListChildren.vala
+++ b/gxml/XListChildren.vala
@@ -106,7 +106,7 @@ public class GXml.XListChildren : AbstractBidirList<GXml.DomNode>,
   }
   public override bool add (GXml.DomNode item) {
     if (_node == null) return false;
-    if (!(item is GNamespace))
+    if (!(item is XNamespace))
       return (_node->add_child (((XNode) item).get_internal_node ())) != null;
     var ns = (GXml.Namespace) item;
     return (_node->new_ns (ns.uri, ns.prefix)) != null;
diff --git a/gxml/XListNamespaces.vala b/gxml/XListNamespaces.vala
index b38ed0d..b43b793 100644
--- a/gxml/XListNamespaces.vala
+++ b/gxml/XListNamespaces.vala
@@ -41,7 +41,7 @@ public class GXml.XListNamespaces : Gee.AbstractList<GXml.Namespace>
     int i = 0;
     while (ns != null) {
       if (i == index) {
-        return new GNamespace (ns);
+        return new XNamespace (ns);
       }
       ns = ns->next;
       i++;
@@ -50,11 +50,11 @@ public class GXml.XListNamespaces : Gee.AbstractList<GXml.Namespace>
   }
   public override int index_of (GXml.Namespace item) {
     if (_node == null) return -1;
-    if (!(item is GNamespace)) return -1;
+    if (!(item is XNamespace)) return -1;
     var ns = _node->ns_def;
     int i = 0;
     while (ns != null) {
-      if (((GNamespace) item).get_internal_ns () == ns) return i;
+      if (((XNamespace) item).get_internal_ns () == ns) return i;
       ns = ns->next;
       i++;
     }
@@ -74,7 +74,7 @@ public class GXml.XListNamespaces : Gee.AbstractList<GXml.Namespace>
     int i = 0;
     while (ns != null) {
       if (i >= start && i <= stop) {
-        l.add (new GNamespace (ns));
+        l.add (new XNamespace (ns));
       }
       ns = ns->next;
       i++;
@@ -89,11 +89,11 @@ public class GXml.XListNamespaces : Gee.AbstractList<GXml.Namespace>
   }
   public override void clear () {}
   public override bool contains (GXml.Namespace item) {
-    if (!(item is GNamespace)) return false;
+    if (!(item is XNamespace)) return false;
     if (_node == null) return false;
     var ns = _node->ns_def;
     while (ns != null) {
-      if (ns == ((GNamespace) item).get_internal_ns ()) return true;
+      if (ns == ((XNamespace) item).get_internal_ns ()) return true;
     }
     return false;
   }
@@ -130,7 +130,7 @@ public class GXml.XListNamespaces : Gee.AbstractList<GXml.Namespace>
     public int index () { return i; }
     public new void @set (GXml.Namespace item) {}
     // Iterator
-    public new GXml.Namespace @get () { return new GNamespace (_current); }
+    public new GXml.Namespace @get () { return new XNamespace (_current); }
     public bool has_next ()  {
       if (_node->ns_def == null) return false;
       if (_current != null)
diff --git a/gxml/meson.build b/gxml/meson.build
index cae2624..99e6405 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -68,7 +68,6 @@ valasources = files ([
        'GomStringRef.vala',
        'GomText.vala',
        'gxml-init.vala',
-       'GXmlNamespace.vala',
        'GXPathObject.vala',
        'Namespace.vala',
        'NodeType.vala',
@@ -84,6 +83,7 @@ valasources = files ([
        'XHashMapAttr.vala',
        'XListChildren.vala',
        'XListNamespaces.vala',
+       'XNamespace.vala',
        'XNode.vala',
        'XParser.vala',
        'XPath.vala',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]