api/typeparameter.vala \
api/typereference.vala \
api/typesymbol.vala \
- api/visitable.vala \
+ api/browsable.vala \
api/visitor.vala \
content/block.vala \
content/blockcontent.vala \
--- /dev/null
+/* 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);
+}
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; }
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;
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);
}
}
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);
}
}
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);
}
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;
}
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>();
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);
}
}
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);
}
}
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);
}
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
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);
}
}
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);
}
public string? get_package_link (Api.Package package, Settings settings) {
- if (!package.is_visitor_accessible (settings)) {
+ if (!package.is_browsable (settings)) {
return null;
}
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;
}
}
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;
}
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;
}
}
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;
}
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;
}
}
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;
}