DirUtils.create ( this.settings.path, 0777 );
- this.langlet = new Valadoc.Html.BasicLanglet ( settings );
this.devhelp = new DevhelpFormat ( settings.pkg_name, "" );
this.write_wiki_pages ( tree, css_path_wiki, Path.build_filename(this.settings.path, this.settings.pkg_name, "content") );
this.write_file_footer ( file );
file = null;
-
- this.langlet = new Valadoc.Html.BasicLanglet ( settings );
-
Gee.Collection<Package> packages = tree.get_package_list ();
foreach ( Package pkg in packages ) {
pkg.visit ( this );
libhtmlhelpers_la_VALASOURCES = \
globals.vala \
- langlet.vala \
doclet.vala \
htmlrenderer.vala \
$(NULL)
using Valadoc.Content;
public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet {
- protected Valadoc.Langlet langlet;
protected Settings settings;
protected HtmlRenderer _renderer;
_renderer.render (doctree);
}
+ private void write_signature ( GLib.FileStream file, Api.Node element , Api.Node? pos ) {
+ _renderer.set_container (pos);
+ _renderer.set_filestream (file);
+ _renderer.render (element.signature);
+ }
+
public void write_navi_packages_inline ( GLib.FileStream file, Tree tree ) {
file.printf ( "<ul class=\"%s\">\n", css_navi );
foreach ( Package pkg in tree.get_package_list() ) {
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_method ( file, m, parent );
+ this.write_signature (file, m, m);
file.printf ( "\n\t\t\t\t</div>\n" );
file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_signal ( sig, file );
+
+ this.write_signature (file, sig, sig);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, sig, sig );
file.puts ( "\t\t\t</div>\n" );
file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_delegate ( del, file );
+
+ this.write_signature (file, del, del);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, del, del );
file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_field ( field, parent, file );
+
+ this.write_signature (file, field, field);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, field, field );
file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_constant ( constant, parent, file );
+
+ this.write_signature (file, constant, constant);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, constant, constant );
file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_property ( prop, file );
+
+ this.write_signature (file, prop, prop);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, prop, prop );
file.puts ( "\t\t\t</div>\n" );
this.write_image_block ( file, cl );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_class ( cl, file );
+
+ this.write_signature (file, cl, cl);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, cl, cl );
this.write_image_block ( file, iface );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_interface ( iface, file );
+
+ this.write_signature (file, iface, iface);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, iface, iface );
file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
- this.langlet.write_struct ( stru, file );
+
+ this.write_signature (file, stru, stru);
+
file.printf ( "\n\t\t\t\t</div>\n" );
this.write_documentation ( file, stru, stru );
}
public override void visit_symbol_link (SymbolLink element) {
- write_symbol_link (element.symbol, element.label);
+ if (element.symbol == _container
+ || !element.symbol.is_visitor_accessible (_doclet.settings)
+ || !element.symbol.package.is_visitor_accessible (_doclet.settings)) {
+ _stream.printf (element.label);
+ } else {
+ write_symbol_link (element.symbol, element.label);
+ }
}
public override void visit_list (Content.List element) {
public override void visit_run (Run element) {
string tag = null;
+ string css_type = null;
switch (element.style) {
case Run.Style.BOLD:
tag = "b";
case Run.Style.STROKE:
tag = "stroke";
break;
+ case Run.Style.LANG_KEYWORD:
+ tag = "span";
+ css_type = "main_keyword";
+ break;
+ case Run.Style.LANG_LITERAL:
+ tag = "span";
+ css_type = "main_optional_parameter";
+ break;
+ case Run.Style.LANG_TYPE:
+ tag = "span";
+ css_type = "main_basic_type";
+ break;
}
if (tag != null) {
- _stream.printf ("<%s>", tag);
+ _stream.printf ("<%s%s>", tag, css_type != null ? " class=\"" + css_type + "\"" : "");
}
element.accept_children (this);
if (tag != null) {
+++ /dev/null
-/*
- * Valadoc - a documentation tool for vala.
- * Copyright (C) 2008 Florian Brosch
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-
-using GLib;
-using Gee;
-
-
-public class Valadoc.Html.BasicLanglet : Valadoc.Langlet {
- public Valadoc.Settings settings {
- construct set;
- protected get;
- }
-
- public BasicLanglet ( Settings settings ) {
- this.settings = settings;
- }
-
- private Api.Node position = null;
-
- private string get_link ( Api.Node element, Api.Node? position ) {
- return get_html_link ( this.settings, element, position );
- }
-
- private inline bool is_basic_type ( string name ) {
- string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
- "long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
- "uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
- };
-
- foreach ( string str in basic_types ) {
- if ( str == name )
- return true;
- }
-
- return false;
- }
-
- private void write_type_name ( Api.Node? datatype, GLib.FileStream file ) {
- if ( datatype == null ) {
- file.printf ( "<font class=\"%s\">void</font>", css_keyword );
- return ;
- }
-
- string typename = datatype.full_name ();
- if ( ((Api.Node)datatype.parent).name == null && (datatype is Class || datatype is Struct) ) {
- if ( this.is_basic_type ( typename ) ) {
- string link = this.get_link(datatype, this.position );
- if ( link == null )
- file.printf ( "<span class=\"%s\">%s</span>", css_basic_type, typename );
- else
- file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_basic_type, link, typename );
- return ;
- }
- }
-
- string link = this.get_link(datatype, this.position);
- if ( link == null )
- file.printf ( "<span class=\"%s\">%s</span>", css_other_type, typename );
- else
- file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_other_type, link, typename );
- }
-
- private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
- Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
- int size = arglst.size;
- if ( size == 0 )
- return ;
-
- file.puts ( "<" );
- int i = 0;
-
- foreach ( TypeReference arg in arglst ) {
- i++;
-
- this.write_nested_type_referene ( arg, file );
- if ( i != size )
- file.puts ( ", " );
- }
-
- file.puts ( ">" );
- }
-
- private void write_type ( Api.Item? type, Api.Node? pos, GLib.FileStream file ) {
- if ( type == null ) {
- file.printf ( "<font class=\"%s\">void</font>", css_keyword );
- }
- else if ( type is Api.Node ) {
- Api.Node dtype = (Api.Node)type;
- weak string css = (dtype.package.name == "glib-2.0" && ((Api.Node)dtype.parent).name == null)? css_basic_type : css_other_type;
- string? link = this.get_link ( dtype, pos );
- if ( link == null)
- file.printf ( "<font class=\"%s\">%s</font>", css, dtype.name );
- else
- file.printf ( "<a href=\"%s\"><font class=\"%s\">%s</font></a>", link, css, dtype.name );
- }
- else if ( type is Pointer ) {
- this.write_pointer ( (Pointer)type, file, pos );
- }
- else if ( type is Array ) {
- this.write_array ( (Array)type, file, pos );
- }
- else if ( type is TypeParameter ) {
- this.write_type_parameter ( (TypeParameter)type, file );
- }
- else {
- this.write_type_reference ( (TypeReference)type, file );
- }
- }
-
- public override void write_pointer ( Pointer ptr, void* fptr, Api.Node pos ) {
- weak GLib.FileStream file = (GLib.FileStream)fptr;
- Api.Item type = ptr.data_type;
- this.write_type ( type, pos, file );
- file.putc ( '*' );
- }
-
- public override void write_array ( Array arr, void* fptr, Api.Node pos ) {
- weak GLib.FileStream file = (GLib.FileStream)fptr;
- Api.Item type =arr.data_type;
- this.write_type ( type, pos, file );
- file.puts ( "[]" );
- }
-
- //TODO: pos-parameter (-> this.write_type (?, pos, ?))
- private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
- if ( type_reference.type_name == null )
- return ;
-
- // type-modifiers:
- GLib.StringBuilder modifiers = new GLib.StringBuilder ();
- if ( type_reference.is_dynamic )
- modifiers.append ( "dynamic " );
-
- if ( type_reference.is_weak )
- modifiers.append ( "weak " );
- else if ( type_reference.is_unowned )
- modifiers.append ( "unowned " );
- else if ( type_reference.is_owned )
- modifiers.append ( "owned " );
-
- if ( modifiers.len > 0 )
- file.printf ( "<font class=\"%s\">%s</font> ", css_keyword, modifiers.str );
-
- modifiers = null;
-
- Api.Item? type = type_reference.data_type;
- this.write_type ( type, this.position, file ); //TODO: this.position -> pos-parameter
- this.write_type_reference_template_arguments ( type_reference, file );
- }
-
- public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.write_nested_type_referene ( type_reference, file );
- }
-
- public override void write_formal_parameter ( FormalParameter param, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- if ( param.ellipsis ) {
- file.puts ( " ..." );
- }
- else {
- if ( param.is_out )
- file.printf ( "<span class=\"%s\">out</span> ", css_keyword );
- else if ( param.is_ref )
- file.printf ( "<span class=\"%s\">ref</span> ", css_keyword );
-
- this.write_type_reference ( param.type_reference, file );
- file.printf ( " %s", param.name );
- }
- }
-
- public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- bool open_bracket = false;
-
- Gee.List<FormalParameter> params = thandler.param_list;
- int size = params.size;
- int i = 0;
-
- file.putc ( '(' );
-
- foreach ( FormalParameter param in params ) {
- i++;
-
- if ( param.has_default_value == true && open_bracket == false ) {
- file.printf ( "<span class=\"%s\">[", css_optional_parameter );
- open_bracket = true;
- }
-
- this.write_formal_parameter ( param, file );
- if ( i != size ) {
- file.puts ( ", " );
- }
- else if ( open_bracket == true ) {
- file.puts ( "]</span>" );
- }
- }
-
- file.putc ( ')' );
- }
-
- private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
- Gee.Collection<Api.Node> error_domains = exception_handler.get_error_domains ();
- int size = error_domains.size;
- int i = 1;
-
- if ( size == 0 )
- return ;
-
- file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
-
- foreach ( Api.Node type in error_domains ) {
- this.write_type_name ( type, file );
- if ( error_domains.size > i ) {
- file.puts ( ", " );
- }
- i++;
- }
- }
-
- public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
- this.position = m;
-
- GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- this.write_accessor ( m, file );
-
- if ( m.is_abstract )
- modifiers.append ( " abstract" );
- else if ( m.is_virtual )
- modifiers.append ( " virtual" );
- else if ( m.is_override )
- modifiers.append ( " override" );
- if ( m.is_static )
- modifiers.append ( " static" );
- if ( m.is_inline )
- modifiers.append ( " inline" );
-
- file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
- if ( m.is_constructor == false ) {
- this.write_type_reference ( m.type_reference, file );
- }
- file.printf ( " %s ", m.name );
- this.write_parameter_list ( m, file );
-
- if ( m.is_yields )
- file.printf ( " <span class=\"%s\">yields</span> ", css_keyword );
-
- this.write_exception_list ( m, file );
- }
-
- public override void write_type_parameter ( TypeParameter param, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- file.puts ( param.name );
- }
-
- public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- int i = 1;
-
- var lst = thandler.get_template_param_list( );
- if ( lst.size == 0 )
- return ;
-
- file.puts ( "<" ); // <
-
- foreach ( TypeParameter param in lst ) {
- param.write ( this, file );
- if ( lst.size > i )
- file.puts ( ", " );
-
- i++;
- }
- file.puts ( ">" ); // >
- }
-
- public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
- this.position = field;
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- this.write_accessor ( field, file );
-
- if ( field.is_volatile ) {
- file.printf ( " <span class=\"%s\">volatile</span> ", css_keyword );
- }
-
- if ( field.is_static ) {
- file.printf ( " <span class=\"%s\">static</span> ", css_keyword );
- }
-
- this.write_type_reference ( field.type_reference, file );
- file.printf ( " %s ", field.name );
- }
-
- public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
- this.position = constant;
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- this.write_accessor ( constant, file );
- file.printf ( " <span class=\"%s\"> const </span>", css_keyword );
- this.write_type_reference ( constant.type_reference, file );
- file.printf ( " %s ", constant.name );
- }
-
- public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- Property prop = (Property)propac.parent;
-
- file.printf ( "<span class=\"%s\">", css_keyword );
-
- if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
- // FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
- if ( propac.is_public )
- file.puts ( "public " );
- else if ( propac.is_protected )
- file.puts ( "protected " );
- else if ( propac.is_private )
- file.puts ( "private " );
- else if ( propac.is_internal )
- file.puts ( "internal " );
- }
-
- if ( propac.is_owned )
- file.puts ( "owned " );
-
- if ( propac.is_get )
- file.puts ( "get" );
- else if ( propac.is_set )
- file.puts ( "set" );
-
- file.puts ( "</span>;" );
- }
-
- public override void write_property ( Valadoc.Property prop, void* ptr ) {
- this.position = prop;
- GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- this.write_accessor ( prop, file );
-
- if ( prop.is_virtual )
- modifiers.append ( " virtual " );
- else if ( prop.is_abstract )
- modifiers.append ( " abstract " );
- else if ( prop.is_override )
- modifiers.append ( " override " );
-
- if ( modifiers.len > 0 )
- file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
-
- this.write_type_reference ( prop.type_reference, file );
- file.printf ( " %s { ", prop.name );
-
- if ( prop.setter != null )
- this.write_property_accessor ( prop.setter, file );
-
-
- file.printf ( " " );
-
- if ( prop.getter != null )
- this.write_property_accessor ( prop.getter, file );
-
- file.printf ( " }" );
- }
-
- public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.position = sig;
-
- this.write_accessor ( sig, file );
-
- file.printf ( " <span class=\"%s\">", css_keyword );
-
- if ( sig.is_virtual == true )
- file.printf ( "virtual " );
-
- file.printf ( "signal</span> " );
-
- this.write_type_reference ( sig.type_reference, file );
- file.printf ( " %s ", sig.name );
- this.write_parameter_list ( sig, file );
- }
-
- public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
- }
-
- public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
- }
-
- public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.position = del;
-
- this.write_accessor ( del, file );
-
- file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
- this.write_type_reference ( del.type_reference, file );
- file.printf ( " %s ", del.name );
- this.write_parameter_list ( del, file );
- this.write_exception_list ( del, file );
- }
-
- public override void write_enum ( Valadoc.Enum en, void* ptr ) {
- }
-
- public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
- }
-
- private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.FileStream file ) {
- if ( element.is_public )
- file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
- else if ( element.is_protected )
- file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
- else if ( element.is_private )
- file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
- else if ( element.is_internal )
- file.printf ( "<span class=\"%s\">internal</span> ", css_keyword );
- }
-
-
- public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.position = stru;
-
- this.write_accessor ( stru, file );
- file.printf ( "<span class=\"%s\">struct</span> %s", css_keyword, stru.name );
- this.write_template_parameters ( stru, ptr );
- this.write_inheritance_list ( stru, file );
- }
-
- public override void write_inheritance_list ( Api.Node dtype, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
-
- Gee.Collection<Interface> lst = null;
- Api.Node? base_type = null;
- int size = 0;
- int i = 1;
-
- if (dtype is Class) {
- lst = ((Class)dtype).get_implemented_interface_list ();
- base_type = ((Class)dtype).base_type;
- size = lst.size;
- }
- else if (dtype is Interface) {
- lst = ((Interface)dtype).get_implemented_interface_list ();
- base_type = ((Interface)dtype).base_type;
- size = lst.size;
- }
- else if (dtype is Struct) {
- base_type = ((Struct)dtype).base_type;
- }
-
-
- if ( size == 0 && base_type == null )
- return ;
-
- file.puts ( " : " );
-
- if ( base_type != null ) {
- this.write_type_name ( (Api.Node)base_type, file );
- if ( size > 0 ) {
- file.puts ( ", " );
- }
- }
-
- if (lst != null) {
- foreach ( Interface cntype in lst ) {
- this.write_type_name ( cntype, file );
- if ( size > i )
- file.puts ( ", " );
-
- i++;
- }
- }
- file.putc ( ' ' );
- }
-
- public override void write_class ( Valadoc.Class cl, void* ptr ) {
- GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.position = cl;
-
- this.write_accessor ( cl, file );
-
- if ( cl.is_abstract )
- modifiers.append ( "abstract " );
-
- file.printf ( "<span class=\"%s\">%s class</span> %s", css_keyword, modifiers.str, cl.name );
-
- this.write_template_parameters ( cl, file );
- this.write_inheritance_list ( cl, file );
- }
-
- public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
- weak GLib.FileStream file = (GLib.FileStream)ptr;
- this.position = iface;
-
- this.write_accessor ( iface, file );
-
- file.printf ( "<span class=\"%s\">interface</span> %s", css_keyword, iface.name );
-
- this.write_template_parameters ( iface, ptr );
- this.write_inheritance_list ( iface, file );
- }
-
- public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
- }
-
- public override void write_file ( Valadoc.Package file, void* ptr ) {
- }
-}
-
-
[CCode (cheader_filename = "libhtmlhelpers-1.0.h")]
public abstract class BasicDoclet : Valadoc.Doclet {
protected Valadoc.Html.HtmlRenderer _renderer;
- protected Valadoc.Langlet langlet;
protected Valadoc.Settings settings;
public BasicDoclet ();
protected void fetch_subnamespace_names (Valadoc.NamespaceHandler pos, Gee.ArrayList<Valadoc.Namespace> lst);
protected void write_wiki_pages (Valadoc.Tree tree, string css_path_wiki, string contentp);
}
[CCode (cheader_filename = "libhtmlhelpers-1.0.h")]
- public class BasicLanglet : Valadoc.Langlet {
- public BasicLanglet (Valadoc.Settings settings);
- public override void write_array (Valadoc.Array arr, void* fptr, Valadoc.Api.Node pos);
- public override void write_class (Valadoc.Class cl, void* ptr);
- public override void write_constant (Valadoc.Constant constant, Valadoc.ConstantHandler parent, void* ptr);
- public override void write_delegate (Valadoc.Delegate del, void* ptr);
- public override void write_enum (Valadoc.Enum en, void* ptr);
- public override void write_enum_value (Valadoc.EnumValue enval, void* ptr);
- public override void write_error_code (Valadoc.ErrorCode errcode, void* ptr);
- public override void write_error_domain (Valadoc.ErrorDomain errdom, void* ptr);
- public override void write_field (Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr);
- public override void write_file (Valadoc.Package file, void* ptr);
- public override void write_formal_parameter (Valadoc.FormalParameter param, void* ptr);
- public override void write_inheritance_list (Valadoc.Api.Node dtype, void* ptr);
- public override void write_interface (Valadoc.Interface iface, void* ptr);
- public override void write_method (void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent);
- public override void write_namespace (Valadoc.Namespace ns, void* ptr);
- public override void write_parameter_list (Valadoc.ParameterListHandler thandler, void* ptr);
- public override void write_pointer (Valadoc.Pointer ptr, void* fptr, Valadoc.Api.Node pos);
- public override void write_property (Valadoc.Property prop, void* ptr);
- public override void write_property_accessor (Valadoc.PropertyAccessor propac, void* ptr);
- public override void write_signal (Valadoc.Signal sig, void* ptr);
- public override void write_struct (Valadoc.Struct stru, void* ptr);
- public override void write_template_parameters (Valadoc.TemplateParameterListHandler thandler, void* ptr);
- public override void write_type_parameter (Valadoc.TypeParameter param, void* ptr);
- public override void write_type_reference (Valadoc.TypeReference type_reference, void* ptr);
- public Valadoc.Settings settings { get; set construct; }
- }
- [CCode (cheader_filename = "libhtmlhelpers-1.0.h")]
public class HtmlRenderer : Valadoc.Content.ContentRenderer {
public HtmlRenderer (Valadoc.Html.BasicDoclet doclet);
public override void render (Valadoc.Content.ContentElement element);
drawer.vala \
errorreporter.vala \
filehelper.vala \
- langlet.vala \
moduleloader.vala \
settings.vala \
documentation/commentscanner.vala \
apitree/returntypehandler.vala \
apitree/signal.vala \
apitree/signalhandler.vala \
+ apitree/signaturebuilder.vala \
apitree/struct.vala \
apitree/structhandler.vala \
apitree/symbolaccessibility.vala \
public abstract class Valadoc.Api.Item : Object {
+ private Inline _signature;
+
public Api.Item parent {
protected set;
get;
protected virtual void process_comments (Settings settings, DocumentationParser parser) {
}
+
+ public Inline signature {
+ get {
+ if (_signature == null) {
+ _signature = build_signature ();
+ }
+ return _signature;
+ }
+ }
+
+ protected abstract Inline build_signature ();
}
return symbol.access == Vala.SymbolAccessibility.PRIVATE;
}
}
+
+ protected string get_accessibility_modifier () {
+ if (is_public) {
+ return "public";
+ } else if (is_protected) {
+ return "protected";
+ } else if (is_internal) {
+ return "internal";
+ } else {
+ return "private";
+ }
+ }
}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Array : Api.Item {
private Vala.ArrayType vtype;
}
}
- public void write (Langlet langlet, void* ptr, Api.Node parent) {
- langlet.write_array (this, ptr, parent);
- }
-
protected override void resolve_type_references (Tree root) {
if (this.data_type == null) {
/*TODO:possible?*/;
((TypeReference)this.data_type).resolve_type_references (root);
}
}
-}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_content (data_type.signature)
+ .append ("[]", false)
+ .get ();
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, SignalHandler, MethodHandler, EnumHandler, PropertyHandler, ConstructionMethodHandler, FieldHandler, DelegateHandler, ConstantHandler, TemplateParameterListHandler {
- private ArrayList<Interface> interfaces;
+ private ArrayList<TypeReference> interfaces;
private Vala.Class vclass;
public Class (Vala.Class symbol, Api.Node parent) {
base (symbol, parent);
- this.interfaces = new ArrayList<Interface> ();
+ this.interfaces = new ArrayList<TypeReference> ();
this.vclass = symbol;
}
}
- protected Class? base_type {
+ protected TypeReference? base_type {
private set;
get;
}
return this.vclass.get_cname();
}
- public Collection<Interface> get_implemented_interface_list () {
+ public Collection<TypeReference> get_implemented_interface_list () {
return this.interfaces;
}
return this.vclass == vcl;
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_class (this, ptr);
- }
-
public bool is_abstract {
get {
return this.vclass.is_abstract;
}
foreach (Vala.DataType vtyperef in lst) {
- Api.Item? element = root.search_vala_symbol (vtyperef.data_type);
- if (element is Class) {
- this.base_type = (Class)element;
- }
- else {
- this.interfaces.add ((Interface)element);
+ var inherited = new TypeReference (vtyperef, this);
+ inherited.resolve_type_references (root);
+
+ if (inherited.data_type is Class) {
+ this.base_type = inherited;
+ } else {
+ this.interfaces.add (inherited);
}
}
}
base.resolve_type_references (root);
}
-}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_abstract) {
+ signature.append_keyword ("abstract");
+ }
+ signature.append_keyword ("class");
+ signature.append_symbol (this);
+
+ var type_parameters = get_children_by_type (Api.NodeType.TYPE_PARAMETER, false);
+ if (type_parameters.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_parameters) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+
+ bool first = true;
+ if (base_type != null) {
+ signature.append (":");
+
+ signature.append_content (base_type.signature);
+ first = false;
+ }
+
+ if (interfaces.size > 0) {
+ if (first) {
+ signature.append (":");
+ }
+
+ foreach (Api.Item implemented_interface in interfaces) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (implemented_interface.signature);
+ first = false;
+ }
+ }
+
+ return signature.get ();
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Constant : Api.MemberNode, ReturnTypeHandler {
private Vala.Constant vconst;
this.set_return_type_references (root);
}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_keyword (get_accessibility_modifier ())
+ .append_keyword ("const")
+ .append_content (type_reference.signature)
+ .append_symbol (this)
+ .get ();
+ }
+
public void visit (Doclet doclet, ConstantHandler? parent) {
doclet.visit_constant (this, parent);
}
public override void accept (Doclet doclet) {
visit (doclet, (ConstantHandler)parent);
}
-
- public void write (Langlet langlet, void* ptr, ConstantHandler parent) {
- langlet.write_constant (this, parent, ptr);
- }
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Delegate : Api.TypeSymbolNode, ParameterListHandler, ReturnTypeHandler, TemplateParameterListHandler, ExceptionHandler {
private Vala.Delegate vdelegate;
var vexceptionlst = this.vdelegate.get_error_types ();
this.add_exception_list (root, vexceptionlst);
+
+ base.resolve_type_references (root);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_delegate (this, ptr);
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_static) {
+ signature.append_keyword ("static");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append_symbol (this);
+
+ var type_parameters = get_children_by_type (Api.NodeType.TYPE_PARAMETER);
+ if (type_parameters.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_parameters) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+
+ signature.append ("(");
+
+ bool first = true;
+ foreach (Api.Node param in get_children_by_type (Api.NodeType.FORMAL_PARAMETER)) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, !first);
+ first = false;
+ }
+
+ signature.append (")", false);
+
+ var exceptions = get_children_by_type (Api.NodeType.ERROR_DOMAIN);
+ if (exceptions.size > 0) {
+ signature.append_keyword ("throws");
+
+ foreach (Api.Node param in exceptions) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, !first);
+ first = false;
+ }
+ }
+
+ return signature.get ();
}
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Enum : Api.TypeSymbolNode, MethodHandler {
public Enum (Vala.Enum symbol, Api.Node parent) {
private Vala.Enum venum;
- public void write (Langlet langlet, void* ptr) {
- langlet.write_enum (this, ptr);
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_keyword (get_accessibility_modifier ())
+ .append_keyword ("enum")
+ .append_symbol (this)
+ .get ();
}
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.EnumValue: Api.SymbolNode {
private Vala.EnumValue venval;
return this.venval == venval;
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_enum_value (this, ptr);
- }
-
public void visit (Doclet doclet) {
doclet.visit_enum_value (this);
}
public override void accept (Doclet doclet) {
visit (doclet);
}
-}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_symbol (this)
+ .append ("=")
+ .append (this.venval.value.to_string ())
+ .get ();
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.ErrorCode : Api.TypeSymbolNode {
private Vala.ErrorCode verrcode;
return this.verrcode == verrcode;
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_error_code (this, ptr);
- }
-
public void visit (Doclet doclet) {
doclet.visit_error_code (this);
}
public override void accept (Doclet doclet) {
visit (doclet);
}
-}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_symbol (this)
+ .get ();
+ }
+}
*/
using Gee;
+using Valadoc.Content;
public class Valadoc.ErrorDomain : Api.TypeSymbolNode, MethodHandler {
visit (doclet);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_error_domain (this, ptr);
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_keyword (get_accessibility_modifier ())
+ .append_keyword ("errordomain")
+ .append_symbol (this)
+ .get ();
}
}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Field : Api.MemberNode, ReturnTypeHandler {
private Vala.Field vfield;
base.resolve_type_references (root);
}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_static) {
+ signature.append_keyword ("static");
+ }
+ if (is_volatile) {
+ signature.append_keyword ("volatile");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append_symbol (this);
+ return signature.get ();
+ }
+
public void visit (Doclet doclet, FieldHandler? parent) {
doclet.visit_field (this, parent);
}
public override void accept (Doclet doclet) {
visit (doclet, (FieldHandler) parent);
}
-
- public void write (Langlet langlet, void* ptr, FieldHandler parent) {
- langlet.write_field (this, parent, ptr);
- }
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.FormalParameter : Api.SymbolNode, ReturnTypeHandler {
private Vala.FormalParameter vformalparam;
base.resolve_type_references (root);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_formal_parameter (this, ptr);
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ if (ellipsis) {
+ signature.append ("...");
+ } else {
+ if (is_out) {
+ signature.append_keyword ("out");
+ } else if (is_ref) {
+ signature.append_keyword ("ref");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append (name);
+
+ if (has_default_value) {
+ signature.append ("=");
+ signature.append (this.vformalparam.default_expression.to_string ());
+ }
+ }
+
+ return signature.get ();
}
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler, MethodHandler, DelegateHandler, EnumHandler, StructHandler, ClassHandler {
public Interface (Vala.Interface symbol, Api.Node parent) {
this.vinterface = symbol;
}
- private ArrayList<Interface> interfaces = new ArrayList<Interface> ();
+ private ArrayList<TypeReference> interfaces = new ArrayList<TypeReference> ();
- public Collection<Interface> get_implemented_interface_list () {
+ public Collection<TypeReference> get_implemented_interface_list () {
return this.interfaces;
}
return this.vinterface.get_cname ();
}
- protected Class? base_type {
+ protected TypeReference? base_type {
private set;
get;
}
visit (doclet);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_interface (this, ptr);
- }
-
private void set_prerequisites (Tree root, Vala.Collection<Vala.DataType> lst) {
if (this.interfaces.size != 0) {
return;
}
foreach (Vala.DataType vtyperef in lst) {
- Api.Item? element = root.search_vala_symbol (vtyperef.data_type);
- if (element is Class) {
- this.base_type = (Class)element;
+ var inherited = new TypeReference (vtyperef, this);
+ inherited.resolve_type_references (root);
+
+ if (inherited.data_type is Class) {
+ this.base_type = inherited;
} else {
- this.interfaces.add ((Interface)element);
+ this.interfaces.add (inherited);
}
}
}
base.resolve_type_references (root);
}
-}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ signature.append_keyword ("interface");
+ signature.append_symbol (this);
+
+ var type_parameters = get_children_by_type (Api.NodeType.TYPE_PARAMETER, false);
+ if (type_parameters.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_parameters) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+ bool first = true;
+ if (base_type != null) {
+ signature.append (":");
+
+ signature.append_content (base_type.signature);
+ first = false;
+ }
+
+ if (interfaces.size > 0) {
+ if (first) {
+ signature.append (":");
+ }
+
+ foreach (Api.Item implemented_interface in interfaces) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (implemented_interface.signature);
+ first = false;
+ }
+ }
+
+ return signature.get ();
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler, ReturnTypeHandler {
private Vala.Method vmethod;
base.resolve_type_references (root);
}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_static) {
+ signature.append_keyword ("static");
+ } else if (is_abstract) {
+ signature.append_keyword ("abstract");
+ } else if (is_override) {
+ signature.append_keyword ("override");
+ } else if (is_virtual) {
+ signature.append_keyword ("virtual");
+ }
+ if (is_inline) {
+ signature.append_keyword ("inline");
+ }
+ if (is_yields) {
+ signature.append_keyword ("async");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append_symbol (this);
+
+ var type_parameters = get_children_by_type (Api.NodeType.TYPE_PARAMETER, false);
+ if (type_parameters.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_parameters) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+
+ signature.append ("(");
+
+ bool first = true;
+ foreach (Api.Node param in get_children_by_type (Api.NodeType.FORMAL_PARAMETER)) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, !first);
+ first = false;
+ }
+
+ signature.append (")", false);
+
+ var exceptions = get_children_by_type (Api.NodeType.ERROR_DOMAIN);
+ if (exceptions.size > 0) {
+ signature.append_keyword ("throws");
+
+ foreach (Api.Node param in exceptions) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, !first);
+ first = false;
+ }
+ }
+
+ return signature.get ();
+ }
+
public void visit (Doclet doclet, Valadoc.MethodHandler in_type) {
doclet.visit_method (this, in_type);
}
public override void accept (Doclet doclet) {
visit (doclet, (MethodHandler) parent);
}
-
- public void write (Langlet langlet, void* ptr, Valadoc.MethodHandler parent) {
- langlet.write_method (ptr, this, parent);
- }
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Namespace : Api.SymbolNode, MethodHandler, FieldHandler, NamespaceHandler, ErrorDomainHandler,
EnumHandler, ClassHandler, StructHandler, InterfaceHandler,
base.process_comments (settings, parser);
}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_keyword (get_accessibility_modifier ())
+ .append_keyword ("namespace")
+ .append_symbol (this)
+ .get ();
+ }
+
public void visit (Doclet doclet) {
doclet.visit_namespace (this);
}
internal bool is_vnspace (Vala.Namespace vns) {
return this.vnspace == vns;
}
-
- public void write (Langlet langlet, void* ptr) {
- langlet.write_namespace (this, ptr);
- }
}
-
-
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Package : Api.Node, NamespaceHandler {
private ArrayList<Vala.SourceFile> vfiles = new ArrayList<Vala.SourceFile> ();
visit (doclet);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_file (this, ptr);
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_keyword ("package")
+ .append (name)
+ .get ();
}
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Pointer : Api.Item {
private Vala.PointerType vtype;
}
}
- public void write (Langlet langlet, void* ptr, Api.Node parent) {
- langlet.write_pointer (this, ptr, parent);
- }
-
protected override void resolve_type_references (Tree root) {
Api.Item type = this.data_type;
if (type == null) {
((TypeReference) type).resolve_type_references (root);
}
}
-}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append_content (data_type.signature)
+ .append ("*", false)
+ .get ();
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
private Vala.Property vproperty;
get;
}
-
protected override void resolve_type_references (Tree root) {
Vala.Property? vp = null;
if (vproperty.base_property != null) {
this.set_return_type_references (root);
}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_abstract) {
+ signature.append_keyword ("abstract");
+ } else if (is_override) {
+ signature.append_keyword ("override");
+ } else if (is_virtual) {
+ signature.append_keyword ("virtual");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append_symbol (this);
+ signature.append ("{");
+
+ if (setter != null) {
+ signature.append_content (setter.signature);
+ }
+
+ if (getter != null) {
+ signature.append_content (getter.signature);
+ }
+
+ signature.append ("}");
+
+ return signature.get ();
+ }
+
public void visit (Doclet doclet) {
doclet.visit_property (this);
}
public override void accept (Doclet doclet) {
visit (doclet);
}
-
- public void write (Langlet langlet, void* ptr) {
- langlet.write_property (this, ptr);
- }
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.PropertyAccessor : Api.SymbolNode {
private Vala.PropertyAccessor vpropacc;
}
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_property_accessor (this, ptr);
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ if (!is_public) {
+ signature.append_keyword (get_accessibility_modifier ());
+ }
+ if (is_set || is_construct) {
+ if (is_construct) {
+ signature.append_keyword ("construct");
+ }
+ if (is_set) {
+ signature.append_keyword ("set");
+ }
+ } else if (is_get) {
+ if (is_owned) {
+ signature.append_keyword ("owned");
+ }
+ signature.append_keyword ("get");
+ }
+
+ return signature.get ();
}
}
-
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Signal : Api.MemberNode, ParameterListHandler, ReturnTypeHandler {
private Vala.Signal vsignal;
}
}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ if (is_virtual) {
+ signature.append_keyword ("virtual");
+ }
+
+ signature.append_content (type_reference.signature);
+ signature.append_symbol (this);
+ signature.append ("(");
+
+ bool first = true;
+ foreach (Api.Node param in get_children_by_type (Api.NodeType.FORMAL_PARAMETER)) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, !first);
+ first = false;
+ }
+
+ signature.append (")", false);
+
+ return signature.get ();
+ }
+
public void visit (Doclet doclet) {
doclet.visit_signal (this);
}
public override void accept (Doclet doclet) {
visit (doclet);
}
-
- public void write (Langlet langlet, void* ptr) {
- langlet.write_signal (this, ptr);
- }
}
-
--- /dev/null
+/* signaturebuilder.vala
+ *
+ * Valadoc - a documentation tool for vala.
+ * Copyright (C) 2008 Florian Brosch
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
+ */
+
+using Valadoc.Content;
+
+public class Valadoc.Api.SignatureBuilder {
+ private Run run;
+ private Inline last_appended;
+
+ public SignatureBuilder () {
+ run = new Run (Run.Style.NONE);
+ }
+
+ private void append_text (string text) {
+ if (last_appended is Text) {
+ ((Text) last_appended).content += text;
+ } else {
+ run.content.add (last_appended = new Text (text));
+ }
+ }
+
+ public SignatureBuilder append (string text, bool spaced = true) {
+ string content = (last_appended != null && spaced ? " " : "") + text;
+ append_text (content);
+ return this;
+ }
+
+ public SignatureBuilder append_content (Inline content, bool spaced = true) {
+ if (last_appended != null && spaced) {
+ append_text (" ");
+ }
+ run.content.add (last_appended = content);
+ return this;
+ }
+
+ public SignatureBuilder append_keyword (string keyword, bool spaced = true) {
+ Run inner = new Run (Run.Style.LANG_KEYWORD);
+ inner.content.add (new Text (keyword));
+ return append_content (inner, spaced);
+ }
+
+ public SignatureBuilder append_symbol (Node node, bool spaced = true) {
+ Run inner = new Run (Run.Style.NONE);
+ inner.content.add (new SymbolLink (node, node.name));
+ return append_content (inner, spaced);
+ }
+
+ public SignatureBuilder append_type (Node node, bool spaced = true) {
+ Run inner = new Run (Run.Style.LANG_TYPE);
+ inner.content.add (new SymbolLink (node, node.name));
+ return append_content (inner, spaced);
+ }
+
+ public SignatureBuilder append_type_name (string name, bool spaced = true) {
+ Run inner = new Run (Run.Style.LANG_TYPE);
+ inner.content.add (new Text (name));
+ return append_content (inner, spaced);
+ }
+
+ public SignatureBuilder append_literal (string literal, bool spaced = true) {
+ Run inner = new Run (Run.Style.LANG_LITERAL);
+ inner.content.add (new Text (literal));
+ return append_content (inner, spaced);
+ }
+
+ public new Run get () {
+ return run;
+ }
+}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.Struct : Api.TypeSymbolNode, MethodHandler, ConstructionMethodHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler {
private Vala.Struct vstruct;
this.vstruct = symbol;
}
- protected Struct? base_type {
+ protected TypeReference? base_type {
protected set;
get;
}
visit (doclet);
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_struct (this, ptr);
- }
-
private void set_parent_references (Tree root) {
Vala.ValueType? basetype = this.vstruct.base_type as Vala.ValueType;
if (basetype == null) {
return ;
}
- this.base_type = (Struct?) root.search_vala_symbol ((Vala.Struct) basetype.type_symbol);
+ this.base_type = new TypeReference (basetype, this);
+ this.base_type.resolve_type_references (root);
}
protected override void resolve_type_references (Tree root) {
base.resolve_type_references (root);
}
-}
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ signature.append_keyword (get_accessibility_modifier ());
+ signature.append_keyword ("struct");
+ signature.append_symbol (this);
+
+ var type_parameters = get_children_by_type (Api.NodeType.TYPE_PARAMETER, false);
+ if (type_parameters.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_parameters) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+
+ if (base_type != null) {
+ signature.append (":");
+
+ signature.append_content (base_type.signature);
+ }
+
+ return signature.get ();
+ }
+}
public interface Valadoc.TemplateParameterListHandler : Api.Node {
public Collection<TypeParameter> get_template_param_list () {
- return get_children_by_type (Api.NodeType.TYPE_PARAMETER);
+ return get_children_by_type (Api.NodeType.TYPE_PARAMETER, false);
}
}
*/
using Gee;
-
+using Valadoc.Content;
public class Valadoc.TypeParameter : Api.SymbolNode, ReturnTypeHandler {
get;
}
+ protected override Inline build_signature () {
+ return new Api.SignatureBuilder ()
+ .append (name)
+ .get ();
+ }
+
public override Api.NodeType node_type { get { return Api.NodeType.TYPE_PARAMETER; } }
public override void accept (Doclet doclet) {
}
-
- public void write (Langlet langlet, void* ptr) {
- langlet.write_type_parameter (this, ptr);
- }
}
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
using Gee;
-
+using Valadoc.Content;
public class Valadoc.TypeReference : Api.Item {
private ArrayList<TypeReference> type_arguments = new ArrayList<TypeReference> ();
}
protected override void resolve_type_references (Tree root) {
- if (this.vtyperef != null) {
- if ( this.vtyperef is Vala.PointerType) {
- this.data_type = new Pointer ((Vala.PointerType) this.vtyperef, this);
- } else if (vtyperef is Vala.ArrayType) {
- this.data_type = new Array ((Vala.ArrayType) this.vtyperef, this);
- } else if (vtyperef is Vala.GenericType) {
- this.data_type = (TypeParameter) root.search_vala_symbol (((Vala.GenericType) this.vtyperef).type_parameter);
+ if ( this.vtyperef is Vala.PointerType) {
+ this.data_type = new Pointer ((Vala.PointerType) this.vtyperef, this);
+ } else if (vtyperef is Vala.ArrayType) {
+ this.data_type = new Array ((Vala.ArrayType) this.vtyperef, this);
+ } else if (vtyperef is Vala.GenericType) {
+ this.data_type = root.search_vala_symbol (((Vala.GenericType) this.vtyperef).type_parameter);
+ } else if (vtyperef is Vala.ErrorType) {
+ Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
+ if (verrdom != null) {
+ this.data_type = root.search_vala_symbol (verrdom);
+ } else {
+ this.data_type = glib_error;
}
+ } else if (vtyperef is Vala.DelegateType) {
+ this.data_type = root.search_vala_symbol (((Vala.DelegateType) vtyperef).delegate_symbol);
+ } else {
+ this.data_type = root.search_vala_symbol (vtyperef.data_type);
}
+ this.set_template_argument_list (root, vtyperef.get_type_arguments ());
- if (this.data_type == null) {
- Vala.DataType vtype = this.vtyperef;
- this.set_template_argument_list (root, vtype.get_type_arguments ());
- // still necessary?
- if ( vtype is Vala.ErrorType ) {
- Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtype).error_domain;
- if (verrdom != null) {
- this.data_type = root.search_vala_symbol (verrdom);
- } else {
- this.data_type = glib_error;
- }
- }
- // necessary?
- else if (vtype is Vala.DelegateType) {
- this.data_type = root.search_vala_symbol (((Vala.DelegateType)vtype).delegate_symbol);
- } else {
- this.data_type = root.search_vala_symbol (vtype.data_type);
- }
- } else if (this.data_type is Pointer) {
+ if (this.data_type is Pointer) {
((Pointer)this.data_type).resolve_type_references (root);
} else if (this.data_type is Array) {
((Array)this.data_type).resolve_type_references (root);
}
}
- public void write (Langlet langlet, void* ptr) {
- langlet.write_type_reference (this, ptr);
+ protected override Inline build_signature () {
+ var signature = new Api.SignatureBuilder ();
+
+ if (is_dynamic) {
+ signature.append_keyword ("dynamic");
+ }
+
+ if (is_weak) {
+ signature.append_keyword ("weak");
+ } else if (is_owned) {
+ signature.append_keyword ("owned");
+ } else if (is_unowned) {
+ signature.append_keyword ("unowned");
+ }
+
+ if (data_type == null) {
+ signature.append_keyword ("void");
+ } else if (data_type is Api.SymbolNode) {
+ signature.append_type ((Api.SymbolNode) data_type);
+ } else {
+ signature.append_content (data_type.signature);
+ }
+
+ if (type_arguments.size > 0) {
+ signature.append ("<", false);
+ bool first = true;
+ foreach (Api.Item param in type_arguments) {
+ if (!first) {
+ signature.append (",", false);
+ }
+ signature.append_content (param.signature, false);
+ first = false;
+ }
+ signature.append (">", false);
+ }
+
+ if (is_nullable) {
+ signature.append ("?", false);
+ }
+
+ return signature.get ();
}
}
-
}
private static void draw_struct_parents (Struct stru, Graphviz.Graph g, Graphviz.Node me) {
- Struct? parent = (Struct?)stru.base_type;
+ Struct? parent = stru.base_type != null ? (Struct) stru.base_type.data_type : null;
if (parent != null) {
weak Graphviz.Node stru2 = draw_struct (g, parent, me);
draw_struct_parents (parent, g, stru2);
}
private static void draw_interface_parents (Interface iface, Graphviz.Graph g, Graphviz.Node me) {
- Collection<Interface> parentlst = iface.get_implemented_interface_list ();
- Class? cl = (Class?)iface.base_type;
+ Collection<TypeReference> parentlst = iface.get_implemented_interface_list ();
+ Class? cl = iface.base_type != null ? (Class) iface.base_type.data_type : null;
if (cl != null) {
weak Graphviz.Node cln = draw_class (g, cl, me);
draw_class_parents (cl, g, cln);
}
- foreach (Interface type in parentlst) {
- draw_interface (g, (Interface)type, me);
+ foreach (TypeReference type in parentlst) {
+ draw_interface (g, (Interface) type.data_type, me);
}
}
}
private static void draw_class_parents (Class cl, Graphviz.Graph g, Graphviz.Node me) {
- Collection<Interface> parents = cl.get_implemented_interface_list ();
- Class? pcl = (Class?)cl.base_type;
+ Collection<TypeReference> parents = cl.get_implemented_interface_list ();
+ Class? pcl = cl.base_type != null ? (Class) cl.base_type.data_type : null;
if (pcl != null) {
weak Graphviz.Node node = draw_class (g, pcl, me);
draw_class_parents (pcl, g, node);
}
- foreach (Interface type in parents) {
- draw_interface (g, (Valadoc.Interface)type, me);
+ foreach (TypeReference type in parents) {
+ draw_interface (g, (Interface) type.data_type, me);
}
}
}
+++ /dev/null
-/*
- * Valadoc - a documentation tool for vala.
- * Copyright (C) 2008 Florian Brosch
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-using Gee;
-
-
-// deprecated
-public abstract class Valadoc.Langlet : Object {
- public abstract void write_pointer (Pointer param, void* ptr, Api.Node pos);
- public abstract void write_array (Array param, void* ptr, Api.Node pos);
- public abstract void write_type_parameter (TypeParameter param, void* ptr);
- public abstract void write_template_parameters (TemplateParameterListHandler thandler, void* ptr);
- public abstract void write_inheritance_list (Api.Node dtype, void* ptr);
- public abstract void write_parameter_list (ParameterListHandler thandler, void* ptr);
- public abstract void write_field (Valadoc.Field field, Valadoc.FieldHandler pos, void* ptr);
- public abstract void write_constant (Valadoc.Constant constant, Valadoc.ConstantHandler parent, void* ptr);
- public abstract void write_type_reference (Valadoc.TypeReference tref, void* ptr);
- public abstract void write_formal_parameter (Valadoc.FormalParameter param, void* ptr);
- public abstract void write_property_accessor (Valadoc.PropertyAccessor propac, void* ptr);
- public abstract void write_property (Valadoc.Property prop, void* ptr);
- public abstract void write_signal (Valadoc.Signal sig, void* ptr);
- public abstract void write_method (void* ptr, Valadoc.Method m, Valadoc.MethodHandler pos);
- public abstract void write_error_domain (Valadoc.ErrorDomain errdom, void* ptr);
- public abstract void write_error_code (Valadoc.ErrorCode errcode, void* ptr);
- public abstract void write_enum_value (Valadoc.EnumValue enval, void* ptr);
- public abstract void write_delegate (Valadoc.Delegate del, void* ptr);
- public abstract void write_class (Valadoc.Class cl, void* ptr);
- public abstract void write_enum (Valadoc.Enum en, void* ptr);
- public abstract void write_struct (Valadoc.Struct stru, void* ptr);
- public abstract void write_interface (Valadoc.Interface iface, void* ptr);
- public abstract void write_namespace (Valadoc.Namespace ns, void* ptr);
- public abstract void write_file (Valadoc.Package file, void* ptr);
-}
-
-
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class Item : GLib.Object {
public Item ();
+ protected abstract Valadoc.Content.Inline build_signature ();
protected virtual void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
protected virtual void resolve_type_references (Valadoc.Tree root);
public Valadoc.Api.Item parent { get; set; }
+ public Valadoc.Content.Inline signature { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class MemberNode : Valadoc.Api.SymbolNode {
public Valadoc.Namespace? nspace { get; }
public Valadoc.Package? package { get; }
}
+ [CCode (ref_function = "valadoc_api_signature_builder_ref", unref_function = "valadoc_api_signature_builder_unref", cheader_filename = "valadoc-1.0.h")]
+ public class SignatureBuilder {
+ public SignatureBuilder ();
+ public Valadoc.Api.SignatureBuilder append (string text, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_content (Valadoc.Content.Inline content, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_keyword (string keyword, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_literal (string literal, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_symbol (Valadoc.Api.Node node, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_type (Valadoc.Api.Node node, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_type_name (string name, bool spaced = true);
+ public Valadoc.Content.Run @get ();
+ }
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class SymbolNode : Valadoc.Api.Node, Valadoc.SymbolAccessibility {
public SymbolNode (Vala.Symbol symbol, Valadoc.Api.Node parent);
+ protected string get_accessibility_modifier ();
public override string? get_filename ();
public override bool is_visitor_accessible (Valadoc.Settings settings);
public override string? name { owned get; }
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Array : Valadoc.Api.Item {
public Array (Vala.ArrayType vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.Api.Node parent);
public Valadoc.Api.Item data_type { get; set; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Class : Valadoc.Api.TypeSymbolNode, Valadoc.ClassHandler, Valadoc.StructHandler, Valadoc.SignalHandler, Valadoc.MethodHandler, Valadoc.EnumHandler, Valadoc.PropertyHandler, Valadoc.ConstructionMethodHandler, Valadoc.FieldHandler, Valadoc.DelegateHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler {
public Class (Vala.Class symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
- public Gee.Collection<Valadoc.Interface> get_implemented_interface_list ();
+ public Gee.Collection<Valadoc.TypeReference> get_implemented_interface_list ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Class? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public bool is_abstract { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Constant : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Constant (Vala.Constant symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_vconstant (Vala.Constant vconst);
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.ConstantHandler? parent);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.ConstantHandler parent);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Delegate : Valadoc.Api.TypeSymbolNode, Valadoc.ParameterListHandler, Valadoc.ReturnTypeHandler, Valadoc.TemplateParameterListHandler, Valadoc.ExceptionHandler {
public Delegate (Vala.Delegate symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_static { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Enum : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler {
public Enum (Vala.Enum symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
public Gee.Collection<Valadoc.EnumValue> get_enum_values ();
public void visit (Valadoc.Doclet doclet);
public void visit_enum_values (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class EnumValue : Valadoc.Api.SymbolNode {
public EnumValue (Vala.EnumValue symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_venumvalue (Vala.EnumValue venval);
protected override void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class ErrorCode : Valadoc.Api.TypeSymbolNode {
public ErrorCode (Vala.ErrorCode symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_verrorcode (Vala.ErrorCode verrcode);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class ErrorDomain : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler {
public ErrorDomain (Vala.ErrorDomain symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
public Gee.Collection<Valadoc.ErrorCode> get_error_code_list ();
public void visit (Valadoc.Doclet doclet);
public void visit_error_codes (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Field : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Field (Vala.Field symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.FieldHandler? parent);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.FieldHandler parent);
public bool is_static { get; }
public bool is_volatile { get; }
public override Valadoc.Api.NodeType node_type { get; }
public class FormalParameter : Valadoc.Api.SymbolNode, Valadoc.ReturnTypeHandler {
public FormalParameter (Vala.FormalParameter symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool ellipsis { get; }
public bool has_default_value { get; }
public bool is_out { get; }
public class Interface : Valadoc.Api.TypeSymbolNode, Valadoc.SignalHandler, Valadoc.PropertyHandler, Valadoc.FieldHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler, Valadoc.MethodHandler, Valadoc.DelegateHandler, Valadoc.EnumHandler, Valadoc.StructHandler, Valadoc.ClassHandler {
public Interface (Vala.Interface symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
- public Gee.Collection<Valadoc.Interface> get_implemented_interface_list ();
+ public Gee.Collection<Valadoc.TypeReference> get_implemented_interface_list ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Class? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
- public abstract class Langlet : GLib.Object {
- public Langlet ();
- public abstract void write_array (Valadoc.Array param, void* ptr, Valadoc.Api.Node pos);
- public abstract void write_class (Valadoc.Class cl, void* ptr);
- public abstract void write_constant (Valadoc.Constant constant, Valadoc.ConstantHandler parent, void* ptr);
- public abstract void write_delegate (Valadoc.Delegate del, void* ptr);
- public abstract void write_enum (Valadoc.Enum en, void* ptr);
- public abstract void write_enum_value (Valadoc.EnumValue enval, void* ptr);
- public abstract void write_error_code (Valadoc.ErrorCode errcode, void* ptr);
- public abstract void write_error_domain (Valadoc.ErrorDomain errdom, void* ptr);
- public abstract void write_field (Valadoc.Field field, Valadoc.FieldHandler pos, void* ptr);
- public abstract void write_file (Valadoc.Package file, void* ptr);
- public abstract void write_formal_parameter (Valadoc.FormalParameter param, void* ptr);
- public abstract void write_inheritance_list (Valadoc.Api.Node dtype, void* ptr);
- public abstract void write_interface (Valadoc.Interface iface, void* ptr);
- public abstract void write_method (void* ptr, Valadoc.Method m, Valadoc.MethodHandler pos);
- public abstract void write_namespace (Valadoc.Namespace ns, void* ptr);
- public abstract void write_parameter_list (Valadoc.ParameterListHandler thandler, void* ptr);
- public abstract void write_pointer (Valadoc.Pointer param, void* ptr, Valadoc.Api.Node pos);
- public abstract void write_property (Valadoc.Property prop, void* ptr);
- public abstract void write_property_accessor (Valadoc.PropertyAccessor propac, void* ptr);
- public abstract void write_signal (Valadoc.Signal sig, void* ptr);
- public abstract void write_struct (Valadoc.Struct stru, void* ptr);
- public abstract void write_template_parameters (Valadoc.TemplateParameterListHandler thandler, void* ptr);
- public abstract void write_type_parameter (Valadoc.TypeParameter param, void* ptr);
- public abstract void write_type_reference (Valadoc.TypeReference tref, void* ptr);
- }
- [CCode (cheader_filename = "valadoc-1.0.h")]
public class Method : Valadoc.Api.MemberNode, Valadoc.ParameterListHandler, Valadoc.ExceptionHandler, Valadoc.TemplateParameterListHandler, Valadoc.ReturnTypeHandler {
public Method (Vala.Method symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.MethodHandler in_type);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.MethodHandler parent);
public Valadoc.Method? base_method { get; set; }
public bool is_abstract { get; }
public bool is_constructor { get; }
public class Namespace : Valadoc.Api.SymbolNode, Valadoc.MethodHandler, Valadoc.FieldHandler, Valadoc.NamespaceHandler, Valadoc.ErrorDomainHandler, Valadoc.EnumHandler, Valadoc.ClassHandler, Valadoc.StructHandler, Valadoc.InterfaceHandler, Valadoc.DelegateHandler, Valadoc.ConstantHandler {
public Namespace (Vala.Namespace symbol, Valadoc.NamespaceHandler parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
public Vala.Namespace vnspace { get; set; }
}
public class Package : Valadoc.Api.Node, Valadoc.NamespaceHandler {
public Package (Vala.SourceFile vfile, string name, bool is_package = false);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public Gee.Collection<Valadoc.Package> get_dependency_list ();
public Gee.Collection<Valadoc.Package> get_full_dependency_list ();
public override bool is_visitor_accessible (Valadoc.Settings settings);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_package { get; set; }
public override string? name { owned get; }
public override Valadoc.Api.NodeType node_type { get; }
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Pointer : Valadoc.Api.Item {
public Pointer (Vala.PointerType vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.Api.Node parent);
public Valadoc.Api.Item data_type { get; set; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Property : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Property (Vala.Property symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public bool equals (Valadoc.Property p);
public string? get_cname ();
public bool is_vproperty (Vala.Property vprop);
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public Valadoc.Property base_property { get; set; }
public Valadoc.PropertyAccessor getter { get; set; }
public bool is_abstract { get; }
public class PropertyAccessor : Valadoc.Api.SymbolNode {
public PropertyAccessor (Vala.PropertyAccessor symbol, Valadoc.Property parent);
public override void accept (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
+ protected override Valadoc.Content.Inline build_signature ();
public bool is_construct { get; }
public bool is_get { get; }
public bool is_owned { get; }
public class Signal : Valadoc.Api.MemberNode, Valadoc.ParameterListHandler, Valadoc.ReturnTypeHandler {
public Signal (Vala.Signal symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_virtual { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Struct : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler, Valadoc.ConstructionMethodHandler, Valadoc.FieldHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler {
public Struct (Vala.Struct symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Struct? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class TypeParameter : Valadoc.Api.SymbolNode, Valadoc.ReturnTypeHandler {
public TypeParameter (Vala.TypeParameter symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
+ protected override Valadoc.Content.Inline build_signature ();
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class TypeReference : Valadoc.Api.Item {
public TypeReference (Vala.DataType? vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
public Gee.Collection<Valadoc.TypeReference> get_type_arguments ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr);
public Valadoc.Api.Item? data_type { get; set; }
public bool is_dynamic { get; }
public bool is_nullable { get; }
-#! /bin/bash
+#! /bin/sh
# valadoc - temporary wrapper script for .libs/valadoc
-# Generated by ltmain.sh (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.493 2008/02/01 16:58:18)
#
# The valadoc program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='/bin/sed -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# Be Bourne compatible
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-relink_command="(cd /home/mog/Desktop/valadoc/src/valadoc; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; export PATH; gcc -DPACKAGE_DATADIR=\\\"/usr/local/lib/valadoc/plugins\\\" -DPACKAGE_VERSION=\\\"0.2\\\" -I ../libvaladoc/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include/gee-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include/vala-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/graphviz -g -O2 -o \$progdir/\$file valadoc.o -Wl,--export-dynamic ../libvaladoc/.libs/libvaladoc.so -L/usr/local/lib /usr/lib/libxml2.so /usr/local/lib/libvala.so /usr/lib/libgmodule-2.0.so -lgvc -lgraph -lcdt /usr/local/lib/libgee.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so -Wl,-rpath -Wl,/home/mog/Desktop/valadoc/src/libvaladoc/.libs -Wl,-rpath -Wl,/usr/local/lib/valadoc/)"
+relink_command="(cd /home/didier/dev/gits/valadoc.git/src/valadoc; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=\"/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/home/didier/bin\"; export PATH; gcc -DPACKAGE_DATADIR=\\\"/usr/lib/valadoc/plugins\\\" -DPACKAGE_VERSION=\\\"0.2\\\" -I ../libvaladoc/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gee-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/vala-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/graphviz -g -O0 -o \$progdir/\$file valadoc.o -Wl,--export-dynamic ../libvaladoc/.libs/libvaladoc.so /usr/lib64/libxml2.so -L/usr/lib /usr/lib/libvala.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libgvc.so /usr/lib64/libpathplan.so /usr/lib64/libexpat.so /usr/lib64/libltdl.so -ldl -lz -lm /usr/lib64/libgraph.so /usr/lib64/libcdt.so /usr/lib/libgee.so -lgcov /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so -Wl,--rpath -Wl,/home/didier/dev/gits/valadoc.git/src/libvaladoc/.libs -Wl,--rpath -Wl,/usr/lib/valadoc/ ) "
# This environment variable determines our operation mode.
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
- # install mode needs the following variables:
- generated_by_libtool_version='2.2.6'
+ # install mode needs the following variable:
notinst_deplibs=' ../libvaladoc/libvaladoc.la'
else
- # When we are sourced in execute mode, $file and $ECHO are already set.
+ # When we are sourced in execute mode, $file and $echo are already set.
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
- ECHO="echo"
+ echo="echo"
file="$0"
# Make sure echo works.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
- elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
- # Yippee, $ECHO works!
+ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
:
else
- # Restart under the correct shell, and then maybe $ECHO will work.
- exec /bin/bash "$0" --no-reexec ${1+"$@"}
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec /bin/sh "$0" --no-reexec ${1+"$@"}
fi
fi
# Find the directory that this script lives in.
- thisdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "x$thisdir" = "x$file" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
while test -n "$file"; do
- destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
# If there was a directory component, then change thisdir.
if test "x$destdir" != "x$file"; then
esac
fi
- file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
+ file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
done
-
- # Usually 'no', except on cygwin/mingw when embedded into
- # the cwrapper.
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
- if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
- # special case for '.'
- if test "$thisdir" = "."; then
- thisdir=`pwd`
- fi
- # remove .libs from thisdir
- case "$thisdir" in
- *[\\/].libs ) thisdir=`$ECHO "X$thisdir" | $Xsed -e 's%[\\/][^\\/]*$%%'` ;;
- .libs ) thisdir=. ;;
- esac
- fi
-
# Try to get the absolute directory name.
absdir=`cd "$thisdir" && pwd`
test -n "$absdir" && thisdir="$absdir"
program=lt-'valadoc'
progdir="$thisdir/.libs"
- if test ! -f "$progdir/$program" ||
+ if test ! -f "$progdir/$program" || \
{ file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
test "X$file" != "X$progdir/$program"; }; then
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
# Run the actual program with our arguments.
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n "${LD_LIBRARY_PATH+set}"; then
+ export LD_LIBRARY_PATH=$progdir:$LD_LIBRARY_PATH
+ fi
+
exec "$progdir/$program" ${1+"$@"}
- $ECHO "$0: cannot exec $program $*" 1>&2
+ $echo "$0: cannot exec $program $*"
exit 1
fi
else
# The program doesn't exist.
- $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
- $ECHO "This script is just a wrapper for $program." 1>&2
+ $echo "$0: error: \`$progdir/$program' does not exist" 1>&2
+ $echo "This script is just a wrapper for $program." 1>&2
echo "See the libtool documentation for more information." 1>&2
exit 1
fi
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class Item : GLib.Object {
public Item ();
+ protected abstract Valadoc.Content.Inline build_signature ();
protected virtual void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
protected virtual void resolve_type_references (Valadoc.Tree root);
public Valadoc.Api.Item parent { get; set; }
+ public Valadoc.Content.Inline signature { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class MemberNode : Valadoc.Api.SymbolNode {
public Valadoc.Namespace? nspace { get; }
public Valadoc.Package? package { get; }
}
+ [CCode (ref_function = "valadoc_api_signature_builder_ref", unref_function = "valadoc_api_signature_builder_unref", cheader_filename = "valadoc-1.0.h")]
+ public class SignatureBuilder {
+ public SignatureBuilder ();
+ public Valadoc.Api.SignatureBuilder append (string text, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_content (Valadoc.Content.Inline content, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_keyword (string keyword, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_literal (string literal, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_symbol (Valadoc.Api.Node node, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_type (Valadoc.Api.Node node, bool spaced = true);
+ public Valadoc.Api.SignatureBuilder append_type_name (string name, bool spaced = true);
+ public Valadoc.Content.Run @get ();
+ }
[CCode (cheader_filename = "valadoc-1.0.h")]
public abstract class SymbolNode : Valadoc.Api.Node, Valadoc.SymbolAccessibility {
public SymbolNode (Vala.Symbol symbol, Valadoc.Api.Node parent);
+ protected string get_accessibility_modifier ();
public override string? get_filename ();
public override bool is_visitor_accessible (Valadoc.Settings settings);
public override string? name { owned get; }
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Array : Valadoc.Api.Item {
public Array (Vala.ArrayType vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.Api.Node parent);
public Valadoc.Api.Item data_type { get; set; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Class : Valadoc.Api.TypeSymbolNode, Valadoc.ClassHandler, Valadoc.StructHandler, Valadoc.SignalHandler, Valadoc.MethodHandler, Valadoc.EnumHandler, Valadoc.PropertyHandler, Valadoc.ConstructionMethodHandler, Valadoc.FieldHandler, Valadoc.DelegateHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler {
public Class (Vala.Class symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
- public Gee.Collection<Valadoc.Interface> get_implemented_interface_list ();
+ public Gee.Collection<Valadoc.TypeReference> get_implemented_interface_list ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Class? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public bool is_abstract { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Constant : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Constant (Vala.Constant symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_vconstant (Vala.Constant vconst);
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.ConstantHandler? parent);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.ConstantHandler parent);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Delegate : Valadoc.Api.TypeSymbolNode, Valadoc.ParameterListHandler, Valadoc.ReturnTypeHandler, Valadoc.TemplateParameterListHandler, Valadoc.ExceptionHandler {
public Delegate (Vala.Delegate symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_static { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Enum : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler {
public Enum (Vala.Enum symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
public Gee.Collection<Valadoc.EnumValue> get_enum_values ();
public void visit (Valadoc.Doclet doclet);
public void visit_enum_values (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class EnumValue : Valadoc.Api.SymbolNode {
public EnumValue (Vala.EnumValue symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_venumvalue (Vala.EnumValue venval);
protected override void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class ErrorCode : Valadoc.Api.TypeSymbolNode {
public ErrorCode (Vala.ErrorCode symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string get_cname ();
public bool is_verrorcode (Vala.ErrorCode verrcode);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class ErrorDomain : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler {
public ErrorDomain (Vala.ErrorDomain symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
public Gee.Collection<Valadoc.ErrorCode> get_error_code_list ();
public void visit (Valadoc.Doclet doclet);
public void visit_error_codes (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Field : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Field (Vala.Field symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.FieldHandler? parent);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.FieldHandler parent);
public bool is_static { get; }
public bool is_volatile { get; }
public override Valadoc.Api.NodeType node_type { get; }
public class FormalParameter : Valadoc.Api.SymbolNode, Valadoc.ReturnTypeHandler {
public FormalParameter (Vala.FormalParameter symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool ellipsis { get; }
public bool has_default_value { get; }
public bool is_out { get; }
public class Interface : Valadoc.Api.TypeSymbolNode, Valadoc.SignalHandler, Valadoc.PropertyHandler, Valadoc.FieldHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler, Valadoc.MethodHandler, Valadoc.DelegateHandler, Valadoc.EnumHandler, Valadoc.StructHandler, Valadoc.ClassHandler {
public Interface (Vala.Interface symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
- public Gee.Collection<Valadoc.Interface> get_implemented_interface_list ();
+ public Gee.Collection<Valadoc.TypeReference> get_implemented_interface_list ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Class? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
- public abstract class Langlet : GLib.Object {
- public Langlet ();
- public abstract void write_array (Valadoc.Array param, void* ptr, Valadoc.Api.Node pos);
- public abstract void write_class (Valadoc.Class cl, void* ptr);
- public abstract void write_constant (Valadoc.Constant constant, Valadoc.ConstantHandler parent, void* ptr);
- public abstract void write_delegate (Valadoc.Delegate del, void* ptr);
- public abstract void write_enum (Valadoc.Enum en, void* ptr);
- public abstract void write_enum_value (Valadoc.EnumValue enval, void* ptr);
- public abstract void write_error_code (Valadoc.ErrorCode errcode, void* ptr);
- public abstract void write_error_domain (Valadoc.ErrorDomain errdom, void* ptr);
- public abstract void write_field (Valadoc.Field field, Valadoc.FieldHandler pos, void* ptr);
- public abstract void write_file (Valadoc.Package file, void* ptr);
- public abstract void write_formal_parameter (Valadoc.FormalParameter param, void* ptr);
- public abstract void write_inheritance_list (Valadoc.Api.Node dtype, void* ptr);
- public abstract void write_interface (Valadoc.Interface iface, void* ptr);
- public abstract void write_method (void* ptr, Valadoc.Method m, Valadoc.MethodHandler pos);
- public abstract void write_namespace (Valadoc.Namespace ns, void* ptr);
- public abstract void write_parameter_list (Valadoc.ParameterListHandler thandler, void* ptr);
- public abstract void write_pointer (Valadoc.Pointer param, void* ptr, Valadoc.Api.Node pos);
- public abstract void write_property (Valadoc.Property prop, void* ptr);
- public abstract void write_property_accessor (Valadoc.PropertyAccessor propac, void* ptr);
- public abstract void write_signal (Valadoc.Signal sig, void* ptr);
- public abstract void write_struct (Valadoc.Struct stru, void* ptr);
- public abstract void write_template_parameters (Valadoc.TemplateParameterListHandler thandler, void* ptr);
- public abstract void write_type_parameter (Valadoc.TypeParameter param, void* ptr);
- public abstract void write_type_reference (Valadoc.TypeReference tref, void* ptr);
- }
- [CCode (cheader_filename = "valadoc-1.0.h")]
public class Method : Valadoc.Api.MemberNode, Valadoc.ParameterListHandler, Valadoc.ExceptionHandler, Valadoc.TemplateParameterListHandler, Valadoc.ReturnTypeHandler {
public Method (Vala.Method symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet, Valadoc.MethodHandler in_type);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.MethodHandler parent);
public Valadoc.Method? base_method { get; set; }
public bool is_abstract { get; }
public bool is_constructor { get; }
public class Namespace : Valadoc.Api.SymbolNode, Valadoc.MethodHandler, Valadoc.FieldHandler, Valadoc.NamespaceHandler, Valadoc.ErrorDomainHandler, Valadoc.EnumHandler, Valadoc.ClassHandler, Valadoc.StructHandler, Valadoc.InterfaceHandler, Valadoc.DelegateHandler, Valadoc.ConstantHandler {
public Namespace (Vala.Namespace symbol, Valadoc.NamespaceHandler parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void process_comments (Valadoc.Settings settings, Valadoc.DocumentationParser parser);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public override Valadoc.Api.NodeType node_type { get; }
public Vala.Namespace vnspace { get; set; }
}
public class Package : Valadoc.Api.Node, Valadoc.NamespaceHandler {
public Package (Vala.SourceFile vfile, string name, bool is_package = false);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public Gee.Collection<Valadoc.Package> get_dependency_list ();
public Gee.Collection<Valadoc.Package> get_full_dependency_list ();
public override bool is_visitor_accessible (Valadoc.Settings settings);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_package { get; set; }
public override string? name { owned get; }
public override Valadoc.Api.NodeType node_type { get; }
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Pointer : Valadoc.Api.Item {
public Pointer (Vala.PointerType vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr, Valadoc.Api.Node parent);
public Valadoc.Api.Item data_type { get; set; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class Property : Valadoc.Api.MemberNode, Valadoc.ReturnTypeHandler {
public Property (Vala.Property symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public bool equals (Valadoc.Property p);
public string? get_cname ();
public bool is_vproperty (Vala.Property vprop);
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public Valadoc.Property base_property { get; set; }
public Valadoc.PropertyAccessor getter { get; set; }
public bool is_abstract { get; }
public class PropertyAccessor : Valadoc.Api.SymbolNode {
public PropertyAccessor (Vala.PropertyAccessor symbol, Valadoc.Property parent);
public override void accept (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
+ protected override Valadoc.Content.Inline build_signature ();
public bool is_construct { get; }
public bool is_get { get; }
public bool is_owned { get; }
public class Signal : Valadoc.Api.MemberNode, Valadoc.ParameterListHandler, Valadoc.ReturnTypeHandler {
public Signal (Vala.Signal symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
public bool is_virtual { get; }
public override Valadoc.Api.NodeType node_type { get; }
}
public class Struct : Valadoc.Api.TypeSymbolNode, Valadoc.MethodHandler, Valadoc.ConstructionMethodHandler, Valadoc.FieldHandler, Valadoc.ConstantHandler, Valadoc.TemplateParameterListHandler {
public Struct (Vala.Struct symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
+ protected override Valadoc.Content.Inline build_signature ();
public string? get_cname ();
protected override void resolve_type_references (Valadoc.Tree root);
public void visit (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
- protected Valadoc.Struct? base_type { get; set; }
+ protected Valadoc.TypeReference? base_type { get; set; }
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class TypeParameter : Valadoc.Api.SymbolNode, Valadoc.ReturnTypeHandler {
public TypeParameter (Vala.TypeParameter symbol, Valadoc.Api.Node parent);
public override void accept (Valadoc.Doclet doclet);
- public void write (Valadoc.Langlet langlet, void* ptr);
+ protected override Valadoc.Content.Inline build_signature ();
public override Valadoc.Api.NodeType node_type { get; }
}
[CCode (cheader_filename = "valadoc-1.0.h")]
public class TypeReference : Valadoc.Api.Item {
public TypeReference (Vala.DataType? vtyperef, Valadoc.Api.Item parent);
+ protected override Valadoc.Content.Inline build_signature ();
public Gee.Collection<Valadoc.TypeReference> get_type_arguments ();
protected override void resolve_type_references (Valadoc.Tree root);
- public void write (Valadoc.Langlet langlet, void* ptr);
public Valadoc.Api.Item? data_type { get; set; }
public bool is_dynamic { get; }
public bool is_nullable { get; }