[valadoc] libvaladoc/api rename Visitable to Browsable



commit 80f807d1acdf97f76cd057b4ab4c0c06f7d90dc1
Author: Florian Brosch <flo brosch gmail com>
Date:   Sat May 22 14:43:57 2010 +0200

    libvaladoc/api rename Visitable to Browsable

 src/libvaladoc/Makefile.am            |    2 +-
 src/libvaladoc/api/browsable.vala     |   29 +++++++++++++++++++++++++++++
 src/libvaladoc/api/node.vala          |    6 +++---
 src/libvaladoc/api/package.vala       |    2 +-
 src/libvaladoc/api/property.vala      |    4 ++--
 src/libvaladoc/api/symbol.vala        |    2 +-
 src/libvaladoc/api/tree.vala          |    6 +++---
 src/libvaladoc/api/visitable.vala     |    7 +++----
 src/libvaladoc/html/basicdoclet.vala  |    4 ++--
 src/libvaladoc/html/htmlrenderer.vala |    4 ++--
 src/libvaladoc/html/linkhelper.vala   |   14 +++++++-------
 11 files changed, 54 insertions(+), 26 deletions(-)
---
diff --git a/src/libvaladoc/Makefile.am b/src/libvaladoc/Makefile.am
index 63afa96..1d2b52e 100644
--- a/src/libvaladoc/Makefile.am
+++ b/src/libvaladoc/Makefile.am
@@ -67,7 +67,7 @@ libvaladoc_la_VALASOURCES = \
 	api/typeparameter.vala \
 	api/typereference.vala \
 	api/typesymbol.vala \
-	api/visitable.vala \
+	api/browsable.vala \
 	api/visitor.vala \
 	content/block.vala \
 	content/blockcontent.vala \
diff --git a/src/libvaladoc/api/browsable.vala b/src/libvaladoc/api/browsable.vala
new file mode 100644
index 0000000..8bdf500
--- /dev/null
+++ b/src/libvaladoc/api/browsable.vala
@@ -0,0 +1,29 @@
+/* browsable.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+using Gee;
+
+
+public interface Valadoc.Api.Browsable : Item {
+
+	public abstract bool is_browsable (Settings settings);
+}
diff --git a/src/libvaladoc/api/node.vala b/src/libvaladoc/api/node.vala
index 552694f..f936eea 100644
--- a/src/libvaladoc/api/node.vala
+++ b/src/libvaladoc/api/node.vala
@@ -45,7 +45,7 @@ public enum Valadoc.Api.NodeType {
 	TYPE_PARAMETER
 }
 
-public abstract class Valadoc.Api.Node : Item, Visitable, Documentation, Comparable<Node> {
+public abstract class Valadoc.Api.Node : Item, Browsable, Documentation, Comparable<Node> {
 	protected bool do_document { private set; get; default = false; }
 
 	public abstract string? name { owned get; }
@@ -66,7 +66,7 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation, Compara
 
 	public abstract void accept (Visitor visitor);
 
-	public abstract bool is_visitor_accessible (Settings settings);
+	public abstract bool is_browsable (Settings settings);
 
 	public virtual string? get_filename () {
 		return null;
@@ -131,7 +131,7 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation, Compara
 		do_document = true;
 
 		foreach (Node node in per_symbol_children.values) {
-			if (node.is_visitor_accessible (settings)) {
+			if (node.is_browsable (settings)) {
 				node.process_comments (settings, parser);
 			}
 		}
diff --git a/src/libvaladoc/api/package.vala b/src/libvaladoc/api/package.vala
index 7979972..16ddd3c 100644
--- a/src/libvaladoc/api/package.vala
+++ b/src/libvaladoc/api/package.vala
@@ -93,7 +93,7 @@ public class Valadoc.Api.Package : Node {
 		return this.vfiles.contains (source_file);
 	}
 
-	public override bool is_visitor_accessible (Settings settings) {
+	public override bool is_browsable (Settings settings) {
 		return !(this.is_package && settings.with_deps == false);
 	}
 
diff --git a/src/libvaladoc/api/property.vala b/src/libvaladoc/api/property.vala
index b702ee5..ee0b6a7 100644
--- a/src/libvaladoc/api/property.vala
+++ b/src/libvaladoc/api/property.vala
@@ -98,11 +98,11 @@ public class Valadoc.Api.Property : Member {
 	}
 
 	internal override void process_comments (Settings settings, DocumentationParser parser) {
-		if (getter != null && getter.is_visitor_accessible (settings)) {
+		if (getter != null && getter.is_browsable (settings)) {
 			getter.process_comments (settings, parser);
 		}
 
-		if (setter != null && setter.is_visitor_accessible (settings)) {
+		if (setter != null && setter.is_browsable (settings)) {
 			setter.process_comments (settings, parser);
 		}
 
diff --git a/src/libvaladoc/api/symbol.vala b/src/libvaladoc/api/symbol.vala
index 1da6be3..f882784 100644
--- a/src/libvaladoc/api/symbol.vala
+++ b/src/libvaladoc/api/symbol.vala
@@ -52,7 +52,7 @@ public abstract class Valadoc.Api.Symbol : Node {
 		return GLib.Path.get_basename (path);
 	}
 
-	public override bool is_visitor_accessible (Settings settings) {
+	public override bool is_browsable (Settings settings) {
 		if (!settings._private && this.is_private) {
 			return false;
 		}
diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala
index 6bbc44a..d0700f1 100644
--- a/src/libvaladoc/api/tree.vala
+++ b/src/libvaladoc/api/tree.vala
@@ -23,7 +23,7 @@
 using Gee;
 
 // private
-public Valadoc.Api.Class glib_error = null;
+private Valadoc.Api.Class glib_error = null;
 
 public class Valadoc.Api.Tree {
 	private ArrayList<Package> packages = new ArrayList<Package>();
@@ -408,7 +408,7 @@ public class Valadoc.Api.Tree {
 		process_wiki (docparser);
 
 		foreach (Package pkg in this.packages) {
-			if (pkg.is_visitor_accessible (settings)) {
+			if (pkg.is_browsable (settings)) {
 				pkg.process_comments(settings, docparser);
 			}
 		}
@@ -418,7 +418,7 @@ public class Valadoc.Api.Tree {
 		foreach (Package pkg in this.packages) {
 			string? path = (pkg.is_package)? get_external_documentation_path (pkg.name) : null;
 
-			if (pkg.is_visitor_accessible (settings) && path != null) {
+			if (pkg.is_browsable (settings) && path != null) {
 				pkg.import_documentation (path, settings, importer);
 			}
 		}
diff --git a/src/libvaladoc/api/visitable.vala b/src/libvaladoc/api/visitable.vala
index db0d94c..4895a7c 100644
--- a/src/libvaladoc/api/visitable.vala
+++ b/src/libvaladoc/api/visitable.vala
@@ -23,9 +23,8 @@
 using Gee;
 
 
-// Rename to Browsable
-public interface Valadoc.Api.Visitable : Item {
+// Rename to Browsable // Visitable
+public interface Valadoc.Api.Browsable : Item {
 
-	// Rename to is_browsable
-	public abstract bool is_visitor_accessible (Settings settings);
+	public abstract bool is_browsable (Settings settings);
 }
diff --git a/src/libvaladoc/html/basicdoclet.vala b/src/libvaladoc/html/basicdoclet.vala
index 112bab1..25bf418 100755
--- a/src/libvaladoc/html/basicdoclet.vala
+++ b/src/libvaladoc/html/basicdoclet.vala
@@ -404,7 +404,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 	public void write_navi_packages_inline (Api.Tree tree) {
 		writer.start_tag ("ul", {"class", css_navi});
 		foreach (Package pkg in tree.get_package_list()) {
-			if (pkg.is_visitor_accessible (settings)) {
+			if (pkg.is_browsable (settings)) {
 				writer.start_tag ("li", {"class", cssresolver.resolve (pkg)});
 				writer.link (linker.get_package_link (pkg, settings), pkg.name);
 				// brief description
@@ -448,7 +448,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 		var list = new Gee.ArrayList<Api.Node> ();
 
 		foreach (var node in nodes) {
-			if (node.is_visitor_accessible(_settings)) {
+			if (node.is_browsable(_settings)) {
 				list.add (node);
 			}
 		}
diff --git a/src/libvaladoc/html/htmlrenderer.vala b/src/libvaladoc/html/htmlrenderer.vala
index c72c6b3..322dd61 100755
--- a/src/libvaladoc/html/htmlrenderer.vala
+++ b/src/libvaladoc/html/htmlrenderer.vala
@@ -231,8 +231,8 @@ public class Valadoc.Html.HtmlRenderer : ContentRenderer {
 
 	public override void visit_symbol_link (SymbolLink element) {
 		if (element.symbol == _container
-		    || !element.symbol.is_visitor_accessible (_doclet.settings)
-		    || !element.symbol.package.is_visitor_accessible (_doclet.settings)) {
+		    || !element.symbol.is_browsable (_doclet.settings)
+		    || !element.symbol.package.is_browsable (_doclet.settings)) {
 			writer.text (element.label);
 		} else {
 			write_symbol_link (element.symbol, element.label);
diff --git a/src/libvaladoc/html/linkhelper.vala b/src/libvaladoc/html/linkhelper.vala
index 16360c0..704742f 100644
--- a/src/libvaladoc/html/linkhelper.vala
+++ b/src/libvaladoc/html/linkhelper.vala
@@ -40,7 +40,7 @@ public class Valadoc.Html.LinkHelper : Object {
 	}
 
 	public string? get_package_link (Api.Package package, Settings settings) {
-		if (!package.is_visitor_accessible (settings)) {
+		if (!package.is_browsable (settings)) {
 			return null;
 		}
 
@@ -98,7 +98,7 @@ public class Valadoc.Html.LinkHelper : Object {
 
 
 	protected virtual string? from_package_to_package (Api.Package from, Api.Package to) {
-		if (!to.is_visitor_accessible(_settings)) {
+		if (!to.is_browsable(_settings)) {
 			return null;
 		}
 
@@ -118,7 +118,7 @@ public class Valadoc.Html.LinkHelper : Object {
 	}
 
 	protected virtual string? from_package_to_node (Api.Package from, Api.Node to) {
-		if (!to.is_visitor_accessible(_settings) || !to.package.is_visitor_accessible (_settings)) {
+		if (!to.is_browsable(_settings) || !to.package.is_browsable (_settings)) {
 			return null;
 		}
 
@@ -132,7 +132,7 @@ public class Valadoc.Html.LinkHelper : Object {
 
 
 	protected virtual string? from_wiki_to_package (WikiPage from, Api.Package to) {
-		if (!to.is_visitor_accessible(_settings)) {
+		if (!to.is_browsable(_settings)) {
 			return null;
 		}
 
@@ -156,7 +156,7 @@ public class Valadoc.Html.LinkHelper : Object {
 	}
 
 	protected virtual string? from_wiki_to_node (WikiPage from, Api.Node to) {
-		if (!to.is_visitor_accessible(_settings) || !to.package.is_visitor_accessible (_settings)) {
+		if (!to.is_browsable(_settings) || !to.package.is_browsable (_settings)) {
 			return null;
 		}
 
@@ -170,7 +170,7 @@ public class Valadoc.Html.LinkHelper : Object {
 
 
 	protected virtual string? from_node_to_package (Api.Node from, Api.Package to) {
-		if (!to.is_visitor_accessible (_settings)) {
+		if (!to.is_browsable (_settings)) {
 			return null;
 		}
 
@@ -190,7 +190,7 @@ public class Valadoc.Html.LinkHelper : Object {
 	}
 
 	protected virtual string? from_node_to_node (Api.Node from, Api.Node to) {
-		if (!to.is_visitor_accessible(_settings) || !to.package.is_visitor_accessible (_settings)) {
+		if (!to.is_browsable(_settings) || !to.package.is_browsable (_settings)) {
 			return null;
 		}
 



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