]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc/api rename Visitable to Browsable
authorFlorian Brosch <flo.brosch@gmail.com>
Sat, 22 May 2010 12:43:57 +0000 (14:43 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sat, 22 May 2010 12:43:57 +0000 (14:43 +0200)
src/libvaladoc/Makefile.am
src/libvaladoc/api/browsable.vala [new file with mode: 0644]
src/libvaladoc/api/node.vala
src/libvaladoc/api/package.vala
src/libvaladoc/api/property.vala
src/libvaladoc/api/symbol.vala
src/libvaladoc/api/tree.vala
src/libvaladoc/api/visitable.vala
src/libvaladoc/html/basicdoclet.vala
src/libvaladoc/html/htmlrenderer.vala
src/libvaladoc/html/linkhelper.vala

index 63afa96d9278f2a7fa67db39b373f127d704bead..1d2b52ecc1011a91a6b5e346054ab72f6829997e 100644 (file)
@@ -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 (file)
index 0000000..8bdf500
--- /dev/null
@@ -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);
+}
index 552694f8e48589620c24e217723bef4792b52cfd..f936eea5e2b76c401db3f2191853df5276bc46b3 100644 (file)
@@ -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);
                        }
                }
index 7979972cd7c7824a681b455042aea5bf5830322b..16ddd3c35c11c8ed5582bc1f232d785a24953f49 100644 (file)
@@ -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);
        }
 
index b702ee54fdfcf556a230ad07d6beec285e3f870e..ee0b6a77f86732e563f8b59a950abb6441dc063e 100644 (file)
@@ -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);
                }
 
index 1da6be3141d756b626f2b355991c151af56b138f..f882784840d2388e556ae26c9c46141cc7d8e542 100644 (file)
@@ -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;
                }
index 6bbc44a30b84f7b5701a22693f446ecf80e6b978..d0700f163601fa49bf62e2793e81234872bbdbcc 100644 (file)
@@ -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);
                        }
                }
index db0d94c4acd9bac796db8046d5c96f2d5bb01373..4895a7c8850d311c8a5b7bd66bbf9969d38a25a9 100644 (file)
@@ -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);
 }
index 112bab1ebcb140dc83f0635103095833301e8734..25bf418890e74236723d6400d490b18351b85c4e 100755 (executable)
@@ -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);
                        }
                }
index c72c6b3c4ed3ca557788ef2d3bb40eb9c72cb658..322dd61656865f1cad07399381f0654855d53ce2 100755 (executable)
@@ -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);
index 16360c0049c95c378ab51c13da2e3b7ca8149c2c..704742f476264814d8790d8ee909fc2e83e50e2e 100644 (file)
@@ -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;
                }