From: Florian Brosch Date: Mon, 28 Feb 2011 00:46:36 +0000 (+0100) Subject: libvaladoc/api: Add API documentation for Tree X-Git-Tag: 0.37.1~3^2~362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0ea5d6cc79aa7e6291b33b9bfb1d7709d338af0;p=thirdparty%2Fvala.git libvaladoc/api: Add API documentation for Tree --- diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala index e7ab89675..0073ead9b 100644 --- a/src/libvaladoc/api/tree.vala +++ b/src/libvaladoc/api/tree.vala @@ -27,6 +27,9 @@ using Gee; private Valadoc.Api.Class glib_error = null; +/** + * The root of the code tree. + */ public class Valadoc.Api.Tree { private Deque unbrowsable_documentation_dependencies = new LinkedList(); private ArrayList external_c_files = new ArrayList(); @@ -42,15 +45,28 @@ public class Valadoc.Api.Tree { get; } + /** + * The root of the wiki tree. + */ public WikiPageTree? wikitree { private set; get; } + /** + * Returns a list of C source files. + * + * @return list of C source files + */ public Collection get_external_c_files () { return external_c_files.read_only_view; } + /** + * Returns a list of all packages in the tree + * + * @return list of all packages + */ public Collection get_package_list () { return this.packages.read_only_view; } @@ -71,10 +87,20 @@ public class Valadoc.Api.Tree { } } + /** + * Visits this node with the specified Visitor. + * + * @param visitor the visitor to be called while traversing + */ public void accept (Visitor visitor) { visitor.visit_tree (this); } + /** + * Visits all children of this node with the given types with the specified Visitor. + * + * @param visitor the visitor to be called while traversing + */ public void accept_children (Visitor visitor) { foreach (Node node in packages) { node.accept (visitor); @@ -291,6 +317,11 @@ public class Valadoc.Api.Tree { return null; } + /** + * Adds the specified packages to the list of used packages. + * + * @param packages a list of package names + */ public void add_depencies (string[] packages) { foreach (string package in packages) { if (!add_package (package)) { @@ -299,6 +330,10 @@ public class Valadoc.Api.Tree { } } + /** + * Add the specified source file to the context. Only .vala, .vapi, .gs, + * and .c files are supported. + */ public void add_documented_file (string[] sources) { if (sources == null) { return; @@ -427,6 +462,13 @@ public class Valadoc.Api.Tree { } } + /** + * Import documentation from various sources + * + * @param importers a list of importers + * @param packages sources + * @param import_directories List of directories where to find the files + */ public void import_documentation (DocumentationImporter[] importers, string[] packages, string[] import_directories) { foreach (string pkg_name in packages) { bool imported = false;