src/vapi/Makefile
src/doclets/Makefile
src/doclets/htmlhelpers/Makefile
- src/doclets/html/Makefile
- src/doclets/html/linkhelper/Makefile
- src/doclets/html/doclet/Makefile
- src/doclets/html/deps/Makefile
- src/doclets/html/taglets/Makefile
- src/doclets/html/taglets/parameter/Makefile
- src/doclets/html/taglets/version/Makefile
- src/doclets/html/taglets/throws/Makefile
- src/doclets/html/taglets/return/Makefile
- src/doclets/html/taglets/string/Makefile
- src/doclets/html/taglets/wikilink/Makefile
- src/doclets/html/taglets/image/Makefile
- src/doclets/html/taglets/link/Makefile
- src/doclets/html/taglets/center/Makefile
- src/doclets/html/taglets/right/Makefile
- src/doclets/html/taglets/italic/Makefile
- src/doclets/html/taglets/source/Makefile
- src/doclets/html/taglets/bold/Makefile
- src/doclets/html/taglets/underline/Makefile
- src/doclets/html/taglets/notification/Makefile
- src/doclets/html/taglets/see/Makefile
- src/doclets/html/taglets/table/Makefile
- src/doclets/html/taglets/list/Makefile
- src/doclets/html/taglets/listelement/Makefile
- src/doclets/html/taglets/cell/Makefile
+ src/doclets/htm/Makefile
+ src/doclets/htm/doclet/Makefile
+ src/doclets/htm/deps/Makefile
+ src/doclets/htm/taglets/Makefile
+ src/doclets/htm/taglets/parameter/Makefile
+ src/doclets/htm/taglets/version/Makefile
+ src/doclets/htm/taglets/throws/Makefile
+ src/doclets/htm/taglets/return/Makefile
+ src/doclets/htm/taglets/string/Makefile
+ src/doclets/htm/taglets/wikilink/Makefile
+ src/doclets/htm/taglets/image/Makefile
+ src/doclets/htm/taglets/link/Makefile
+ src/doclets/htm/taglets/center/Makefile
+ src/doclets/htm/taglets/right/Makefile
+ src/doclets/htm/taglets/italic/Makefile
+ src/doclets/htm/taglets/source/Makefile
+ src/doclets/htm/taglets/bold/Makefile
+ src/doclets/htm/taglets/underline/Makefile
+ src/doclets/htm/taglets/notification/Makefile
+ src/doclets/htm/taglets/see/Makefile
+ src/doclets/htm/taglets/table/Makefile
+ src/doclets/htm/taglets/list/Makefile
+ src/doclets/htm/taglets/listelement/Makefile
+ src/doclets/htm/taglets/cell/Makefile
src/doclets/valadoc.org/Makefile
src/doclets/valadoc.org/doclet/Makefile
src/doclets/devhelp/Makefile
src/doclets/devhelp/taglets/cell/Makefile
src/doclets/devhelp/taglets/source/Makefile
src/doclets/devhelp/deps/Makefile
- src/doclets/devhelp/linkhelper/Makefile
src/doclets/devhelp/doclet/Makefile
src/doclets/devhelp/taglets/Makefile
src/doclets/devhelp/taglets/parameter/Makefile
SUBDIRS = \
htmlhelpers \
- html \
+ htm \
devhelp \
valadoc.org \
$(NULL)
SUBDIRS = \
- linkhelper \
doclet \
taglets \
deps \
vapidir = $(libdir)/valadoc/plugins/devhelp/deps/
-dist_vapi_DATA = \
- abstractclass.png \
- abstractmethod.png \
- staticmethod.png \
+dist_vapi_DATA = \
+ warning.png \
+ abstractclass.png \
+ abstractmethod.png \
+ staticmethod.png \
style.css \
class.png \
interface.png \
field.png \
package.png \
struct.png \
+ abstractproperty.png \
+ constructor.png \
+ virtualmethod.png \
+ virtualproperty.png \
$(NULL)
dist_noinst_DATA = \
ul.external_link {
}
-
.main_optional_parameter {
font-style: italic;
}
-
-
.main_diagram {
display: block;
margin: 0px auto;
}
.site_navi {
- text-align: right;;
+ text-align: right;
}
-
-div.cms_message {
+.main_notification {
+ padding-right: 10px;
+ padding-left: 60px;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ border-color: #aaaaff;
+ background-color: #eeeeff;
+ border-style: solid;
+ border-width: 1px;
+ margin: 10px;
+ min-height: 48px;
+ background-position: 6px 0.5em;
+ background-repeat: no-repeat;
+ background-image: url(warning.png);
}
+.main_sourcesample {
+ padding-right: 10px;
+ padding-left: 5px;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ margin: 10px;
-input {
border-color: #aaaaff;
+ background-color: #eeeeff;
border-style: solid;
border-width: 1px;
}
+input {
+ border-color: #aaaaff;
+ border-style: solid;
+ border-width: 1px;
+}
-
+.main_table {
+ border-collapse: collapse;
+ border: 1px solid #aaaaff;
+ background: #eeeeff;
+ margin-right:auto;
+ margin-left:auto;
+}
.site_header {
font-size: 25px;
.main_inline_navigation_virtual_property {
- list-style-image: url(property.png);
+ list-style-image: url(virtualproperty.png);
}
.main_inline_navigation_abstract_property {
- list-style-image: url(property.png);
+ list-style-image: url(abstractproperty.png);
}
.navi_abstract_prop {
- list-style-image: url(property.png);
+ list-style-image: url(abstractproperty.png);
}
.navi_virtual_prop {
- list-style-image: url(property.png);
+ list-style-image: url(virtualproperty.png);
}
border:0px;
}
.css_content_link_virtual_property {
- background-image:url(property.png);
+ background-image:url(virtualproperty.png);
display:inline-block;
padding-right:17px;
background-repeat:no-repeat;
border:0px;
}
.css_content_link_abstract_property {
- background-image:url(property.png);
+ background-image:url(abstractproperty.png);
display:inline-block;
padding-right:17px;
background-repeat:no-repeat;
border:0px;
}
.css_content_link_virtual_method {
- background-image:url(method.png);
+ background-image:url(virtualmethod.png);
display:inline-block;
padding-right:17px;
background-repeat:no-repeat;
border:0px;
}
.css_content_link_construction_method {
- background-image:url(method.png);
+ background-image:url(constructor.png);
display:inline-block;
padding-right:17px;
background-repeat:no-repeat;
border:0px;
}
+.main_inline_navigation_virtual_method {
+ list-style-image:url(virtualmethod.png);
+}
.main_inline_navigation_errorcode {
list-style-image:url(errorcode.png);
}
list-style-image: url( abstractmethod.png );
}
.navi_construction_method, .main_list_m, .main_inline_navigation_construction_method {
- list-style-image: url(method.png);
+ list-style-image: url(constructor.png);
}
.navi_static_method, .main_inline_navigation_static_method {
list-style-image: url(staticmethod.png);
}
.navi_package_index, .main_inline_navigation_package {
- list-style-image: url(packages.png)
+ list-style-image: url(packages.png);
}
.main_navi_enval {
- list-style-image: url(enumvalue.png)
+ list-style-image: url(enumvalue.png);
}
.main_navi_errdomcode {
- list-style-image: url(errorcode.png)
+ list-style-image: url(errorcode.png);
}
.navi_error_domain, .main_list_errdom, .main_inline_navigation_errordomain {
- list-style-image: url(errordomain.png)
+ list-style-image: url(errordomain.png);
}
.navi_namespace, .main_list_ns, .main_inline_navigation_namespace {
- list-style-image: url(namespace.png)
+ list-style-image: url(namespace.png);
}
.navi_method, .main_inline_navigation_method {
- list-style-image: url(method.png)
+ list-style-image: url(method.png);
+}
+.navi_virtual_method {
+ list-style-image: url(virtualmethod.png);
}
.navi_struct, .main_list_stru, .main_inline_navigation_struct {
- list-style-image: url(struct.png)
+ list-style-image: url(struct.png);
}
.navi_iface, .main_navigation_interface, .main_list_iface {
- list-style-image: url(interface.png)
+ list-style-image: url(interface.png);
}
.navi_field, .main_inline_navigation_fields, .main_list_field {
- list-style-image: url(field.png)
+ list-style-image: url(field.png);
}
.navi_class, .main_inline_navigation_class, .main_list_cl {
- list-style-image: url(class.png)
+ list-style-image: url(class.png);
}
.navi_enum, .main_list_en, .main_inline_navigation_enum {
- list-style-image: url(enum.png)
+ list-style-image: url(enum.png);
}
.navi_prop, .main_inline_navigation_property, .main_list_prop {
- list-style-image: url(property.png)
+ list-style-image: url(property.png);
}
.navi_del, .main_list_del, .main_inline_navigation_delegate {
- list-style-image: url(delegate.png)
+ list-style-image: url(delegate.png);
}
.navi_sig, .main_inline_navigation_signal, .main_list_sig {
- list-style-image: url(signal.png)
+ list-style-image: url(signal.png);
}
.navi_package, .main_inline_navigation_package {
- list-style-image: url(package.png)
+ list-style-image: url(package.png);
}
.main_inline_navigation_constant, .navi_constant {
- list-style-image: url(constant.png)
+ list-style-image: url(constant.png);
}
margin-bottom: 5px;
}
-
-
-
a.navi_link, a.external_link {
text-decoration: none;
color: #214b87;
a.navi_link:hover, a.external_link:hover {
text-decoration: underline;
-# color: #ff0000;
}
-
-
-
.main_see_list {
}
libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
- $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libxml-2.0 --pkg libhtmlhelper-1.0 --vapidir . --pkg docletconfig --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --pkg libxml-2.0 --vapidir . --pkg docletconfig --basedir . $^
touch $@
-DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/devhelp/\" \
-I ../../../libvaladoc/ \
-I ../../htmlhelpers/ \
- -I ../linkhelper/ \
-I ../ \
$(GLIB_CFLAGS) \
$(LIBXML2_CFLAGS) \
libdoclet_la_LIBADD = \
../../../libvaladoc/libvaladoc.la \
../../htmlhelpers/libhtmlhelpers.la \
- ../linkhelper/libhtmlhelper.la \
$(LIBXML2_LIBS) \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
-public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.HtmlHelper {
+public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet {
protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( this.settings, element, pos );
+ return get_html_link ( this.settings, element, pos );
}
public LangletIndex ( Settings settings ) {
-public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper {
- private string package_dir_name = "";
+public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet {
+ private const string css_path = "style.css";
+ private string package_dir_name = ""; // remove
private DevhelpFormat devhelp;
- protected override string get_link ( DocumentedElement p1, DocumentedElement? p2 ) {
- return this.get_html_link ( this.settings, p1, p2 );
- }
-
private string get_path ( DocumentedElement element ) {
return element.full_name () + ".html";
}
return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + element.full_name () + ".html";
}
- protected override string get_img_path ( DocumentedElement element ) {
- return "img/" + element.full_name () + ".png";
- }
-
- protected override string get_img_real_path ( DocumentedElement element ) {
- return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + "img/" + element.full_name () + ".png";
- }
-
- public Valadoc.Settings settings {
- construct set;
- protected get;
- }
-
public override void initialisation ( Settings settings, Tree tree ) {
this.settings = settings;
this.devhelp = new DevhelpFormat ( pkg_name, "" );
GLib.FileStream ifile = GLib.FileStream.open ( path + "index.htm", "w" );
- this.write_file_header ( ifile, "style.css", pkg_name );
+ this.write_file_header ( ifile, this.css_path, pkg_name );
this.write_file_content ( ifile, file, file );
this.write_file_footer ( ifile );
ifile = null;
string path = this.get_path ( ns );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w" );
- this.write_file_header ( file, "style.css", ns.full_name() );
+ this.write_file_header ( file, this.css_path, ns.full_name() );
this.write_namespace_content ( file, ns, ns );
this.write_file_footer ( file );
file = null;
this.devhelp.add_keyword ( KeywordType.INTERFACE, iface.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", iface.full_name() );
+ this.write_file_header ( file, this.css_path, iface.full_name() );
this.write_interface_content ( file, iface, iface );
this.write_file_footer ( file );
file = null;
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", cl.full_name() );
+ this.write_file_header ( file, this.css_path, cl.full_name() );
this.write_class_content ( file, cl, cl );
this.write_file_footer ( file );
file = null;
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", stru.full_name() );
+ this.write_file_header ( file, this.css_path, stru.full_name() );
this.write_struct_content ( file, stru, stru );
this.write_file_footer ( file );
this.devhelp.add_chapter ( errdom.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", errdom.full_name() );
+ this.write_file_header ( file, this.css_path, errdom.full_name() );
this.write_error_domain_content ( file, errdom, errdom );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( en.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", en.full_name() );
+ this.write_file_header ( file, this.css_path, en.full_name() );
this.write_enum_content ( file, en, en );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( prop.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", prop.full_name() );
+ this.write_file_header ( file, this.css_path, prop.full_name() );
this.write_property_content ( file, prop );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( constant.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", constant.full_name() );
+ this.write_file_header ( file, this.css_path, constant.full_name() );
this.write_constant_content ( file, constant, parent );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( field.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", field.full_name() );
+ this.write_file_header ( file, this.css_path, field.full_name() );
this.write_field_content ( file, field, parent );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( del.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", del.full_name() );
+ this.write_file_header ( file, this.css_path, del.full_name() );
this.write_delegate_content ( file, del );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( sig.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", sig.full_name() );
+ this.write_file_header ( file, this.css_path, sig.full_name() );
write_signal_content ( file, sig );
this.write_file_footer ( file );
file = null;
this.devhelp.add_chapter ( m.name, path );
GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
- this.write_file_header ( file, "style.css", m.full_name() );
+ this.write_file_header ( file, this.css_path, m.full_name() );
this.write_method_content ( file, m, parent );
this.write_file_footer ( file );
file = null;
+++ /dev/null
-# src/Makefile.am
-
-
-
-libhtmlhelper_VALASOURCES = \
- helper.vala \
- $(NULL)
-
-
-BUILT_SOURCES = libhtmlhelper.vala.stamp
-
-
-libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
- $(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 $^
- touch $@
-
-
-
-htmlhelperdir = $(libdir)/valadoc/plugins/devhelp/
-htmlhelper_LTLIBRARIES = libhtmlhelper.la
-
-
-libhtmlhelper_la_SOURCES = \
- libhtmlhelper.vala.stamp \
- $(libhtmlhelper_VALASOURCES:.vala=.c) \
- $(libhtmlhelper_VALASOURCES:.vala=.h) \
- $(NULL)
-
-
-AM_CFLAGS = \
- -I ../../../libvaladoc/ \
- -I ../../htmlhelpers/ \
- $(LIBVALA_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(NULL)
-
-
-libhtmlhelper_la_LIBADD = \
- ../../../libvaladoc/libvaladoc.la \
- ../../htmlhelpers/libhtmlhelpers.la \
- $(LIBVALA_LIBS) \
- $(GLIB_LIBS) \
- $(NULL)
-
-
-EXTRA_DIST = $(libhtmlhelper_VALASOURCES) libhtmlhelper.vala.stamp
+++ /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 Valadoc;
-using GLib;
-
-
-public interface Valadoc.HtmlHelper {
- protected string? get_html_link ( Settings settings, DocumentedElement element, DocumentedElement? pos ) {
- if ( element is Package ) {
- return "../" + element.name + "/index.html";
- }
-
- string tmp = "";
- string prefix = "";
-
- if ( element != pos ) {
- prefix = "../" + element.package.name;
- }
-
- if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
- tmp = "#" + element.name;
- element = (DocumentedElement)element.parent;
- }
-
- return prefix + "/" + element.full_name () + ".html" + tmp;
- }
-}
-
-
libtagletbold.vala.stamp: $(libtagletbold_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletbold_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtaglettablecell.vala.stamp: $(libtaglettablecell_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtaglettablecell_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletcenter.vala.stamp: $(libtagletcenter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletcenter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletimage.vala.stamp: $(libtagletimage_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletimagedir = $(libdir)/valadoc/plugins/devhelp/taglets/
tagletimage_LTLIBRARIES = libtagletimage.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletimage_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletitalic.vala.stamp: $(libtagletitalic_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletitalic_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletparameter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
using Valadoc;
using GLib;
-using Vala;
using Gee;
+public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet {
+ protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
+ return get_html_link ( settings, element, pos );
+ }
-using Valadoc;
-using GLib;
-using Vala;
-using Gee;
+ public override string to_string () {
+ return to_string_imp ( );
+ }
+
+ public override bool write ( void* res, int max, int index ) {
+ return write_imp ( res, max, index );
+ }
+
+ public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string content, out string[] errmsg ) {
+ return this.parse_imp ( settings, tree, me, content, out errmsg );
+ }
+}
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
- GLib.Type type = typeof ( ParameterHtmlTaglet );
- taglets.set ( "param", type );
+ GLib.Type type = typeof ( LinkHtmlTaglet );
+ taglets.set ( "link", type );
return type;
}
+
libtagletlist.vala.stamp: $(libtagletlist_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletlist_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletlistelement.vala.stamp: $(libtagletlistelement_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletlistelement_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletnotification.vala.stamp: $(libtagletnotification_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletnotification_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletparameter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
using Gee;
-
-using Valadoc;
-using GLib;
-using Vala;
-using Gee;
-
-
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
GLib.Type type = typeof ( ParameterHtmlTaglet );
-libtagletXXXX_VALASOURCES = \
+libtagletreturn_VALASOURCES = \
taglet.vala \
$(NULL)
-BUILT_SOURCES = libtagletXXXX.vala.stamp
+BUILT_SOURCES = libtagletreturn.vala.stamp
-libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+libtagletreturn.vala.stamp: $(libtagletreturn_VALASOURCES)
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
-tagletXXXXdir = $(libdir)/valadoc/plugins/devhelp/taglets/
+tagletreturndir = $(libdir)/valadoc/plugins/devhelp/taglets/
-tagletXXXX_LTLIBRARIES = libtagletXXXX.la
+tagletreturn_LTLIBRARIES = libtagletreturn.la
-libtagletXXXX_la_SOURCES = \
- libtagletXXXX.vala.stamp \
- $(libtagletXXXX_VALASOURCES:.vala=.c) \
- $(libtagletXXXX_VALASOURCES:.vala=.h) \
+libtagletreturn_la_SOURCES = \
+ libtagletreturn.vala.stamp \
+ $(libtagletreturn_VALASOURCES:.vala=.c) \
+ $(libtagletreturn_VALASOURCES:.vala=.h) \
$(NULL)
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
$(NULL)
-libtagletXXXX_la_LDFLAGS = -module -avoid-version
+libtagletreturn_la_LDFLAGS = -module -avoid-version
-libtagletXXXX_la_LIBADD = \
+libtagletreturn_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
-EXTRA_DIST = $(libtagletXXXX_VALASOURCES) libtagletXXXX.vala.stamp
+EXTRA_DIST = $(libtagletreturn_VALASOURCES) libtagletreturn.vala.stamp
libtagletright.vala.stamp: $(libtagletright_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletright_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletsee_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
-public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet, HtmlHelper {
+public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet {
protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( settings, element, pos );
+ return get_html_link ( settings, element, pos );
}
public override bool write_block_start ( void* ptr ) {
libtagletsrcsample.vala.stamp: $(libtagletsrcsample_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletsrcsample_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletstring_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtaglettable.vala.stamp: $(libtaglettable_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtaglettable_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libexceptionparameter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletunderline.vala.stamp: $(libtagletunderline_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletunderline_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletversion_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletwikilink.vala.stamp: $(libtagletwikilink_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletwikilink_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
SUBDIRS = \
- linkhelper \
doclet \
taglets \
deps \
$(NULL)
-# langlet \
-# doclet \
-# $(NULL)
-
NULL =
-vapidir = $(libdir)/valadoc/plugins/template/deps/
+vapidir = $(libdir)/valadoc/plugins/html/deps/
-dist_vapi_DATA = \
- abstractclass.png \
- abstractmethod.png \
- staticmethod.png \
- main.css \
+dist_vapi_DATA = \
+ warning.png \
+ abstractclass.png \
+ abstractmethod.png \
+ staticmethod.png \
+ style.css \
class.png \
- enumvalue.png \
interface.png \
packages.png \
constant.png \
- errorcode.png \
method.png \
property.png \
delegate.png \
field.png \
package.png \
struct.png \
+ abstractproperty.png \
+ constructor.png \
+ virtualmethod.png \
+ virtualproperty.png \
$(NULL)
dist_noinst_DATA = \
ul.external_link {
}
-
.main_optional_parameter {
font-style: italic;
}
-
-
.main_diagram {
display: block;
margin: 0px auto;
}
.site_navi {
- text-align: right;;
+ text-align: right;
}
-.main_inline_navigation_brief_description {
- color: #808080;
+.main_notification {
+ padding-right: 10px;
+ padding-left: 60px;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ border-color: #aaaaff;
+ background-color: #eeeeff;
+ border-style: solid;
+ border-width: 1px;
+ margin: 10px;
+ min-height: 48px;
+ background-position: 6px 0.5em;
+ background-repeat: no-repeat;
+ background-image: url(warning.png);
}
-div.cms_message {
+.main_table {
+ border-collapse: collapse;
+ border: 1px solid #aaaaff;
+ background: #eeeeff;
+ margin-right:auto;
+ margin-left:auto;
+}
+
+.main_sourcesample {
+ padding-right: 10px;
+ padding-left: 5px;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ margin: 10px;
+
+ border-color: #aaaaff;
+ background-color: #eeeeff;
+ border-style: solid;
+ border-width: 1px;
}
.site_content {
font-size: 10px;
- margin-left: 255px;
+ margin-left: 250px;
margin-right: 5px;
text-align: left;
}
-
-.main_inline_navigation_errorcode {
- list-style-image:url(errorcode.png);
+.main_inline_navigation_virtual_property {
+ list-style-image: url(virtualproperty.png);
}
-.main_inline_navigation_enumvalue {
- list-style-image:url(enumvalue.png);
+.main_inline_navigation_abstract_property {
+ list-style-image: url(abstractproperty.png);
+}
+.navi_abstract_prop {
+ list-style-image: url(abstractproperty.png);
}
+.navi_virtual_prop {
+ list-style-image: url(virtualproperty.png);
+}
+
+
+
.css_content_link_constant {
background-image:url(constant.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_namespace {
background-image:url(namespace.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_struct {
background-image:url(struct.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_interface {
background-image:url(interface.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_enum {
background-image:url(enum.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_errordomain {
background-image:url(errordomain.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_delegate {
background-image:url(delegate.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_signal {
background-image:url(signal.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_field {
background-image:url(field.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_enumvalue {
background-image:url(enumvalue.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_errorcode {
background-image:url(errorcode.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_class {
background-image:url(class.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_abstract_class {
background-image:url(abstractclass.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_property {
background-image:url(property.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_virtual_property {
- background-image:url(property.png);
- padding-left:17px;
- padding-top:1px;
+ background-image:url(virtualproperty.png);
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_abstract_property {
- background-image:url(property.png);
- padding-left:17px;
- padding-top:1px;
+ background-image:url(abstractproperty.png);
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_method {
background-image:url(method.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_static_method {
background-image:url(staticmethod.png);
- padding-left:17px;
- padding-top:1px;
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_virtual_method {
- background-image:url(method.png);
- padding-left:17px;
- padding-top:1px;
+ background-image:url(virtualmethod.png);
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_abstract_method {
- background-image:url( abstractmethod.png );
- padding-left:17px;
- padding-top:1px;
+ background-image:url(abstractmethod.png);
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
.css_content_link_construction_method {
- background-image:url(method.png);
- padding-left:17px;
- padding-top:1px;
+ background-image:url(constructor.png);
+ display:inline-block;
+ padding-right:17px;
background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
}
-
-.main_inline_navigation_virtual_property {
- list-style-image: url(property.png);
-}
-.main_inline_navigation_abstract_property {
- list-style-image: url(property.png);
+.main_inline_navigation_virtual_method {
+ list-style-image:url(virtualmethod.png);
}
-.navi_abstract_prop {
- list-style-image: url(property.png);
+.main_inline_navigation_errorcode {
+ list-style-image:url(errorcode.png);
}
-.navi_virtual_prop {
- list-style-image: url(property.png);
+.main_inline_navigation_enumvalue {
+ list-style-image:url(enumvalue.png);
}
-
.navi_abstract_class, .main_inline_navigation_abstract_class {
list-style-image: url(abstractclass.png);
}
list-style-image: url( abstractmethod.png );
}
.navi_construction_method, .main_list_m, .main_inline_navigation_construction_method {
- list-style-image: url(method.png);
+ list-style-image: url(constructor.png);
}
.navi_static_method, .main_inline_navigation_static_method {
list-style-image: url(staticmethod.png);
}
-
-.navi_virtual_method, .main_inline_navigation_virtual_method {
- list-style-image: url(method.png);
-}
-
.navi_package_index, .main_inline_navigation_package {
list-style-image: url(packages.png);
}
+.navi_virtual_method {
+ list-style-image: url(virtualmethod.png);
+}
.main_navi_enval {
list-style-image: url(enumvalue.png);
}
.navi_package, .main_inline_navigation_package {
list-style-image: url(package.png);
}
+
.main_inline_navigation_constant, .navi_constant {
list-style-image: url(constant.png);
- text-decoration: none;
- color: #214b87;
}
a.navi_link:hover, a.external_link:hover {
text-decoration: underline;
-# color: #ff0000;
}
-libdoclet_VALASOURCES = \
- template.vala \
+
+libdoclet_VALASOURCES = \
+ template.vala \
$(NULL)
libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
- $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --vapidir . --pkg docletconfig --save-temps $^
+ $(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --pkg libxml-2.0 --vapidir . --pkg docletconfig --basedir . $^
touch $@
-docletdir = $(libdir)/valadoc/plugins/template/
+docletdir = $(libdir)/valadoc/plugins/html/
doclet_LTLIBRARIES = libdoclet.la
AM_CFLAGS = -g \
- -DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/template/\" \
+ -DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/html/\" \
-I ../../../libvaladoc/ \
-I ../../htmlhelpers/ \
- -I ../linkhelper/ \
-I ../ \
$(GLIB_CFLAGS) \
+ $(LIBXML2_CFLAGS) \
$(LIBVALA_CFLAGS) \
$(NULL)
libdoclet_la_LIBADD = \
- ../../htmlhelpers/libhtmlhelpers.la \
../../../libvaladoc/libvaladoc.la \
- ../linkhelper/libhtmlhelper.la \
+ ../../htmlhelpers/libhtmlhelpers.la \
+ $(LIBXML2_LIBS) \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(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 Valadoc;
+using GLib;
+using Xml;
+using Gee;
+
+
+
+public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet {
+ protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
+ return get_html_link ( this.settings, element, pos );
+ }
+
+ public LangletIndex ( Settings settings ) {
+ base ( settings );
+ }
+}
+
+
+
+
+
+public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet {
+ private const string css_path_package = "style.css";
+ private const string css_path = "../style.css";
+ private string package_dir_name = ""; // remove
+
+ private string get_real_path ( DocumentedElement element ) {
+ return GLib.Path.build_filename ( this.settings.get_real_path ( ), element.package.name, element.full_name () + ".html" );
+ }
+
+ public override void initialisation ( Settings settings, Tree tree ) {
+ this.settings = settings;
+
+ var rt = DirUtils.create ( this.settings.path, 0777 );
+ copy_directory ( GLib.Path.build_filename ( Config.doclet_path, "deps" ), this.settings.path );
+ rt = DirUtils.create ( this.settings.path + settings.pkg_name, 0777 );
+
+ GLib.FileStream file = GLib.FileStream.open ( GLib.Path.build_filename ( this.settings.path, "index.html" ), "w" );
+ this.write_file_header ( file, this.css_path_package, this.settings.pkg_name );
+ this.write_navi_packages ( file, tree );
+ this.write_packages_content ( file, tree );
+ this.write_file_footer ( file );
+ file = null;
+
+
+ this.langlet = new Valadoc.LangletIndex ( settings );
+
+ Gee.ReadOnlyCollection<Package> packages = tree.get_package_list ();
+ foreach ( Package pkg in packages ) {
+ pkg.visit ( this );
+ }
+ }
+
+ public override void visit_package ( Package file ) {
+ string pkg_name = file.name;
+ string path = GLib.Path.build_filename ( this.settings.path, pkg_name );
+ this.package_dir_name = pkg_name;
+
+ var rt = DirUtils.create ( path, 0777 );
+ rt = DirUtils.create ( GLib.Path.build_filename ( path, "img" ), 0777 );
+
+ GLib.FileStream ifile = GLib.FileStream.open ( GLib.Path.build_filename ( path, "index.htm" ), "w" );
+ this.write_file_header ( ifile, this.css_path, pkg_name );
+ this.write_navi_file ( ifile, file, file );
+ this.write_file_content ( ifile, file, file );
+ this.write_file_footer ( ifile );
+ ifile = null;
+
+ file.visit_namespaces ( this );
+ }
+
+ public override void visit_namespace ( Namespace ns ) {
+ string rpath = this.get_real_path ( ns );
+
+ if ( ns.name != null ) {
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w" );
+ this.write_file_header ( file, this.css_path, ns.full_name() );
+ this.write_navi_namespace ( file, ns );
+ this.write_namespace_content ( file, ns, ns );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ // file:
+ ns.visit_namespaces ( this );
+ ns.visit_classes ( this );
+ ns.visit_interfaces ( this );
+ ns.visit_structs ( this );
+ ns.visit_enums ( this );
+ ns.visit_error_domains ( this );
+ ns.visit_delegates ( this );
+ ns.visit_methods ( this );
+ ns.visit_fields ( this );
+ ns.visit_constants ( this );
+ }
+
+ public override void visit_interface ( Interface iface ) {
+ string rpath = this.get_real_path ( iface );
+
+ iface.visit_classes ( this );
+ iface.visit_structs ( this );
+ iface.visit_delegates ( this );
+ iface.visit_methods ( this );
+ iface.visit_signals ( this );
+ iface.visit_properties ( this );
+ iface.visit_fields ( this );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, iface.full_name() );
+ this.write_navi_interface ( file, iface, iface );
+ this.write_interface_content ( file, iface, iface );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_class ( Class cl ) {
+ string rpath = this.get_real_path ( cl );
+
+ cl.visit_construction_methods ( this );
+ cl.visit_classes ( this );
+ cl.visit_structs ( this );
+ cl.visit_enums ( this );
+ cl.visit_delegates ( this );
+ cl.visit_methods ( this );
+ cl.visit_signals ( this );
+ cl.visit_properties ( this );
+ cl.visit_fields ( this );
+ cl.visit_constants ( this );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, cl.full_name() );
+ this.write_navi_class ( file, cl, cl );
+ this.write_class_content ( file, cl, cl );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_struct ( Struct stru ) {
+ string rpath = this.get_real_path ( stru );
+
+ stru.visit_construction_methods ( this );
+ stru.visit_methods ( this );
+ stru.visit_fields ( this );
+ stru.visit_constants ( this );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, stru.full_name() );
+ this.write_navi_struct ( file, stru, stru );
+ this.write_struct_content ( file, stru, stru );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_error_domain ( ErrorDomain errdom ) {
+ string rpath = this.get_real_path ( errdom );
+
+ errdom.visit_methods ( this );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, errdom.full_name() );
+ this.write_navi_error_domain ( file, errdom, errdom );
+ this.write_error_domain_content ( file, errdom, errdom );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_enum ( Enum en ) {
+ string rpath = this.get_real_path ( en );
+
+ en.visit_enum_values ( this );
+ en.visit_methods ( this );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, en.full_name() );
+ this.write_navi_enum ( file, en, en );
+ this.write_enum_content ( file, en, en );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_property ( Property prop ) {
+ string rpath = this.get_real_path ( prop );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, prop.full_name() );
+ this.write_navi_property ( file, prop );
+ this.write_property_content ( file, prop );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_constant ( Constant constant, ConstantHandler parent ) {
+ string rpath = this.get_real_path ( constant );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, constant.full_name() );
+ this.write_navi_constant ( file, constant );
+ this.write_constant_content ( file, constant, parent );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_field ( Field field, FieldHandler parent ) {
+ string rpath = this.get_real_path ( field );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, field.full_name() );
+ this.write_navi_field ( file, field );
+ this.write_field_content ( file, field, parent );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_error_code ( ErrorCode errcode ) {
+ }
+
+ public override void visit_enum_value ( EnumValue enval ) {
+ }
+
+ public override void visit_delegate ( Delegate del ) {
+ string rpath = this.get_real_path ( del );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, del.full_name() );
+ this.write_navi_delegate ( file, del );
+ this.write_delegate_content ( file, del );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_signal ( Signal sig ) {
+ string rpath = this.get_real_path ( sig );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, sig.full_name() );
+ this.write_navi_signal ( file, sig );
+ write_signal_content ( file, sig );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
+ string rpath = this.get_real_path ( m );
+
+ GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
+ this.write_file_header ( file, this.css_path, m.full_name() );
+ this.write_navi_method ( file, m );
+ this.write_method_content ( file, m, parent );
+ this.write_file_footer ( file );
+ file = null;
+ }
+
+ public override void cleanups () {
+ }
+}
+
+
+
+
+
+[ModuleInit]
+public Type register_plugin ( ) {
+ return typeof ( Valadoc.HtmlDoclet );
+}
+
SUBDIRS = \
+ image \
see \
link \
- image \
center \
right \
italic \
- underline \
- return \
bold \
source \
+ underline \
+ return \
+ string \
+ throws \
notification\
+ version \
table \
cell \
list \
listelement\
- string \
- throws \
- version \
parameter \
wikilink \
$(NULL)
libtagletbold.vala.stamp: $(libtagletbold_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletbolddir = $(libdir)/valadoc/plugins/template/taglets/
+tagletbolddir = $(libdir)/valadoc/plugins/html/taglets/
tagletbold_LTLIBRARIES = libtagletbold.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletbold_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtaglettablecell.vala.stamp: $(libtaglettablecell_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-taglettablecelldir = $(libdir)/valadoc/plugins/template/taglets/
+taglettablecelldir = $(libdir)/valadoc/plugins/html/taglets/
taglettablecell_LTLIBRARIES = libtaglettablecell.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtaglettablecell_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletcenter.vala.stamp: $(libtagletcenter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletcenterdir = $(libdir)/valadoc/plugins/html/taglets/
-tagletimage_LTLIBRARIES = libtagletcenter.la
+tagletcenter_LTLIBRARIES = libtagletcenter.la
libtagletcenter_la_SOURCES = \
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletcenter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletimage.vala.stamp: $(libtagletimage_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/
tagletimage_LTLIBRARIES = libtagletimage.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletimage_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletitalic.vala.stamp: $(libtagletitalic_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletitalicdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletitalicdir = $(libdir)/valadoc/plugins/html/taglets/
tagletitalic_LTLIBRARIES = libtagletitalic.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletitalic_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletlink.vala.stamp: $(libtagletlink_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
-tagletlinkdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletlinkdir = $(libdir)/valadoc/plugins/html/taglets/
tagletlink_LTLIBRARIES = libtagletlink.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletlink_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
using Gee;
-public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet, LinkHelper {
+
+public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet {
protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( settings, element, pos );
+ return get_html_link ( settings, element, pos );
}
public override string to_string () {
libtagletlist.vala.stamp: $(libtagletlist_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletimagedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletlistdir = $(libdir)/valadoc/plugins/html/taglets/
-tagletimage_LTLIBRARIES = libtagletlist.la
+tagletlist_LTLIBRARIES = libtagletlist.la
libtagletlist_la_SOURCES = \
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletlist_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletlistelement.vala.stamp: $(libtagletlistelement_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletlistelementdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/
-tagletlistelement_LTLIBRARIES = libtagletlistelement.la
+tagletimage_LTLIBRARIES = libtagletlistelement.la
libtagletlistelement_la_SOURCES = \
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletlistelement_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletnotification.vala.stamp: $(libtagletnotification_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . --save-temps $^
touch $@
-tagletnotificationdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletnotificationdir = $(libdir)/valadoc/plugins/html/taglets/
tagletnotification_LTLIBRARIES = libtagletnotification.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletnotification_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
-tagletparameterdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletparameterdir = $(libdir)/valadoc/plugins/html/taglets/
tagletparameter_LTLIBRARIES = libtagletparameter.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletparameter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
--- /dev/null
+# src/Makefile.am
+
+
+
+libtagletreturn_VALASOURCES = \
+ taglet.vala \
+ $(NULL)
+
+
+BUILT_SOURCES = libtagletreturn.vala.stamp
+
+
+libtagletreturn.vala.stamp: $(libtagletreturn_VALASOURCES)
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
+ touch $@
+
+
+
+
+tagletXXXXdir = $(libdir)/valadoc/plugins/html/taglets/
+
+tagletXXXX_LTLIBRARIES = libtagletreturn.la
+
+
+libtagletreturn_la_SOURCES = \
+ libtagletreturn.vala.stamp \
+ $(libtagletreturn_VALASOURCES:.vala=.c) \
+ $(libtagletreturn_VALASOURCES:.vala=.h) \
+ $(NULL)
+
+
+
+AM_CFLAGS = -g \
+ -I ../../../../libvaladoc/ \
+ -I ../../../htmlhelpers/ \
+ -I ../../ \
+ $(GLIB_CFLAGS) \
+ $(LIBVALA_CFLAGS) \
+ $(NULL)
+
+
+libtagletreturn_la_LDFLAGS = -module -avoid-version
+
+
+libtagletreturn_la_LIBADD = \
+ ../../../../libvaladoc/libvaladoc.la \
+ ../../../htmlhelpers/libhtmlhelpers.la \
+ $(GLIB_LIBS) \
+ $(LIBVALA_LIBS) \
+ $(NULL)
+
+
+
+
+EXTRA_DIST = $(libtagletreturn_VALASOURCES) libtagletreturn.vala.stamp
+
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
GLib.Type type = typeof ( ReturnHtmlTaglet );
taglets.set ( "return", type );
return type;
}
+
libtagletright.vala.stamp: $(libtagletright_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletrightdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletrightdir = $(libdir)/valadoc/plugins/html/taglets/
tagletright_LTLIBRARIES = libtagletright.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletright_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
+
-
-tagletseedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletseedir = $(libdir)/valadoc/plugins/html/taglets/
tagletsee_LTLIBRARIES = libtagletsee.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletsee_la_LDFLAGS = -module -avoid-version
-libtagletsee_la_LIBADD = \
- ../../../../libvaladoc/libvaladoc.la \
+libtagletsee_la_LIBADD = \
+ ../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
- $(GLIB_LIBS) \
- $(LIBVALA_LIBS) \
+ $(GLIB_LIBS) \
+ $(LIBVALA_LIBS) \
$(NULL)
-public class Valadoc.SeeHtmlTaglet : SeeHtmlHelperTaglet, LinkHelper {
+public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet {
protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( settings, element, pos );
+ return get_html_link ( settings, element, pos );
}
public override bool write_block_start ( void* ptr ) {
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
- GLib.Type type = typeof ( SeeHtmlTaglet );
+ GLib.Type type = typeof ( SeeDevhelpTaglet );
taglets.set ( "see", type );
return type;
}
+
libtagletsrcsample.vala.stamp: $(libtagletsrcsample_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletsrcsampledir = $(libdir)/valadoc/plugins/template/taglets/
+tagletsrcsampledir = $(libdir)/valadoc/plugins/html/taglets/
tagletsrcsample_LTLIBRARIES = libtagletsrcsample.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletsrcsample_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
--- /dev/null
+# src/Makefile.am
+
+
+
+libtagletstring_VALASOURCES = \
+ taglet.vala \
+ $(NULL)
+
+
+BUILT_SOURCES = libtagletstring.vala.stamp
+
+
+libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES)
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
+ touch $@
+
+
+
+
+tagletstringdir = $(libdir)/valadoc/plugins/html/taglets/
+
+tagletstring_LTLIBRARIES = libtagletstring.la
+
+
+libtagletstring_la_SOURCES = \
+ libtagletstring.vala.stamp \
+ $(libtagletstring_VALASOURCES:.vala=.c) \
+ $(libtagletstring_VALASOURCES:.vala=.h) \
+ $(NULL)
+
+
+
+AM_CFLAGS = -g \
+ -I ../../../../libvaladoc/ \
+ -I ../../../htmlhelpers/ \
+ -I ../../ \
+ $(GLIB_CFLAGS) \
+ $(LIBVALA_CFLAGS) \
+ $(NULL)
+
+
+libtagletstring_la_LDFLAGS = -module -avoid-version
+
+
+libtagletstring_la_LIBADD = \
+ ../../../../libvaladoc/libvaladoc.la \
+ ../../../htmlhelpers/libhtmlhelpers.la \
+ $(GLIB_LIBS) \
+ $(LIBVALA_LIBS) \
+ $(NULL)
+
+
+
+
+EXTRA_DIST = $(libtagletstring_VALASOURCES) libtagletstring.vala.stamp
+
+
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
- GLib.Type type = typeof ( ExceptionHtmlTaglet );
- taglets.set ( "throws", type );
+ GLib.Type type = typeof ( StringHtmlTaglet );
+ taglets.set ( "", type );
return type;
}
+
+
libtaglettable.vala.stamp: $(libtaglettable_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-taglettabledir = $(libdir)/valadoc/plugins/template/taglets/
+tagletimagedir = $(libdir)/valadoc/plugins/html/taglets/
-taglettable_LTLIBRARIES = libtaglettable.la
+tagletimage_LTLIBRARIES = libtaglettable.la
libtaglettable_la_SOURCES = \
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtaglettable_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --basedir . $^
touch $@
-exceptionparameterdir = $(libdir)/valadoc/plugins/template/taglets/
+exceptionparameterdir = $(libdir)/valadoc/plugins/html/taglets/
exceptionparameter_LTLIBRARIES = libexceptionparameter.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libexceptionparameter_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletunderline.vala.stamp: $(libtagletunderline_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-
-tagletunderlinedir = $(libdir)/valadoc/plugins/template/taglets/
+tagletunderlinedir = $(libdir)/valadoc/plugins/html/taglets/
tagletunderline_LTLIBRARIES = libtagletunderline.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletunderline_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../htmlhelpers --vapidir ../../../../vapi --pkg valadoc-1.0 --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletversiondir = $(libdir)/valadoc/plugins/template/taglets/
+tagletversiondir = $(libdir)/valadoc/plugins/html/taglets/
tagletversion_LTLIBRARIES = libtagletversion.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletversion_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(NULL)
using Gee;
+
+
[ModuleInit]
public GLib.Type register_plugin ( Gee.HashMap<string, Type> taglets ) {
GLib.Type type = typeof ( SinceHtmlTaglet );
return type;
}
+
+
libtagletwikilink.vala.stamp: $(libtagletwikilink_VALASOURCES)
- $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
+ $(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --basedir . $^
touch $@
-tagletwikilinkdir = $(libdir)/valadoc/plugins/template/taglets/
+tagletwikilinkdir = $(libdir)/valadoc/plugins/html/taglets/
tagletwikilink_LTLIBRARIES = libtagletwikilink.la
AM_CFLAGS = -g \
-I ../../../../libvaladoc/ \
-I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
-I ../../ \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
libtagletwikilink_la_LIBADD = \
../../../../libvaladoc/libvaladoc.la \
../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(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 Valadoc;
-using GLib;
-using Gee;
-
-
-
-
-
-public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper {
- protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( this.settings, element, pos );
- }
-
- public LangletIndex ( Settings settings ) {
- base ( settings );
- }
-}
-
-
-
-
-
-
-public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
- private string current_path = null;
- private string package_name = null;
- private bool is_vapi = false;
-
- private int directory_level = 1;
-
- private string get_css_link ( ) {
- GLib.StringBuilder css_path = new GLib.StringBuilder ( );
- for ( int i = 0; this.directory_level > i; i++ ) {
- css_path.append ( "../" );
- }
- css_path.append ( "main.css" );
- return css_path.str;
- }
-
- protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
- return this.get_html_link ( this.settings, element, pos );
- }
-
- protected override void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) {
- string top = "";
-
- if ( pos != null )
- top = get_html_top_link ( pos ) ;
-
- this.write_top_element_template ( file, top+"packages.html" );
- }
-
-
-/*
- private string get_full_path ( Basic element ) {
- if ( element.name == null )
- return "";
-
- GLib.StringBuilder str = new GLib.StringBuilder ( "" );
-
- for ( var pos = element; pos != null ; pos = pos.parent ) {
- if ( pos is Package )
- break;
-
- str.prepend_unichar ( '/' );
-
- if ( pos.name == null )
- str.prepend ( "0" );
- else
- str.prepend ( pos.name );
- }
-
- string package_name = element.file.name + "/";
-
- str.prepend ( package_name );
- str.append_unichar ( '/' );
- return str.str;
- }
-*/
- public Valadoc.Settings settings {
- construct set;
- protected get;
- }
-
- public override void initialisation ( Settings settings, Tree tree ) {
- this.settings = settings;
-
- DirUtils.create ( this.settings.path, 0777 );
- this.langlet = new Valadoc.LangletIndex ( settings );
-
- Gee.ReadOnlyCollection<Package> packages = tree.get_package_list ();
- foreach ( Package pkg in packages ) {
- pkg.visit ( this );
- }
- }
-
- protected override string get_img_real_path ( DocumentedElement element ) {
- if ( element is Package ) {
- return this.current_path + element.name + ".png";
- }
-
- return this.current_path + "tree.png";
- }
-
- protected override string get_img_path ( DocumentedElement element ) {
- if ( element is Package ) {
- return element.name + ".png";
- }
-
- return "tree.png";
- }
-
- public override void visit_package ( Package file ) {
- this.package_name = file.name;
-
- this.is_vapi = file.is_package;
- if ( this.is_vapi )
- this.files.add ( file );
- else
- source_package = file;
-
- this.current_path = this.settings.path + this.package_name + "/";
-
- DirUtils.create ( this.current_path, 0777 );
- GLib.FileStream sfile = GLib.FileStream.open ( this.current_path + "index.html", "w" );
- this.write_file_header ( sfile, this.get_css_link ( ), file.name );
- this.write_navi_file ( sfile, file, file );
- this.write_file_content ( sfile, file, file );
- this.write_file_footer ( sfile );
- sfile = null;
-
-
- file.visit_namespaces ( this );
- this.current_path = null;
- }
-
-/*
- private bool is_depency ( string dep ) {
- foreach ( string file in this.settings.files ) {
- if ( dep == file )
- return false;
- }
- return true;
- }
-*/
- private Gee.ArrayList<Package> files = new Gee.ArrayList<Package> ();
- private Package source_package;
-
- public override void cleanups () {
- this.directory_level = 0;
- copy_directory ( Config.doclet_path + "deps/", this.settings.path );
-
-
- if ( this.source_package != null ) {
- GLib.FileStream sfile = GLib.FileStream.open ( this.settings.path + "index.html", "w" );
- this.write_file_header ( sfile, this.get_css_link ( ), source_package.name );
- this.write_navi_file ( sfile, source_package, null );
- this.write_file_content ( sfile, source_package, null );
- this.write_file_footer ( sfile );
- sfile = null;
- }
-
- GLib.FileStream sfile = GLib.FileStream.open ( this.settings.path + "packages.html", "w" );
- string title = ( this.settings.pkg_name == null )? "" : this.settings.pkg_name;
- this.write_file_header ( sfile, this.get_css_link ( ), title );
-
- sfile.printf ( "<h2 class=\"%s\">Packages:</h2>\n", css_title );
- sfile.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-
- foreach ( Package file in this.files ) {
- if ( this.settings.with_deps )
- sfile.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s/index.html\">%s</a></li>\n", css_inline_navigation_package, css_navi_link, file.name, file.name );
- else
- sfile.printf ( "\t<li class=\"%s\">%s</li>\n", css_inline_navigation_package, file.name );
- }
-
- sfile.puts ( "</ul>\n" );
- this.write_file_footer ( sfile );
- }
-
- public override void visit_property ( Property prop ) {
- string path = this.current_path + prop.name + "/";
- DirUtils.create ( path, 0777 );
- this.directory_level++;
-
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), prop.name );
- this.write_navi_property ( file, prop );
- this.write_property_content ( file, prop );
- this.write_file_footer ( file );
-
- this.directory_level--;
- file = null;
- }
-
- public override void visit_constant ( Constant constant, ConstantHandler parent ) {
- string path = this.current_path + constant.name + "/";
-
- DirUtils.create ( path, 0777 );
- this.directory_level++;
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), constant.name );
- this.write_navi_constant ( file, constant );
- this.write_constant_content ( file, constant, parent );
- this.write_file_footer ( file );
- this.directory_level--;
- file = null;
- }
-
- public override void visit_field ( Field field, FieldHandler parent ) {
- string path = this.current_path + field.name + "/";
- DirUtils.create ( path, 0777 );
- this.directory_level++;
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), field.name );
- this.write_navi_field ( file, field );
- this.write_field_content ( file, field, parent );
- this.write_file_footer ( file );
- this.directory_level--;
- file = null;
- }
-
- public override void visit_delegate ( Delegate del ) {
- string path = this.current_path + del.name + "/";
- DirUtils.create ( path, 0777 );
-
- this.directory_level++;
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), del.name );
- this.write_navi_delegate ( file, del );
- this.write_delegate_content ( file, del );
- this.write_file_footer ( file );
- this.directory_level--;
- file = null;
- }
-
- public override void visit_signal ( Signal sig ) {
- string path = this.current_path + sig.name + "/";
- this.directory_level++;
-
- DirUtils.create ( path, 0777 );
-
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), sig.name );
- this.write_navi_signal ( file, sig );
- write_signal_content ( file, sig );
- this.write_file_footer ( file );
-
- this.directory_level--;
- file = null;
- }
-
- public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
- string path = this.current_path + m.name + "/";
- DirUtils.create ( path, 0777 );
-
- this.directory_level++;
- GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), m.name );
- this.write_navi_method ( file, m );
- this.write_method_content ( file, m, parent );
- this.write_file_footer ( file );
-
- this.directory_level--;
- file = null;
- }
-
- public override void visit_namespace ( Namespace ns ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- if ( ns.name == null ) {
- string tmp = this.current_path + "0/";
- this.current_path = tmp;
- }
- else {
- string tmp = this.current_path + ns.name + "/";
- this.current_path = tmp;
- }
-
- DirUtils.create ( this.current_path, 0777 );
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
- this.write_file_header ( file, this.get_css_link ( ), ns.name );
- this.write_navi_namespace ( file, ns );
- this.write_namespace_content ( file, ns, ns );
- this.write_file_footer ( file );
- file = null;
-
- // file:
- ns.visit_namespaces ( this );
- ns.visit_classes ( this );
- ns.visit_interfaces ( this );
- ns.visit_structs ( this );
- ns.visit_enums ( this );
- ns.visit_error_domains ( this );
- ns.visit_delegates ( this );
- ns.visit_methods ( this );
- ns.visit_fields ( this );
- ns.visit_constants ( this );
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_enum ( Enum en ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- this.current_path += en.name + "/";
- DirUtils.create ( this.current_path, 0777 );
-
- en.visit_enum_values ( this );
- en.visit_methods ( this );
-
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), en.name );
- this.write_navi_enum ( file, en, en );
- this.write_enum_content ( file, en, en );
- this.write_file_footer ( file );
- file = null;
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_error_domain ( ErrorDomain errdom ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- this.current_path += errdom.name + "/";
- DirUtils.create ( this.current_path, 0777 );
-
- errdom.visit_methods ( this );
-
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), errdom.name );
- this.write_navi_error_domain ( file, errdom, errdom );
- this.write_error_domain_content ( file, errdom, errdom );
- this.write_file_footer ( file );
- file = null;
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_struct ( Struct stru ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- this.current_path += stru.name + "/";
- DirUtils.create ( this.current_path, 0777 );
-
- stru.visit_construction_methods ( this );
- stru.visit_methods ( this );
- stru.visit_fields ( this );
- stru.visit_constants ( this );
-
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), stru.name );
- this.write_navi_struct ( file, stru, stru );
- this.write_struct_content ( file, stru, stru );
- this.write_file_footer ( file );
- file = null;
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_class ( Class cl ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- this.current_path += cl.name + "/";
- DirUtils.create ( this.current_path, 0777 );
-
- cl.visit_construction_methods ( this );
- cl.visit_classes ( this );
- cl.visit_structs ( this );
- cl.visit_enums ( this );
- cl.visit_delegates ( this );
- cl.visit_methods ( this );
- cl.visit_signals ( this );
- cl.visit_properties ( this );
- cl.visit_fields ( this );
- cl.visit_constants ( this );
-
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
- this.write_file_header ( file, this.get_css_link ( ), cl.name );
- this.write_navi_class ( file, cl, cl );
- this.write_class_content ( file, cl, cl );
- this.write_file_footer ( file );
- file = null;
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_interface ( Interface iface ) {
- string old_path = this.current_path;
- this.directory_level++;
-
- this.current_path += iface.name + "/";
- DirUtils.create ( this.current_path, 0777 );
-
- iface.visit_classes ( this );
- iface.visit_structs ( this );
- iface.visit_delegates ( this );
- iface.visit_methods ( this );
- iface.visit_signals ( this );
- iface.visit_properties ( this );
- iface.visit_fields ( this );
-
- GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
- this.write_file_header ( file, this.get_css_link ( ), iface.name );
- this.write_navi_interface ( file, iface, iface );
- this.write_interface_content ( file, iface, iface );
- this.write_file_footer ( file );
- file = null;
-
- this.current_path = old_path;
- this.directory_level--;
- }
-
- public override void visit_error_code ( ErrorCode errcode ) {
- }
-
- public override void visit_enum_value ( EnumValue enval ) {
- }
-}
-
-
-
-
-
-[ModuleInit]
-public Type register_plugin ( ) {
- return typeof ( Valadoc.HtmlDoclet );
-}
-
+++ /dev/null
-# src/Makefile.am
-
-
-
-libhtmlhelper_VALASOURCES = \
- helper.vala \
- $(NULL)
-
-
-BUILT_SOURCES = libhtmlhelper.vala.stamp
-
-
-libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
- $(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 $^
- touch $@
-
-
-
-htmlhelperdir = $(libdir)/valadoc/plugins/template/
-htmlhelper_LTLIBRARIES = libhtmlhelper.la
-
-
-libhtmlhelper_la_SOURCES = \
- libhtmlhelper.vala.stamp \
- $(libhtmlhelper_VALASOURCES:.vala=.c) \
- $(libhtmlhelper_VALASOURCES:.vala=.h) \
- $(NULL)
-
-
-AM_CFLAGS = \
- -I ../../../libvaladoc/ \
- -I ../../htmlhelpers/ \
- $(LIBVALA_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(NULL)
-
-
-libhtmlhelper_la_LIBADD = \
- ../../../libvaladoc/libvaladoc.la \
- ../../htmlhelpers/libhtmlhelpers.la \
- $(LIBVALA_LIBS) \
- $(GLIB_LIBS) \
- $(NULL)
-
-
-EXTRA_DIST = $(libhtmlhelper_VALASOURCES) libhtmlhelper.vala.stamp
+++ /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;
-
-
-
-
-public interface Valadoc.LinkHelper {
- protected string get_html_top_link ( DocumentedElement? postag ) {
- GLib.StringBuilder str = new GLib.StringBuilder ( "" );
- Valadoc.Basic pos = postag;
-
- while ( pos != null ) {
- str.append ( "../" );
- pos = pos.parent;
- }
- return str.str;
- }
-
- protected string? get_html_link ( Valadoc.Settings settings, DocumentedElement element, DocumentedElement? pos2 ) {
- Package pkg = ( element is Package )? (Package)element : element.package;
- if ( pkg.is_visitor_accessible () == false )
- return null;
-
- GLib.StringBuilder str = new GLib.StringBuilder ( "" );
- DocumentedElement pos = element;
- string? link_id = null;
-
- if ( element is Valadoc.Package == false ) {
- if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
- link_id = "#" + element.name;
- pos = (DocumentedElement)pos.parent;
- }
- else if ( element is Visitable ) {
- if ( !((Visitable)element).is_visitor_accessible() )
- return null;
- }
-
- while ( pos is Package == false ) {
- string name = pos.name;
- if ( name == null )
- str.prepend ( "0" );
- else
- str.prepend ( name );
-
- str.prepend ( "/" );
- pos = (DocumentedElement)pos.parent;
- }
- }
-
- str.prepend ( pos.package.name );
- str.prepend ( this.get_html_top_link ( pos2 ) );
- str.append ( "/index.html" );
-
- if ( link_id != null )
- str.append ( link_id );
-
- return str.str;
- }
-}
-
+++ /dev/null
-# src/Makefile.am
-
-
-
-libtagletXXXX_VALASOURCES = \
- taglet.vala \
- $(NULL)
-
-
-BUILT_SOURCES = libtagletXXXX.vala.stamp
-
-
-libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
- touch $@
-
-
-
-
-tagletXXXXdir = $(libdir)/valadoc/plugins/template/taglets/
-
-tagletXXXX_LTLIBRARIES = libtagletXXXX.la
-
-
-libtagletXXXX_la_SOURCES = \
- libtagletXXXX.vala.stamp \
- $(libtagletXXXX_VALASOURCES:.vala=.c) \
- $(libtagletXXXX_VALASOURCES:.vala=.h) \
- $(NULL)
-
-
-
-AM_CFLAGS = -g \
- -I ../../../../libvaladoc/ \
- -I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
- -I ../../ \
- $(GLIB_CFLAGS) \
- $(LIBVALA_CFLAGS) \
- $(NULL)
-
-
-libtagletXXXX_la_LDFLAGS = -module -avoid-version
-
-
-libtagletXXXX_la_LIBADD = \
- ../../../../libvaladoc/libvaladoc.la \
- ../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
- $(GLIB_LIBS) \
- $(LIBVALA_LIBS) \
- $(NULL)
-
-
-
-
-EXTRA_DIST = $(libtagletXXXX_VALASOURCES) libtagletXXXX.vala.stamp
+++ /dev/null
-# src/Makefile.am
-
-
-
-libexceptionparameter_VALASOURCES = \
- taglet.vala \
- $(NULL)
-
-
-BUILT_SOURCES = libexceptionparameter.vala.stamp
-
-
-libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
- $(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
- touch $@
-
-
-
-
-exceptionparameterdir = $(libdir)/valadoc/plugins/template/taglets/
-
-exceptionparameter_LTLIBRARIES = libexceptionparameter.la
-
-
-libexceptionparameter_la_SOURCES = \
- libexceptionparameter.vala.stamp \
- $(libexceptionparameter_VALASOURCES:.vala=.c) \
- $(libexceptionparameter_VALASOURCES:.vala=.h) \
- $(NULL)
-
-
-
-AM_CFLAGS = -g \
- -I ../../../../libvaladoc/ \
- -I ../../../htmlhelpers/ \
- -I ../../linkhelper/ \
- -I ../../ \
- $(GLIB_CFLAGS) \
- $(LIBVALA_CFLAGS) \
- $(NULL)
-
-
-libexceptionparameter_la_LDFLAGS = -module -avoid-version
-
-
-libexceptionparameter_la_LIBADD = \
- ../../../../libvaladoc/libvaladoc.la \
- ../../../htmlhelpers/libhtmlhelpers.la \
- ../../linkhelper/libhtmlhelper.la \
- $(GLIB_LIBS) \
- $(LIBVALA_LIBS) \
- $(NULL)
-
-
-
-
-EXTRA_DIST = $(libexceptionparameter_VALASOURCES) libexceptionparameter.vala.stamp
AM_CFLAGS = \
-I ../../libvaladoc/ \
+ $(LIBGVC_CFLAGS) \
$(LIBVALA_CFLAGS) \
$(GLIB_CFLAGS) \
$(NULL)
libhtmlhelper_la_LIBADD = \
../../libvaladoc/libvaladoc.la \
+ $(LIBGVC_LIBS) \
$(LIBVALA_LIBS) \
$(GLIB_LIBS) \
$(NULL)
namespace Valadoc {
+ public const string css_inline_navigation = "main_inline_navigation";
+ public const string css_inline_navigation_errorcode = "main_inline_navigation_errorcode";
+ public const string css_inline_navigation_enumvalue = "main_inline_navigation_enumvalue";
+ public const string css_inline_navigation_property = "main_inline_navigation_property";
+ public const string css_inline_navigation_virtual_property = "main_inline_navigation_virtual_property";
+ public const string css_inline_navigation_abstract_property = "main_inline_navigation_abstract_property";
+ public const string css_inline_navigation_method = "main_inline_navigation_method";
+ public const string css_inline_navigation_static_method = "main_inline_navigation_static_method";
+ public const string css_inline_navigation_virtual_method = "main_inline_navigation_virtual_method";
+ public const string css_inline_navigation_abstract_method = "main_inline_navigation_abstract_method";
+ public const string css_inline_navigation_construction_method = "main_inline_navigation_construction_method";
+ public const string css_inline_navigation_brief_description = "main_inline_navigation_brief_description";
+ public const string css_inline_navigation_signal = "main_inline_navigation_signal";
+ public const string css_inline_navigation_fields = "main_inline_navigation_fields";
+ public const string css_inline_navigation_abstract_class = "main_inline_navigation_abstract_class";
+ public const string css_inline_navigation_class = "main_inline_navigation_class";
+ public const string css_inline_navigation_enum = "main_inline_navigation_enum";
+ public const string css_inline_navigation_struct = "main_inline_navigation_struct";
+ public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
+ public const string css_inline_navigation_constant = "main_inline_navigation_constant";
+ public const string css_inline_navigation_namespace = "main_inline_navigation_namespace";
+ public const string css_inline_navigation_package = "main_inline_navigation_package";
+ public const string css_inline_navigation_interface = "main_navigation_interface";
+ public const string css_inline_navigation_errordomain = "main_inline_navigation_errordomain";
+ public const string css_site_header = "site_header";
+ public const string css_navi_package_index = "navi_package_index";
+ public const string css_navi_package = "navi_package";
+ public const string css_navi_creation_method = "navi_creation_method";
+ public const string css_navi_error_domain = "navi_error_domain";
+ public const string css_navi_namespace = "navi_namespace";
+ public const string css_navi_abstract_method = "navi_abstract_method";
+ public const string css_navi_virtual_method = "navi_virtual_method";
+ public const string css_navi_static_method = "navi_static_method";
+ public const string css_navi_construction_method = "navi_construction_method";
+ public const string css_navi_method = "navi_method";
+ public const string css_navi_struct = "navi_struct";
+ public const string css_navi_iface = "navi_iface";
+ public const string css_navi_field = "navi_field";
+ public const string css_navi_class = "navi_class";
+ public const string css_navi_abstract_class = "navi_abstract_class";
+ public const string css_navi_enum = "navi_enum";
+ public const string css_navi_link = "navi_link";
+ public const string css_navi_constant = "navi_constant";
+ public const string css_navi_prop = "navi_prop";
+ public const string css_navi_abstract_prop = "navi_abstract_prop";
+ public const string css_navi_virtual_prop = "navi_virtual_prop";
+ public const string css_navi_del = "navi_del";
+ public const string css_navi_sig = "navi_sig";
+ public const string css_navi = "navi_main";
+ public const string css_navi_enval = "main_navi_enval";
+ public const string css_navi_errdomcode = "main_navi_errdomcode";
+ public const string css_navi_hr = "navi_hr";
+ public const string css_errordomain_table_name = "main_errordomain_table_name";
+ public const string css_errordomain_table_text = "main_errordomain_table_text";
+ public const string css_errordomain_table = "main_errordomain_table";
+ public const string css_enum_table_name = "main_enum_table_name";
+ public const string css_enum_table_text = "main_enum_table_text";
+ public const string css_enum_table = "main_enum_table";
+ public const string css_diagram = "main_diagram";
+ public const string css_see_list = "main_see_list";
+ public const string css_wiki_table = "main_table";
+ public const string css_notification_area = "main_notification";
+ public const string css_source_sample = "main_sourcesample";
+ public const string css_exception_table = "main_parameter_table";
+ public const string css_parameter_table_text = "main_parameter_table_text";
+ public const string css_parameter_table_name = "main_parameter_table_name";
+ public const string css_parameter_table = "main_parameter_table";
+ public const string css_title = "main_title";
+ public const string css_other_type = "main_other_type";
+ public const string css_basic_type = "main_basic_type";
+ public const string css_keyword = "main_keyword";
+ public const string css_optional_parameter = "main_optional_parameter";
+ public const string css_code_definition = "main_code_definition";
+ public const string css_headline_hr = "main_hr";
+ public const string css_hr = "main_hr";
+ public const string css_list_errdom = "main_list_errdom";
+ public const string css_list_en = "main_list_en";
+ public const string css_list_ns = "main_list_ns";
+ public const string css_list_cl = "main_list_cl";
+ public const string css_list_iface = "main_list_iface";
+ public const string css_list_stru = "main_list_stru";
+ public const string css_list_field = "main_list_field";
+ public const string css_list_prop = "main_list_prop";
+ public const string css_list_del = "main_list_del";
+ public const string css_list_sig = "main_list_sig";
+ public const string css_list_m = "main_list_m";
+ public const string css_style_navigation = "site_navigation";
+ public const string css_style_content = "site_content";
+ public const string css_style_body = "site_body";
+ public const string css_content_link_constant = "css_content_link_constant";
+ public const string css_content_link_namespace = "css_content_link_namespace";
+ public const string css_content_link_struct = "css_content_link_struct";
+ public const string css_content_link_interface = "css_content_link_interface";
+ public const string css_content_link_enum = "css_content_link_enum";
+ public const string css_content_link_errordomain = "css_content_link_errordomain";
+ public const string css_content_link_delegate = "css_content_link_delegate";
+ public const string css_content_link_signal = "css_content_link_signal";
+ public const string css_content_link_field = "css_content_link_field";
+ public const string css_content_link_enumvalue = "css_content_link_enumvalue";
+ public const string css_content_link_errorcode = "css_content_link_errorcode";
+ public const string css_content_link_class = "css_content_link_class";
+ public const string css_content_link_abstract_class = "css_content_link_abstract_class";
+ public const string css_content_link_property = "css_content_link_property";
+ public const string css_content_link_virtual_property = "css_content_link_virtual_property";
+ public const string css_content_link_abstract_property = "css_content_link_abstract_property";
+ public const string css_content_link_method = "css_content_link_method";
+ public const string css_content_link_static_method = "css_content_link_static_method";
+ public const string css_content_link_virtual_method = "css_content_link_virtual_method";
+ public const string css_content_link_abstract_method = "css_content_link_abstract_method";
+ public const string css_content_link_construction_method = "css_content_link_construction_method";
+
+
+ public string? get_html_link ( Settings settings, DocumentedElement element, DocumentedElement? pos ) {
+ if ( element is Package ) {
+ return ( ((Package)element).is_visitor_accessible() == true )? ((pos == null)? "" : "../") + element.name + "/index.htm" : null;
+ }
+
+ if ( element is Visitable ) {
+ if ( ((Visitable)element).is_visitor_accessible () == false )
+ return null;
+
+ if ( element.package.is_visitor_accessible () == false )
+ return null;
+ }
+
+ string prefix = "";
+ string tmp = "";
+
+ if ( element != pos ) {
+ prefix = "../" + element.package.name;
+ }
-public const string css_inline_navigation = "main_inline_navigation";
-
-public const string css_inline_navigation_errorcode = "main_inline_navigation_errorcode";
-public const string css_inline_navigation_enumvalue = "main_inline_navigation_enumvalue";
-
-public const string css_inline_navigation_property = "main_inline_navigation_property";
-public const string css_inline_navigation_virtual_property = "main_inline_navigation_virtual_property";
-public const string css_inline_navigation_abstract_property = "main_inline_navigation_abstract_property";
-
-public const string css_inline_navigation_method = "main_inline_navigation_method";
-public const string css_inline_navigation_static_method = "main_inline_navigation_static_method";
-public const string css_inline_navigation_virtual_method = "main_inline_navigation_virtual_method";
-public const string css_inline_navigation_abstract_method = "main_inline_navigation_abstract_method";
-public const string css_inline_navigation_construction_method = "main_inline_navigation_construction_method";
-
-
-
-public const string css_inline_navigation_brief_description = "main_inline_navigation_brief_description";
-
-public const string css_inline_navigation_signal = "main_inline_navigation_signal";
-public const string css_inline_navigation_fields = "main_inline_navigation_fields";
-public const string css_inline_navigation_abstract_class = "main_inline_navigation_abstract_class";
-public const string css_inline_navigation_class = "main_inline_navigation_class";
-public const string css_inline_navigation_enum = "main_inline_navigation_enum";
-public const string css_inline_navigation_struct = "main_inline_navigation_struct";
-public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
-public const string css_inline_navigation_constant = "main_inline_navigation_constant";
-public const string css_inline_navigation_namespace = "main_inline_navigation_namespace";
-public const string css_inline_navigation_package = "main_inline_navigation_package";
-public const string css_inline_navigation_interface = "main_navigation_interface";
-public const string css_inline_navigation_errordomain = "main_inline_navigation_errordomain";
-
-public const string css_site_header = "site_header";
-
-public const string css_navi_package_index = "navi_package_index";
-public const string css_navi_package = "navi_package";
-
-public const string css_navi_creation_method = "navi_creation_method";
-
-public const string css_navi_error_domain = "navi_error_domain";
-public const string css_navi_namespace = "navi_namespace";
-public const string css_navi_abstract_method = "navi_abstract_method";
-public const string css_navi_virtual_method = "navi_virtual_method";
-public const string css_navi_static_method = "navi_static_method";
-public const string css_navi_construction_method = "navi_construction_method";
-public const string css_navi_method = "navi_method";
-public const string css_navi_struct = "navi_struct";
-public const string css_navi_iface = "navi_iface";
-public const string css_navi_field = "navi_field";
-public const string css_navi_class = "navi_class";
-public const string css_navi_abstract_class = "navi_abstract_class";
-public const string css_navi_enum = "navi_enum";
-public const string css_navi_link = "navi_link";
-public const string css_navi_constant = "navi_constant";
-public const string css_navi_prop = "navi_prop";
-public const string css_navi_abstract_prop = "navi_abstract_prop";
-public const string css_navi_virtual_prop = "navi_virtual_prop";
-public const string css_navi_del = "navi_del";
-public const string css_navi_sig = "navi_sig";
-public const string css_navi = "navi_main";
-public const string css_navi_enval = "main_navi_enval";
-public const string css_navi_errdomcode = "main_navi_errdomcode";
-public const string css_navi_hr = "navi_hr";
-
-public const string css_errordomain_table_name = "main_errordomain_table_name";
-public const string css_errordomain_table_text = "main_errordomain_table_text";
-public const string css_errordomain_table = "main_errordomain_table";
-
-
-public const string css_enum_table_name = "main_enum_table_name";
-public const string css_enum_table_text = "main_enum_table_text";
-public const string css_enum_table = "main_enum_table";
-
-public const string css_diagram = "main_diagram";
-public const string css_see_list = "main_see_list";
-public const string css_exception_table = "main_parameter_table";
-public const string css_parameter_table_text = "main_parameter_table_text";
-public const string css_parameter_table_name = "main_parameter_table_name";
-public const string css_parameter_table = "main_parameter_table";
-public const string css_title = "main_title";
-public const string css_other_type = "main_other_type";
-public const string css_basic_type = "main_basic_type";
-public const string css_keyword = "main_keyword";
-public const string css_optional_parameter = "main_optional_parameter";
-public const string css_code_definition = "main_code_definition";
-public const string css_headline_hr = "main_hr";
-public const string css_hr = "main_hr";
-public const string css_list_errdom = "main_list_errdom";
-public const string css_list_en = "main_list_en";
-public const string css_list_ns = "main_list_ns";
-public const string css_list_cl = "main_list_cl";
-public const string css_list_iface = "main_list_iface";
-public const string css_list_stru = "main_list_stru";
-public const string css_list_field = "main_list_field";
-public const string css_list_prop = "main_list_prop";
-public const string css_list_del = "main_list_del";
-public const string css_list_sig = "main_list_sig";
-public const string css_list_m = "main_list_m";
-
-public const string css_style_navigation = "site_navigation";
-public const string css_style_content = "site_content";
-public const string css_style_body = "site_body";
-
-
-
-
-
-public const string css_content_link_constant = "css_content_link_constant";
-public const string css_content_link_namespace = "css_content_link_namespace";
-public const string css_content_link_struct = "css_content_link_struct";
-public const string css_content_link_interface = "css_content_link_interface";
-public const string css_content_link_enum = "css_content_link_enum";
-public const string css_content_link_errordomain = "css_content_link_errordomain";
-public const string css_content_link_delegate = "css_content_link_delegate";
-public const string css_content_link_signal = "css_content_link_signal";
-public const string css_content_link_field = "css_content_link_field";
-public const string css_content_link_enumvalue = "css_content_link_enumvalue";
-public const string css_content_link_errorcode = "css_content_link_errorcode";
-
-public const string css_content_link_class = "css_content_link_class";
-public const string css_content_link_abstract_class = "css_content_link_abstract_class";
-
-public const string css_content_link_property = "css_content_link_property";
-public const string css_content_link_virtual_property = "css_content_link_virtual_property";
-public const string css_content_link_abstract_property = "css_content_link_abstract_property";
-
-public const string css_content_link_method = "css_content_link_method";
-public const string css_content_link_static_method = "css_content_link_static_method";
-public const string css_content_link_virtual_method = "css_content_link_virtual_method";
-public const string css_content_link_abstract_method = "css_content_link_abstract_method";
-public const string css_content_link_construction_method = "css_content_link_construction_method";
-
-
-public string get_html_content_link_css_class ( Valadoc.Basic element ) {
- if ( element is Namespace ) {
- return css_content_link_namespace;
- }
- else if ( element is Struct ) {
- return css_content_link_struct;
- }
- else if ( element is Interface ) {
- return css_content_link_interface;
- }
- else if ( element is Class ) {
- if ( ((Class)element).is_abstract )
- return css_content_link_abstract_class;
- else
- return css_content_link_class;
- }
- else if ( element is Enum ) {
- return css_content_link_enum;
- }
- else if ( element is ErrorDomain ) {
- return css_content_link_errordomain;
- }
- else if ( element is Delegate ) {
- return css_content_link_delegate;
- }
- else if ( element is Method ) {
- if ( ((Method)element).is_constructor )
- return css_content_link_construction_method;
- else if ( ((Method)element).is_abstract )
- return css_content_link_abstract_method;
- else if ( ((Method)element).is_override || ((Method)element).is_override )
- return css_content_link_virtual_method;
- else if ( ((Method)element).is_static )
- return css_content_link_static_method;
- else
- return css_content_link_method;
- }
- else if ( element is Signal ) {
- return css_content_link_signal;
- }
- else if ( element is Property ) {
- if ( ((Property)element).is_virtual || ((Property)element).is_override )
- return css_content_link_virtual_property;
- else if ( ((Property)element).is_abstract )
- return css_content_link_abstract_property;
- else
- return css_content_link_property;
- }
- else if ( element is Field ) {
- return css_content_link_field;
- }
- else if ( element is Constant ) {
- return css_content_link_constant;
- }
- else if ( element is EnumValue ) {
- return css_content_link_enumvalue;
- }
- else if ( element is ErrorCode ) {
- return css_content_link_errorcode;
- }
- return "";
-}
-
-
-
+ if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
+ tmp = "#" + element.name;
+ element = (DocumentedElement)element.parent;
+ }
-public string get_html_inline_navigation_link_css_class ( Valadoc.Basic element ) {
- if ( element is Namespace ) {
- }
- else if ( element is Struct ) {
- return css_inline_navigation_struct;
- }
- else if ( element is Interface ) {
- return css_inline_navigation_interface;
- }
- else if ( element is Class ) {
- return (((Class)element).is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class;
- }
- else if ( element is Enum ) {
- return css_inline_navigation_enum;
- }
- else if ( element is ErrorDomain ) {
- return css_inline_navigation_errordomain;
- }
- else if ( element is Delegate ) {
- return css_inline_navigation_delegate;
- }
- else if ( element is Method ) {
- if ( ((Method)element).is_static )
- return css_inline_navigation_static_method;
- else if ( ((Method)element).is_static )
- return css_inline_navigation_static_method;
- else if ( ((Method)element).is_constructor )
- return css_inline_navigation_construction_method;
- else if ( ((Method)element).is_abstract )
- return css_inline_navigation_abstract_method;
- else if ( ((Method)element).is_virtual || ((Method)element).is_override )
- return css_inline_navigation_virtual_method;
- else
- return css_inline_navigation_method;
- }
- else if ( element is Signal ) {
- return css_inline_navigation_signal;
- }
- else if ( element is Property ) {
- if ( ((Property)element).is_virtual || ((Property)element).is_override )
- return css_inline_navigation_virtual_property;
- else if ( ((Property)element).is_abstract )
- return css_inline_navigation_abstract_property;
- else
- return css_inline_navigation_property;
- }
- else if ( element is Field ) {
- return css_inline_navigation_fields;
+ return prefix + "/" + element.full_name () + ".html" + tmp;
}
- else if ( element is Constant ) {
- return css_inline_navigation_constant;
- }
- else if ( element is EnumValue ) {
- return css_inline_navigation_enumvalue;
+
+ public string get_html_content_link_css_class ( Valadoc.Basic element ) {
+ if ( element is Namespace ) {
+ return css_content_link_namespace;
+ }
+ else if ( element is Struct ) {
+ return css_content_link_struct;
+ }
+ else if ( element is Interface ) {
+ return css_content_link_interface;
+ }
+ else if ( element is Class ) {
+ if ( ((Class)element).is_abstract )
+ return css_content_link_abstract_class;
+ else
+ return css_content_link_class;
+ }
+ else if ( element is Enum ) {
+ return css_content_link_enum;
+ }
+ else if ( element is ErrorDomain ) {
+ return css_content_link_errordomain;
+ }
+ else if ( element is Delegate ) {
+ return css_content_link_delegate;
+ }
+ else if ( element is Method ) {
+ if ( ((Method)element).is_constructor )
+ return css_content_link_construction_method;
+ else if ( ((Method)element).is_abstract )
+ return css_content_link_abstract_method;
+ else if ( ((Method)element).is_override || ((Method)element).is_override )
+ return css_content_link_virtual_method;
+ else if ( ((Method)element).is_static )
+ return css_content_link_static_method;
+ else
+ return css_content_link_method;
+ }
+ else if ( element is Signal ) {
+ return css_content_link_signal;
+ }
+ else if ( element is Property ) {
+ if ( ((Property)element).is_virtual || ((Property)element).is_override )
+ return css_content_link_virtual_property;
+ else if ( ((Property)element).is_abstract )
+ return css_content_link_abstract_property;
+ else
+ return css_content_link_property;
+ }
+ else if ( element is Field ) {
+ return css_content_link_field;
+ }
+ else if ( element is Constant ) {
+ return css_content_link_constant;
+ }
+ else if ( element is EnumValue ) {
+ return css_content_link_enumvalue;
+ }
+ else if ( element is ErrorCode ) {
+ return css_content_link_errorcode;
+ }
+ return "";
}
- else if ( element is ErrorCode ) {
- return css_inline_navigation_errorcode;
+
+ public string get_html_inline_navigation_link_css_class ( Valadoc.Basic element ) {
+ if ( element is Namespace ) {
+ return css_inline_navigation_namespace;
+ }
+ else if ( element is Struct ) {
+ return css_inline_navigation_struct;
+ }
+ else if ( element is Interface ) {
+ return css_inline_navigation_interface;
+ }
+ else if ( element is Class ) {
+ return (((Class)element).is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class;
+ }
+ else if ( element is Enum ) {
+ return css_inline_navigation_enum;
+ }
+ else if ( element is ErrorDomain ) {
+ return css_inline_navigation_errordomain;
+ }
+ else if ( element is Delegate ) {
+ return css_inline_navigation_delegate;
+ }
+ else if ( element is Method ) {
+ if ( ((Method)element).is_static )
+ return css_inline_navigation_static_method;
+ else if ( ((Method)element).is_static )
+ return css_inline_navigation_static_method;
+ else if ( ((Method)element).is_constructor )
+ return css_inline_navigation_construction_method;
+ else if ( ((Method)element).is_abstract )
+ return css_inline_navigation_abstract_method;
+ else if ( ((Method)element).is_virtual || ((Method)element).is_override )
+ return css_inline_navigation_virtual_method;
+ else
+ return css_inline_navigation_method;
+ }
+ else if ( element is Signal ) {
+ return css_inline_navigation_signal;
+ }
+ else if ( element is Property ) {
+ if ( ((Property)element).is_virtual || ((Property)element).is_override )
+ return css_inline_navigation_virtual_property;
+ else if ( ((Property)element).is_abstract )
+ return css_inline_navigation_abstract_property;
+ else
+ return css_inline_navigation_property;
+ }
+ else if ( element is Field ) {
+ return css_inline_navigation_fields;
+ }
+ else if ( element is Constant ) {
+ return css_inline_navigation_constant;
+ }
+ else if ( element is EnumValue ) {
+ return css_inline_navigation_enumvalue;
+ }
+ else if ( element is ErrorCode ) {
+ return css_inline_navigation_errorcode;
+ }
+ else if ( element is Package ) {
+ return css_inline_navigation_package;
+ }
+ return "";
}
- return "";
-}
}
-/* ---- **/
+
public abstract class Valadoc.SeeHtmlHelperTaglet : MainTaglet {
public override int order { get { return 400; } }
private string name;
}
-/* ---- **/
-
-
-
public abstract class Valadoc.BasicHtmlLanglet : Valadoc.Langlet {
public Valadoc.Settings settings {
public override bool write ( void* res, int max, int index ) {
weak GLib.FileStream file = (GLib.FileStream)res;
- file.puts ( "<table border=\"1\"\n" );
+ file.printf ( "<table border=\"1\" class=\"%s\">\n", css_wiki_table );
foreach ( Gee.ArrayList<TableCellDocElement> row in this.cells ) {
int _max = row.size;
int _index = 0;
int _max = this.content.size;
int _index = 0;
- file.printf ( "\n<div>\n" );
+ file.printf ( "\n<div class=\"%s\">\n", css_notification_area );
foreach ( DocElement element in this.content ) {
element.write ( res, _max, _index );
public override bool write ( void* res, int max, int index ) {
weak GLib.FileStream file = (GLib.FileStream)res;
- file.puts ( "<pre>" );
+ file.printf ( "\n<div class=\"%s\">\n\t<pre>", css_source_sample );
file.puts ( src );
- file.puts ( "</pre>" );
+ file.puts ( "<pre>\n</div>" );
return true;
}
}
public class Valadoc.ImageHtmlHelperDocElement : ImageDocElement {
- protected ImageDocElementPosition position;
- protected string path;
+ private ImageDocElementPosition position;
+ private static uint counter = 0;
+
+ private string htmlpath;
+ private string npath;
+ private string path;
public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string# path, ImageDocElementPosition pos ) {
+ if ( GLib.FileUtils.test ( path, GLib.FileTest.EXISTS | GLib.FileTest.IS_REGULAR ) == false )
+ return false;
+
+ weak string? dotpos = path.rchr ( -1, '.' );
+ this.htmlpath = GLib.Path.build_filename ( "img", "%u%s".printf ( this.counter++, (dotpos == null)? "" : dotpos.ndup ( dotpos.size() ) ) );
+ this.npath = realpath ( GLib.Path.build_filename ( settings.path, me.package.name, this.htmlpath ) );
+ this.path = realpath ( path );
+
this.position = pos;
- this.path = #path;
return true;
}
public override bool write ( void* res, int max, int index ) {
+ bool tmp = copy_file ( this.path, this.npath );
+ if ( tmp == false )
+ return false;
+
switch ( this.position ) {
case ImageDocElementPosition.NEUTRAL:
- ((GLib.FileStream)res).printf ( "<img src=\"%s\" />", this.path );
+ ((GLib.FileStream)res).printf ( "<img src=\"%s\" />", this.htmlpath );
break;
case ImageDocElementPosition.MIDDLE:
- ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"middle\"/>", this.path );
+ ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"middle\"/>", this.htmlpath );
break;
case ImageDocElementPosition.RIGHT:
- ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"right\"/>", this.path );
+ ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"right\"/>", this.htmlpath );
break;
case ImageDocElementPosition.LEFT:
- ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"left\" />", this.path );
+ ((GLib.FileStream)res).printf ( "<img src=\"%s\" align=\"left\" />", this.htmlpath );
break;
}
return true;
public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet {
protected Valadoc.Langlet langlet;
+ protected Settings settings;
- protected abstract string get_link ( DocumentedElement p1, DocumentedElement? p2 );
-
+ protected string? get_link ( DocumentedElement element, DocumentedElement? pos ) {
+ return get_html_link ( this.settings, element, pos );
+ }
// Navi:
protected void write_navi_entry_html_template ( GLib.FileStream file, string style, string content ) {
file.printf ( "<ul class=\"%s\">\n\t\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">Packages</a></li>\n</ul>\n<hr class=\"%s\">\n", css_navi, css_navi_package_index, css_navi_link, link, css_navi_hr );
}
- //FIXME: Basic pos => Basic? pos
- protected virtual void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) {
- }
-
protected void write_top_elements ( GLib.FileStream file, DocumentedElement element, DocumentedElement? mself ) {
Gee.ArrayList<DocumentedElement> lst = new Gee.ArrayList<DocumentedElement> ();
DocumentedElement pos = element;
-// if ( mself == null )
-// mself = element;
-
-// string package_name = element.file.name;
-
- this.write_top_element ( file, mself );
+ this.write_top_element_template ( file, "../index.html" );
while ( pos != null ) {
lst.add ( pos );
this.write_navi_child_enums_without_childs ( file, ns, mself );
this.write_navi_child_error_domains_without_childs ( file, ns, mself );
this.write_navi_child_delegates ( file, ns, mself );
- this.write_navi_child_static_methods ( file, ns, mself ); // remove
+ this.write_navi_child_static_methods ( file, ns, mself );
this.write_navi_child_methods ( file, ns, mself );
this.write_navi_child_fields ( file, ns, mself );
this.write_navi_child_constants ( file, ns, mself );
file.printf ( "<ul class=\"%s\">\n", css_navi );
foreach ( EnumValue env in enum_values ) {
- this.write_navi_entry ( file, env, en, css_navi_enval, true ); // en => mself
+ this.write_navi_entry ( file, env, en, css_navi_enval, true );
}
this.write_navi_child_static_methods ( file, en, mself );
- this.write_navi_child_methods ( file, en, mself ); // remove
+ this.write_navi_child_methods ( file, en, mself );
file.puts ( "</ul>\n" );
}
file.printf ( "<ul class=\"%s\">\n", css_navi );
foreach ( ErrorCode ec in error_codes ) {
- this.write_navi_entry ( file, ec, errdom, css_navi_errdomcode, true ); // errdom => mself
+ this.write_navi_entry ( file, ec, errdom, css_navi_errdomcode, true );
}
this.write_navi_child_static_methods ( file, errdom, mself );
- this.write_navi_child_methods ( file, errdom, mself ); // remove
+ this.write_navi_child_methods ( file, errdom, mself );
file.puts ( "</ul>\n" );
}
int _max = brief.size;
int _index = 0;
- foreach ( DocElement element in brief ) {
- if ( element is InlineTaglet )
- file.puts ( ((InlineTaglet)element).to_string() );
+ foreach ( DocElement element2 in brief ) {
+ if ( element2 is InlineTaglet )
+ file.puts ( ((InlineTaglet)element2).to_string() );
else
- element.write ( file, _max, _index );
+ element2.write ( file, _max, _index );
_index++;
}
doctree.write_content ( file );
}
+ 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() ) {
+ if ( pkg.is_visitor_accessible ( ) ) {
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a>\n", get_html_inline_navigation_link_css_class (pkg), css_navi_link, this.get_link(pkg, null), pkg.name );
+ // brief description
+ file.puts ( "</li>\n" );
+ }
+ else {
+ file.printf ( "\t<li class=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (pkg), pkg.name );
+ }
+ }
+ file.puts ( "</li>\n" );
+ }
+
+ public void write_navi_packages ( GLib.FileStream file, Tree tree ) {
+ file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+ this.write_navi_packages_inline ( file, tree );
+ file.puts ( "\t\t\t</div>\n" );
+ }
+
+ public void write_packages_content ( GLib.FileStream file, Tree tree ) {
+ file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+ file.printf ( "\t\t\t\t<h1 class=\"%s\">Packages:</h1>\n", css_title );
+ 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<h2 class=\"%s\">Content:</h2>\n", css_title );
+ file.printf ( "\t\t\t\t<h3 class=\"%s\">Packages:</h2>\n", css_title );
+ this.write_navi_packages_inline ( file, tree );
+ file.puts ( "\t\t\t</div>\n" );
+ }
+
public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) {
string full_name = m.full_name ( );
file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
return ;
file.printf ( "<h2 class=\"%s\">Dependencies:</h2>\n", css_title );
-
- /*
- string realimgpath = this.get_img_real_path ( package );
- string imgpath = this.get_img_path ( package );
-
- Diagrams.write_dependency_diagram ( package, realimgpath );
-
- / / image
- file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, imgpath );
- */
-
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Package p in deps ) {
string link = this.get_link(p, mself);
file.puts ( "\t\t\t</div>\n" );
}
+ protected string get_img_path ( DocumentedElement element ) {
+ return "img/" + element.full_name () + ".png";
+ }
- protected abstract string get_img_real_path ( DocumentedElement element );
-
- protected abstract string get_img_path ( DocumentedElement element );
-
+ protected string get_img_real_path ( DocumentedElement element ) {
+ return this.settings.get_real_path ( ) + "/" + element.package.name + "/" + "img/" + element.full_name () + ".png";
+ }
protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) {
Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Enum en in enums ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (en), css_navi_link, this.get_link(en, mself), en.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a>\n", get_html_inline_navigation_link_css_class (en), css_navi_link, this.get_link(en, mself), en.name );
this.write_brief_description ( file, en, mself );
file.printf ( "</li>\n" );
}
file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, f.name );
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 ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
this.write_child_namespaces ( file, f, mself );
protected void write_file_header ( GLib.FileStream file, string css, string? title ) {
+ file.puts ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" );
file.puts ( "<html>\n" );
file.puts ( "\t<head>\n" );
file.puts ( "\t\t<title>Vala Binding Reference</title>\n" );
file.printf ( "\t\t<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\" />\n", css );
file.puts ( "\t</head>\n" );
file.puts ( "\t<body>\n\n" );
-
file.printf ( "\t<div class=\"%s\">\n", css_site_header );
file.printf ( "\t\t%s Reference Manual\n", (title == null)? "" : title );
file.puts ( "\t</div>\n\n" );
-
file.printf ( "\t\t<div class=\"%s\">\n", css_style_body );
}
protected void write_file_footer ( GLib.FileStream file ) {
file.puts ( "\t</div>\n" );
-
file.puts ( "\t<div style= \"clear: left\">\n" );
file.puts ( "\t\t<br />\n" );
file.puts ( "\t\t<div class=\"site_foother\">\n" );
AM_CFLAGS = \
+ $(LIBGVC_CFLAGS) \
$(LIBXML2_CFLAGS) \
$(GLIB_CFLAGS) \
$(LIBVALA_CFLAGS) \
$(GMODULE_CFLAGS) \
- $(LIBGVC_CFLAGS) \
$(NULL)
libvaladoc_la_LIBADD = \
+ $(LIBGVC_LIBS) \
$(LIBXML2_LIBS) \
$(GLIB_LIBS) \
$(LIBVALA_LIBS) \
$(GMODULE_LIBS) \
- $(LIBGVC_LIBS) \
$(NULL)
namespace Valadoc {
public bool copy_file ( string src, string dest ) {
GLib.FileStream fsrc = GLib.FileStream.open ( src, "rb" );
+ if ( fsrc == null ) {
+ return false;
+ }
+
GLib.FileStream fdest = GLib.FileStream.open ( dest, "wb" );
- if ( fsrc == null || fdest == null )
+ if ( fdest == null ) {
return false;
+ }
for ( int c = fsrc.getc() ; !fsrc.eof() ; c = fsrc.getc() ) {
fdest.putc ( (char)c );
}
// internal
- public virtual weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public virtual DocumentedElement? search_element ( string[] params, int pos ) {
return null;
}
// internal
- public virtual weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> list, int pos ) {
+ public virtual DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> list, int pos ) {
return null;
}
}
}
}
- protected weak DocumentedElement? search_enum_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_enum_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Enum en in this.enums ) {
DocumentedElement element = en.search_element_vala ( params, pos+1 );
if ( element != null )
return null;
}
- protected weak DocumentedElement? search_enum ( string[] params, int pos ) {
+ protected DocumentedElement? search_enum ( string[] params, int pos ) {
foreach ( Enum en in this.enums ) {
DocumentedElement element = en.search_element ( params, pos+1 );
if ( element != null )
get;
}
- protected weak DocumentedElement? search_delegate_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_delegate_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Delegate == false )
return null;
return null;
}
- protected weak DocumentedElement? search_delegate ( string[] params, int pos ) {
+ protected DocumentedElement? search_delegate ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
get;
}
- protected weak DocumentedElement? search_interface_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_interface_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Interface iface in this.interfaces ) {
DocumentedElement? element = iface.search_element_vala ( params, pos+1 );
if ( element != null )
return null;
}
- protected weak DocumentedElement? search_interface ( string[] params, int pos ) {
+ protected DocumentedElement? search_interface ( string[] params, int pos ) {
foreach ( Interface iface in this.interfaces ) {
DocumentedElement? element = iface.search_element ( params, pos+1 );
if ( element != null )
get;
}
- protected weak DocumentedElement? search_error_domain_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_error_domain_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( ErrorDomain errdom in this.errdoms ) {
DocumentedElement? element = errdom.search_element_vala ( params, pos+1 );
if ( element != null )
return null;
}
- protected weak DocumentedElement? search_error_domain ( string[] params, int pos ) {
+ protected DocumentedElement? search_error_domain ( string[] params, int pos ) {
foreach ( ErrorDomain errdom in this.errdoms ) {
DocumentedElement? element = errdom.search_element ( params, pos+1 );
if ( element != null )
get;
}
- protected weak DocumentedElement? search_class_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_class_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Class cl in this.classes ) {
DocumentedElement? element = cl.search_element_vala ( params, pos+1 );
if ( element != null )
return null;
}
- protected weak DocumentedElement? search_class ( string[] params, int pos ) {
+ protected DocumentedElement? search_class ( string[] params, int pos ) {
foreach ( Class cl in this.classes ) {
DocumentedElement? element = cl.search_element ( params, pos+1 );
if ( element != null )
set;
}
- protected weak DocumentedElement? search_property_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_property_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Property == false )
return null;
return null;
}
- protected weak DocumentedElement? search_property ( string[] params, int pos ) {
+ protected DocumentedElement? search_property ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
get;
}
- protected weak DocumentedElement? search_construction_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_construction_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Method == false )
return null;
return null;
}
- protected weak DocumentedElement? search_construction_method ( string[] params, int pos ) {
+ protected DocumentedElement? search_construction_method ( string[] params, int pos ) {
pos++;
if ( params[pos+1] == null )
set;
}
- protected weak DocumentedElement? search_signal_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_signal_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Signal == false )
return null;
return null;
}
- protected weak DocumentedElement? search_signal ( string[] params, int pos ) {
+ protected DocumentedElement? search_signal ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
get;
}
- protected weak DocumentedElement? search_struct_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_struct_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Struct stru in this.structs ) {
DocumentedElement? element = stru.search_element_vala ( params, pos+1 );
if ( element != null )
}
- protected weak DocumentedElement? search_struct ( string[] params, int pos ) {
+ protected DocumentedElement? search_struct ( string[] params, int pos ) {
foreach ( Struct stru in this.structs ) {
DocumentedElement? element = stru.search_element ( params, pos+1 );
if ( element != null )
get;
}
- protected weak DocumentedElement? search_constant_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_constant_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Constant == false )
return null;
}
// internal
- protected weak DocumentedElement? search_constant ( string[] params, int pos ) {
+ protected DocumentedElement? search_constant ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
get;
}
- protected weak DocumentedElement? search_field_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_field_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Field == false )
return null;
}
// internal
- protected weak DocumentedElement? search_field ( string[] params, int pos ) {
+ protected DocumentedElement? search_field ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
get;
}
- protected weak DocumentedElement? search_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ protected DocumentedElement? search_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.Method == false )
return null;
}
// internal
- protected weak DocumentedElement? search_method ( string[] params, int pos ) {
+ protected DocumentedElement? search_method ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
}
// internal
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.Class == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( !(this.name == params[pos] || params[0] == "this") )
return null;
return ( this.verrdom == ver );
}
- private weak DocumentedElement? search_error_code ( string[] params, int pos ) {
+ private DocumentedElement? search_error_code ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
return null;
}
- private weak DocumentedElement? search_error_code_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ private DocumentedElement? search_error_code_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.ErrorCode == false )
return null;
return null;
}
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.ErrorDomain == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( this.name != params[pos] )
return null;
return this.venum.get_cname();
}
- private weak DocumentedElement? search_enum_value_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ private DocumentedElement? search_enum_value_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos+1];
if ( velement is Vala.EnumValue == false )
return null;
return null;
}
- private weak DocumentedElement? search_enum_value ( string[] params, int pos ) {
+ private DocumentedElement? search_enum_value ( string[] params, int pos ) {
pos++;
if ( params[pos+1] != null )
return null;
}
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.Enum == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( this.name != params[pos] )
return null;
get;
}
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.Struct == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( this.name != params[pos] )
return null;
this.set_field_type_references ( );
base.set_type_references ( );
- var lst = this.vstruct.get_base_types ();
- this.set_parent_references ( lst );
+// var lst = this.vstruct.get_base_types ();
+// this.set_parent_references ( lst );
}
}
protected get;
}
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.Interface == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( !(this.name == params[pos] || params[0] == "this") )
return null;
}
// interface
- private weak DocumentedElement? search_namespace ( string[] params, int pos ) {
+ private DocumentedElement? search_namespace ( string[] params, int pos ) {
foreach ( Namespace ns in this.namespaces ) {
DocumentedElement? element = ns.search_element ( params, pos+1 );
if ( element != null )
}
//interface
- private weak DocumentedElement? search_namespace_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ private DocumentedElement? search_namespace_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Namespace ns in this.namespaces ) {
DocumentedElement? element = ns.search_element_vala ( params, pos+1 );
if ( element != null )
return null;
}
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
Vala.Symbol velement = params[pos];
if ( velement is Vala.Namespace == false )
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
if ( this.name != params[pos] )
return null;
}
// internal
- public override weak DocumentedElement? search_element ( string[] params, int pos ) {
+ public override DocumentedElement? search_element ( string[] params, int pos ) {
foreach ( Namespace ns in this.namespaces ) {
DocumentedElement? element = ns.search_element ( params, pos );
if ( element != null )
}
// internal
- public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+ public override DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
foreach ( Namespace ns in this.namespaces ) {
DocumentedElement? element = ns.search_element_vala ( params, pos );
if ( element != null )
this.context.directory = context.basedir;
}
-// this.context.non_null = !disable_non_null || non_null_experimental;
this.context.non_null_experimental = non_null_experimental;
this.context.checking = !disable_checking;
doclet.initialisation ( this.settings, this );
}
- private weak DocumentedElement? search_symbol_in_type ( DocumentedElement element, string[] params, int params_offset = 0 ) {
+ private DocumentedElement? search_symbol_in_type ( DocumentedElement element, string[] params, int params_offset = 0 ) {
if ( !( element.parent is ContainerDataType || element.parent is Enum || element.parent is ErrorDomain ) )
return null;
return this.search_symbol_in_symbol ( (DocumentedElement)element.parent, params, 0 );
}
- private weak DocumentedElement? search_symbol_in_symbol ( DocumentedElement element, string[] params, int params_offset = 0 ) {
+ private DocumentedElement? search_symbol_in_symbol ( DocumentedElement element, string[] params, int params_offset = 0 ) {
if ( element is Class || element is Interface || element is Struct ) {
return element.search_element ( params, params_offset );
}
return null;
}
- private weak DocumentedElement? search_symbol_in_global_namespaces ( DocumentedElement? element, string[] params ) {
+ private DocumentedElement? search_symbol_in_global_namespaces ( DocumentedElement? element, string[] params ) {
int param_size = 0;
for ( param_size = 0; params[param_size] != null; param_size++ );
}
foreach ( Package pkg in this.packages ) {
- DocumentedElement? element = pkg.search_element ( global_params, 0 );
- if ( element != null )
- return element;
+ DocumentedElement? element2 = pkg.search_element ( global_params, 0 );
+ if ( element2 != null )
+ return element2;
}
return null;
}
- private weak DocumentedElement? search_symbol_in_namespaces ( DocumentedElement element, string[] params ) {
+ private DocumentedElement? search_symbol_in_namespaces ( DocumentedElement element, string[] params ) {
foreach ( Package pkg in this.packages ) {
- DocumentedElement? element = pkg.search_element ( params, 0 );
- if ( element != null )
- return element;
+ DocumentedElement? element2 = pkg.search_element ( params, 0 );
+ if ( element2 != null )
+ return element2;
}
return null;
}
- private weak DocumentedElement? search_element ( DocumentedElement? element, string[] params ) {
+ private DocumentedElement? search_element ( DocumentedElement? element, string[] params ) {
if ( element != null ) {
if ( params[0] == "this" ) {
return search_symbol_in_type ( element, params, 1 );
return null;
}
- public weak DocumentedElement? search_symbol_str ( DocumentedElement? element, string symname ) {
+ public DocumentedElement? search_symbol_str ( DocumentedElement? element, string symname ) {
string[] params = symname.split( ".", -1 );
int i = 0; while ( params[i] != null ) i++;
params.length = i;
}
// internal
- public weak DocumentedElement? search_vala_symbol ( Vala.Symbol? vnode ) {
+ public DocumentedElement? search_vala_symbol ( Vala.Symbol? vnode ) {
if ( vnode == null )
return null;
return null;
if ( params.size >= 2 ) {
- if ( params[1] is Vala.Namespace ) {
+ if ( params.get(1) is Vala.Namespace ) {
params.remove_at ( 0 );
}
}
if ( type is Struct == false )
break;
- weak Graphviz.Node stru = draw_struct ( g, (Struct)type, me );
- draw_struct_parents ( (Struct)type, g, stru );
+ weak Graphviz.Node stru2 = draw_struct ( g, (Struct)type, me );
+ draw_struct_parents ( (Struct)type, g, stru2 );
}
}
+++ /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 Vala;
-using GLib;
-using Gee;
-
-
-/*
-TODO:
- - clean up the api
- -- rename stuff
- -- mark unused stuff
-
- -- remove the overritten methods from the vala-visitor
-*/
-
-
-// private
-public Valadoc.Class glib_error = null;
-
-
-// remove
-public enum ExpressionType {
- NOT_SET,
- STRING,
- CHAR,
- REAL,
- BOOL,
- INT,
- NULL
-}
-
-
-
-public enum CommentContext {
- ERRORDOMAIN,
- ENUMVALUE,
- ERRORCODE,
- INTERFACE,
- DELEGATE,
- CONSTANT,
- PROPERTY,
- SIGNAL,
- STRUCT,
- CLASS,
- FIELD,
- ENUM
-}
-
-
-
-public class Valadoc.Basic : Object {
- private string _full_name = null;
-
- public string? full_name {
- get {
- if ( this.name == null )
- return null;
-
- if ( this._full_name == null ) {
- this._full_name = this.name;
- Basic pos = this.parent;
-
- while ( pos is File == false ) {
- this._full_name = pos.name + "." + this._full_name;
- pos = pos.parent;
- }
- }
-
- return this._full_name;
- }
- }
-
- public string?# package {
- get {
- SourceReference? sref = this.vsymbol.source_reference;
- if ( sref == null )
- return null;
-
- Vala.SourceFile? file = sref.file;
- if ( file == null )
- return null;
-
- string path = sref.file.filename;
- if ( path.has_suffix (".vapi") ) {
- string file_name = GLib.Path.get_basename ( path );
- return file_name.ndup ( file_name.size() - ".vapi".size() );
- }
-
- return this.settings.package_name;
- }
- }
-
- protected string? comment_string {
- get {
- SourceReference sref = this.vsymbol.source_reference;
- if ( sref == null )
- return null;
-
- return sref.comment;
- }
- set {
- SourceReference sref = this.vsymbol.source_reference;
- if ( sref == null )
- return ;
-
- sref.comment = value;
- }
- }
-
- //- Nur dort hin packen, wo es gebraucht wird.
- public DocumentationTree? documentation {
- protected set;
- get;
- }
-
- // internal
- public virtual Basic? search_element ( string[] params, int pos ) {
- return null;
- }
-
-
- // <><><><><><><><><>
- // <><><><><><><><><>
- //Vala.Symbol symbol, Gee.HashMap<string, Valadoc.TagletCreator> taglets, CommentContext context
- protected void parse_comment_helper ( Valadoc.Parser docparser, CommentContext context ) {
- if ( this.documentation != null )
- return ;
-
- string? docu = this.comment_string;
- if ( docu == null )
- return ;
-
- bool tmp = Parser.is_documentation ( docu );
- if ( tmp == false )
- return ;
-
-
- this.documentation = docparser.parse ( this.head, this, docu );
- }
-
- public int line {
- get {
- Vala.SourceReference vsref = this.vsymbol.source_reference;
- if ( vsref == null )
- return 0;
-
- return vsref.first_line;
- }
- }
-
- // Herausnehmen, dort übergeben wo es sein muss.
- public Valadoc.Settings settings {
- construct set;
- protected get;
- }
-
- public DataType? parent_data_type {
- get {
- if ( this.parent is DataType )
- return (DataType)this.parent;
-
- return null;
- }
- }
-
- public string? file_name {
- get {
- Basic element = this;
- while ( element != null ) {
- if ( element is File )
- return element.name;
-
- element = element.parent;
- }
- return null;
- }
- }
-
- // construct set -> creation method
- public File? file {
- get {
- Valadoc.Basic ast = this;
- while ( ast is Valadoc.File == false ) {
- ast = ast.parent;
- if ( ast == null )
- return null;
- }
- return (Valadoc.File)ast;
- }
- }
-
- // construct set -> creation method
- public Namespace? nspace {
- get {
- Valadoc.Basic ast = this;
- while ( ast is Valadoc.Namespace == false ) {
- ast = ast.parent;
- if ( ast == null )
- return null;
- }
- return (Valadoc.Namespace)ast;
- }
- }
-
- public Basic parent {
- construct set;
- get;
- }
-
- protected Vala.Symbol vsymbol {
- // internal
- protected get;
- set;
- }
-
- public Tree head {
- construct set;
- protected get;
- }
-
- public virtual string?# name {
- get {
- return null;
- }
- }
-
-
- public bool is_public {
- get {
- Vala.SymbolAccessibility access = vsymbol.access;
- return ( access == Vala.SymbolAccessibility.PUBLIC );
- }
- }
-
- public bool is_protected {
- get {
- Vala.SymbolAccessibility access = vsymbol.access;
- return ( access == Vala.SymbolAccessibility.PROTECTED );
- }
- }
-
- public bool is_private {
- get {
- Vala.SymbolAccessibility access = vsymbol.access;
- return ( access == Vala.SymbolAccessibility.PRIVATE );
- }
- }
-
-
- // Move to Valadoc.SymbolAccessibility
- protected Basic? find_member_lst ( Gee.Collection<Basic> lst, string name ) {
- foreach ( Basic element in lst ) {
- if ( element.name == name )
- return element;
- }
- return null;
- }
-}
-
-
-public interface Valadoc.EnumHandler : Basic {
- protected abstract Gee.ArrayList<Enum> enums {
- private set;
- get;
- }
-
- protected void set_enum_type_references ( ) {
- foreach ( Enum en in this.enums ) {
- en.set_type_references ( );
- }
- }
-
- protected inline Basic? search_enum ( string[] params, int pos ) {
- foreach ( Enum en in this.enums ) {
- Basic element = en.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- public Gee.Collection<Enum> get_enum_list ( ) {
- var lst = new Gee.ArrayList<Enum> ();
- foreach ( Enum en in this.enums ) {
- if ( !en.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( en );
- }
-
- return new Gee.ReadOnlyCollection<Enum>( lst );
- }
-
- // internal
- public Enum? find_enum ( Vala.Enum venum ) {
- foreach ( Enum en in this.enums ) {
- if ( en.is_venum( venum ) )
- return en;
- }
-
- return null;
- }
-
- public void visit_enums ( Doclet doclet ) {
- foreach ( Enum en in this.enums ) {
- en.visit( doclet );
- }
- }
-
- public void add_enums ( Gee.Collection<Vala.Enum> venums ) {
- foreach ( Vala.Enum venum in venums ) {
- this.add_enum ( venum );
- }
- }
-
- public void add_enum ( Vala.Enum venum ) {
- Enum tmp = new Enum ( this.settings, venum, this, this.head );
- tmp.initialisation ( );
- this.enums.add( tmp );
- }
-
- protected void parse_enum_comments ( Valadoc.Parser docparser ) {
- foreach ( Enum en in this.enums ) {
- en.parse_comments ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.DelegateHandler : Basic {
- protected abstract Gee.ArrayList<Delegate> delegates {
- private set;
- get;
- }
-
- protected inline Basic? search_delegate ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Delegate del in this.delegates ) {
- if ( del.name == params[pos] )
- return del;
- }
- return null;
- }
-
- public Gee.Collection<Delegate> get_delegate_list ( ) {
- var lst = new Gee.ArrayList<Delegate> ();
- foreach ( Delegate del in this.delegates ) {
- if ( !del.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( del );
- }
-
- return new Gee.ReadOnlyCollection<Delegate>( lst );
- }
-
- // internal
- public Delegate? find_delegate ( Vala.Delegate vdel ) {
- foreach ( Delegate del in this.delegates ) {
- if ( del.is_vdelegate( vdel ) )
- return del;
- }
-
- return null;
- }
-
- public void visit_delegates ( Doclet doclet ) {
- foreach ( Delegate del in this.delegates ) {
- del.visit ( doclet );
- }
- }
-
- public void add_delegates ( Gee.Collection<Vala.Delegate> vdels ) {
- foreach ( Vala.Delegate vdel in vdels ) {
- this.add_delegate ( vdel );
- }
- }
-
- public void add_delegate ( Vala.Delegate vdel ) {
- var tmp = new Delegate ( this.settings, vdel, this, this.head, 0 );
- this.delegates.add ( tmp );
- tmp.initialisation ( );
- }
-
- public void set_delegate_type_references ( ) {
- foreach ( Delegate del in this.delegates ) {
- del.set_type_references ( );
- }
- }
-
- public void parse_delegate_comments ( Valadoc.Parser docparser ) {
- foreach ( Delegate del in this.delegates ) {
- del.parse_comment ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.InterfaceHandler : Basic {
- protected abstract Gee.ArrayList<Interface> interfaces {
- private set;
- get;
- }
-
- protected inline Basic? search_interface ( string[] params, int pos ) {
- foreach ( Interface iface in this.interfaces ) {
- Basic element = iface.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- public Gee.Collection<Interface> get_interface_list ( ) {
- var lst = new Gee.ArrayList<Interface> ();
- foreach ( Interface iface in this.interfaces ) {
- if ( !iface.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( iface );
- }
-
- return new Gee.ReadOnlyCollection<Interface>( lst );
- }
-
- // internal
- public Interface? find_interface ( Vala.Interface viface ) {
- foreach ( Interface iface in this.interfaces ) {
- if ( iface.is_vinterface( viface ) )
- return iface;
- }
-
- return null;
- }
-
- public void visit_interfaces ( Doclet doclet ) {
- foreach ( Interface iface in this.interfaces ) {
- iface.visit( doclet );
- }
- }
-
- protected void add_interfaces ( Gee.Collection<Vala.Interface> vifaces ) {
- foreach ( Vala.Interface viface in vifaces ) {
- this.add_interface ( viface );
- }
- }
-
- // inline
- public void add_interface ( Vala.Interface viface ) {
- var tmp = new Interface ( this.settings, viface, this, this.head );
- this.interfaces.add ( tmp );
- tmp.initialisation ( );
- }
-
- protected void set_interface_type_references ( ) {
- foreach ( Interface iface in this.interfaces ) {
- iface.set_type_references ( );
- }
- }
-
- protected void parse_interface_comments ( Valadoc.Parser docparser ) {
- foreach ( Interface iface in this.interfaces ) {
- iface.parse_comments ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.ErrorDomoainHandler : Basic {
- protected abstract Gee.ArrayList<ErrorDomain> errdoms {
- private set;
- get;
- }
-
- protected inline Basic? search_error_domain ( string[] params, int pos ) {
- foreach ( ErrorDomain errdom in this.errdoms ) {
- Basic element = errdom.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- public Gee.Collection<ErrorDomain> get_error_domain_list ( ) {
- var lst = new Gee.ArrayList<ErrorDomain> ();
- foreach ( ErrorDomain errdom in this.errdoms ) {
- if ( !errdom.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( errdom );
- }
-
- return new Gee.ReadOnlyCollection<ErrorDomain>( lst );
- }
-
- // internal
- public ErrorDomain? find_errordomain ( Vala.ErrorDomain ver ) {
- foreach ( ErrorDomain errdom in this.errdoms ) {
- if ( errdom.is_verrordomain( ver ) )
- return errdom;
- }
- return null;
- }
-
- public void visit_error_domains ( Doclet doclet ) {
- foreach ( ErrorDomain errdom in this.errdoms ) {
- errdom.visit ( doclet );
- }
- }
-
- public void add_error_domains ( Gee.Collection<Vala.ErrorDomain> verrdoms ) {
- foreach ( Vala.ErrorDomain verrdom in verrdoms ) {
- this.add_error_domain ( verrdom );
- }
- }
-
- public void add_error_domain ( Vala.ErrorDomain verrdom ) {
- var tmp = new ErrorDomain ( this.settings, verrdom, this, this.head );
- tmp.initialisation ( );
- this.errdoms.add ( tmp );
- }
-
- protected void set_errordomain_type_referenes ( ) {
- foreach ( ErrorDomain errdom in this.errdoms ) {
- errdom.set_type_references ( );
- }
- }
-
- protected void parse_errordomain_comments ( Valadoc.Parser docparser ) {
- foreach ( ErrorDomain errdom in this.errdoms ) {
- errdom.parse_comments ( docparser );
- }
- }
-}
-
-
-
-
-public interface Valadoc.Writeable : Basic {
- public abstract DocumentationTree? documentation {
- protected set;
- get;
- }
-
- // rename to write_documentation
- public bool write_comment ( void* ptr ) {
- if ( this.documentation == null )
- return false;
-
- this.documentation.write ( ptr );
- return true;
- }
-}
-
-
-
-public interface Valadoc.NamespaceHandler : Basic {
- public abstract Gee.ArrayList<Namespace> namespaces {
- private set;
- get;
- }
-
- public Gee.ReadOnlyCollection<Namespace> get_namespace_list () {
- return new Gee.ReadOnlyCollection<Namespace> ( this.namespaces );
- }
-
- public void visit_namespaces ( Doclet doclet ) {
- foreach ( Namespace ns in this.namespaces ) {
- ns.visit ( doclet );
- }
- }
-
- private Gee.ArrayList<Vala.Namespace> create_parent_vnamespace_list ( Vala.Symbol vsymbol ) {
- var lst = new Gee.ArrayList<Vala.Namespace> ();
- if ( vsymbol.name == null ) {
- lst.add ( (Vala.Namespace)vsymbol );
- return lst;
- }
-
-
- while ( vsymbol.name != null ) {
- if ( vsymbol is Vala.Namespace ) {
- lst.insert ( 0, (Vala.Namespace)vsymbol );
- }
- vsymbol = vsymbol.parent_symbol;
- }
- return lst;
- }
-
- // rename
- // internal
- public void add__namespace ( Namespace ns ) {
- this.namespaces.add ( ns );
- }
-
- // internal
- public Namespace get_namespace_helper ( Vala.Symbol node, Gee.List<Vala.Namespace> vnspaces, int pos ) {
- Vala.Namespace vns = vnspaces.get( pos );
-
- Namespace ns = this.find_namespace_without_childs ( vns );
- if ( ns == null ) {
- ns = new Namespace( this.settings, vns, this, this.head );
- this.namespaces.add ( ns );
- ns.initialisation( );
- }
-
- if ( pos == 0 ) {
- return ns;
- }
-
- return ns.get_namespace_helper ( node, vnspaces, pos+1 );
- }
-
- // TODO: Rename vars
- protected Namespace get_namespace ( Vala.Symbol node ) {
- Vala.Symbol vnd = ((Vala.Symbol)node).parent_symbol;
- if ( vnd is Vala.Namespace == false )
- vnd = vnd.parent_symbol;
-
- Vala.Namespace vnspace = (Vala.Namespace)vnd;
- var nspace = this.find_namespace ( vnspace );
- if ( nspace != null )
- return nspace;
-
-
- var vnspaces = this.create_parent_vnamespace_list ( node );
-
- if ( vnspaces.size > 2 ) {
- return this.get_namespace_helper ( node, vnspaces, 1 );
- }
- else {
- var ns = new Namespace( this.settings, vnspace, this, this.head );
- this.namespaces.add( ns );
- ns.initialisation( );
- return ns;
- }
- }
-
- // internal
- public Namespace? find_vnamespace_helper ( Gee.List<Vala.Namespace> vnspaces, int pos ) {
-
- Vala.Namespace? vns = vnspaces.get ( pos );
- if ( vns == null ) {
- return null;
- }
-
- foreach ( Namespace ns in this.namespaces ) {
- if ( ns.name != vns.name ) {
- continue ;
- }
-
- if ( pos == 0 ) {
- return ns;
- }
-
- return ns.find_vnamespace_helper ( vnspaces, pos+-1 );
- }
-
- return null;
- }
-
- // internal?
- private Namespace find_namespace_without_childs ( Vala.Namespace vns ) {
- Namespace ns2 = null;
-
- foreach ( Namespace ns in this.namespaces ) {
- if ( ns.is_vnspace(vns) )
- ns2 = ns;
- }
-
- return ns2;
- }
-
- // internal
- public Namespace find_namespace ( Vala.Namespace vns ) {
- var vnspaces = this.create_parent_vnamespace_list ( vns );
- int i = 0;
-
- foreach ( Vala.Namespace n_s in vnspaces ) {
- i++;
- }
-
- return this.find_vnamespace_helper ( vnspaces, vnspaces.size-1 );
- }
-
- // internal
- public void set_namespace_type_references ( ) {
- foreach ( Namespace ns in this.namespaces ){
- ns.set_type_references ();
- }
- }
-
- // internal
- public void namespace_inheritance ( ) {
- foreach ( Namespace ns in this.namespaces ){
- ns.inheritance( );
- }
- }
-
- // internal
- public void parse_namespace_comments ( Valadoc.Parser docparser ) {
- foreach ( Namespace ns in this.namespaces ){
- ns.parse_comments ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.ClassHandler : Basic {
- // remove
- protected abstract Gee.ArrayList<Class> classes {
- set;
- get;
- }
-
- public abstract uint bracket_level {
- construct set;
- protected get;
- }
-
- protected inline Basic? search_class ( string[] params, int pos ) {
- foreach ( Class cl in this.classes ) {
- Basic element = cl.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- protected Class? find_vclass ( Vala.Class vcl ) {
- foreach ( Class cl in this.classes ) {
- if ( cl.is_vclass ( vcl ) )
- return cl;
-
- var tmp = cl.find_vclass ( vcl );
- if ( tmp != null )
- return tmp;
- }
- return null;
- }
-
- public Gee.ReadOnlyCollection<Class> get_class_list ( ) {
- var lst = new Gee.ArrayList<Class> ();
- foreach ( Class cl in this.classes ) {
- if ( !cl.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( cl );
- }
-
- return new Gee.ReadOnlyCollection<Class>( lst );
- }
-
- // internal, remove
- public void append_class ( Valadoc.Class cl ) {
- this.classes.add( cl );
- }
-
- // internal
- public void add_class ( Vala.Class vcl ) {
- Class cl = new Class ( this.settings, vcl, this, this.head, 0 );
- this.classes.add ( cl );
- cl.initialisation( );
- }
-
- public void add_classes ( Gee.Collection<Vala.Class> vclasses ) {
- foreach ( Vala.Class vcl in vclasses ) {
- this.add_class ( vcl );
- }
- }
-
-
- public void visit_classes ( Doclet doclet ) {
- foreach ( Class cl in this.get_class_list() ) {
- cl.visit ( doclet );
- }
- }
-
- protected void set_class_type_references ( ) {
- foreach ( Class cl in this.classes ) {
- cl.set_type_references ();
- }
- }
-
- protected void parse_class_comments ( Valadoc.Parser docparser ) {
- foreach ( Class cl in this.classes ) {
- cl.parse_comments ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.PropertyHandler : ContainerDataType {
- protected abstract Gee.ArrayList<Property> properties {
- get;
- set;
- }
-
- protected inline Basic? search_property ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Property prop in this.properties ) {
- if ( prop.name == params[pos] )
- return prop;
- }
- return null;
- }
-
- protected bool is_overwritten_property ( Property prop ) {
- foreach ( Property p in this.properties ) {
- if ( p.parent != this )
- continue ;
-
- if ( !p.is_override )
- continue ;
-
- if ( p.equals ( prop ) )
- return true;
- }
- return false;
- }
-
- public Gee.ReadOnlyCollection<Property> get_property_list ( ) {
- var lst = new Gee.ArrayList<Property> ();
- foreach ( Property p in this.properties ) {
- if ( !p.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( p );
- }
-
- return new Gee.ReadOnlyCollection<Property>( lst );
- }
-
- protected void parse_property_comments ( Valadoc.Parser docparser ) {
- foreach ( Property prop in this.properties ) {
- prop.parse_comment ( docparser );
- }
- }
-
- public void visit_properties ( Doclet doclet ) {
- foreach ( Property prop in this.get_property_list () )
- prop.visit ( doclet );
- }
-
- // rename to set_property_type_references
- protected void set_property_type_reference () {
- foreach ( Property prop in this.properties ) {
- prop.set_type_references ( );
- }
- }
-
- protected void add_properties ( Gee.Collection<Vala.Property> vproperties ) {
- foreach ( Vala.Property vprop in vproperties ) {
- var tmp = new Property ( this.settings, vprop, this, this.head, this.bracket_level + 1 );
- tmp.initialisation ( );
- this.properties.add ( tmp );
- }
- }
-}
-
-
-public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler {
- protected abstract Gee.ArrayList<Method> construction_methods {
- set;
- get;
- }
-
- protected inline Basic? search_construction_method ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] == null )
- return null;
-
- if ( params[pos+2] != null )
- return null;
-
- string name = params[pos] + "." + params[pos+1];
-
- foreach ( Method m in this.construction_methods ) {
- if ( m.name == name )
- return m;
- }
- return null;
- }
-
- public Gee.ReadOnlyCollection<Method> get_construction_method_list ( ) {
- var lst = new Gee.ArrayList<Method> ();
- foreach ( Method cm in this.construction_methods ) {
- if ( !cm.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( cm );
- }
-
- return new Gee.ReadOnlyCollection<Method>( lst );
- }
-
- protected void parse_construction_method_comments ( Valadoc.Parser docparser ) {
- foreach ( Method cm in this.construction_methods ) {
- cm.parse_comment ( docparser );
- }
- }
-
- protected void set_construction_method_references ( ) {
- foreach ( Method cm in this.construction_methods ) {
- cm.set_type_references ( );
- }
- }
-
- public void visit_construction_methods ( Doclet doclet ) {
- foreach ( Method m in this.get_construction_method_list() ) {
- m.visit ( doclet, this );
- }
- }
-
- protected void add_methods_and_construction_methods ( Gee.Collection<Vala.Method> vmethods ) {
- foreach ( Vala.Method vm in vmethods ) {
- var tmp = new Method ( this.settings, vm, this, this.head, this.bracket_level + 1 );
- tmp.initialisation ( );
- if ( tmp.is_constructor )
- this.construction_methods.add ( tmp );
- else
- this.methods.add ( tmp );
- }
- }
-}
-
-
-
-public interface Valadoc.SignalHandler : ContainerDataType {
- protected abstract Gee.ArrayList<Signal> signals {
- get;
- set;
- }
-
- protected inline Basic? search_signal ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Signal sig in this.signals ) {
- if ( sig.name == params[pos] )
- return sig;
- }
- return null;
- }
-
- // internal
- public void add_signals ( Gee.Collection<Vala.Signal> vsignals ) {
- foreach ( Vala.Signal vsig in vsignals ) {
- var tmp = new Signal ( this.settings, vsig, this, this.head, this.bracket_level + 1 );
- tmp.initialisation ();
- this.signals.add ( tmp );
- }
- }
-
- public void visit_signals ( Doclet doclet ) {
- foreach ( Signal sig in this.get_signal_list ( ) ) {
- sig.visit ( doclet );
- }
- }
-
- public Gee.ReadOnlyCollection<Signal> get_signal_list () {
- var lst = new Gee.ArrayList<Signal> ();
- foreach ( Signal sig in this.signals ) {
- if ( !sig.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( sig );
- }
-
- return new Gee.ReadOnlyCollection<Signal>( lst );
- }
-
- // internal
- protected void set_signal_type_references () {
- foreach ( Signal sig in this.signals ) {
- sig.set_type_references ( );
- }
- }
-
- // internal
- protected void parse_signal_comments ( Valadoc.Parser docparser ) {
- foreach ( Signal sig in this.signals ) {
- sig.parse_comment ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.StructHandler : Basic {
- protected abstract Gee.ArrayList<Struct> structs {
- set;
- get;
- }
-
- public abstract uint bracket_level {
- construct set;
- protected get;
- }
-
- protected inline Basic? search_struct ( string[] params, int pos ) {
- foreach ( Struct stru in this.structs ) {
- Basic element = stru.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- public Gee.Collection<Struct> get_struct_list ( ) {
- var lst = new Gee.ArrayList<Struct> ();
- foreach ( Struct stru in this.structs ) {
- if ( !stru.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( stru );
- }
-
- return new Gee.ReadOnlyCollection<Struct>( lst );
- }
-
- // internal, remove
- public void append_struct ( Valadoc.Struct stru ) {
- this.structs.add( stru );
- }
-
- public void add_struct ( Vala.Struct vstru ) {
- Struct stru = new Struct ( this.settings, vstru, this, this.head, 0 );
- this.structs.add( stru );
- stru.initialisation( );
- }
-
- public void add_structs ( Gee.Collection<Vala.Struct> vstructs ) {
- foreach ( Vala.Struct vstru in vstructs ) {
- this.add_struct ( vstru );
- }
- }
-
- public void visit_structs ( Doclet doclet ) {
- foreach ( Struct stru in this.get_struct_list() ) {
- stru.visit ( doclet );
- }
- }
-
- protected void set_struct_type_references ( ) {
- foreach ( Struct stru in this.structs ) {
- stru.set_type_references ( );
- }
- }
-
- protected void parse_struct_comments ( Valadoc.Parser docparser ) {
- foreach ( Struct stru in this.structs ) {
- stru.parse_comments ( docparser );
- }
- }
-}
-
-
-
-public interface Valadoc.Visitable : Basic, SymbolAccessibility {
- protected bool is_type_visitor_accessible ( Valadoc.Basic element ) {
- if ( !this.settings._private && this.is_private )
- return false;
-
- if ( !this.settings._protected && this.is_protected )
- return false;
-
- if ( this.parent != element && !this.settings.add_inherited )
- return false;
-
- return true;
- }
-
- protected bool is_visitor_accessible ( ) {
- if ( !this.settings._private && this.is_private )
- return false;
-
- if ( !this.settings._protected && this.is_protected )
- return false;
-
- return true;
- }
-}
-
-
-public interface Valadoc.SymbolAccessibility {
- public abstract bool is_public {
- get;
- }
-
- public abstract bool is_protected {
- get;
- }
-
- public abstract bool is_private {
- get;
- }
-}
-
-
-
-public interface Valadoc.ReturnTypeHandler : Basic {
- public abstract TypeReference return_type {
- protected set;
- get;
- }
-
- // internal
- public void set_return_type_references ( ) {
- if ( this.return_type == null )
- return ;
-
- this.return_type.set_type_references ( );
- }
-
- // internal
- protected void set_ret_type ( Vala.DataType vtref ) {
- var tmp = new TypeReference.return_type ( this.settings, vtref, this, this.head );
- this.return_type = tmp;
- }
-}
-
-
-// ????
-public interface Valadoc.TypeHandler : Basic {
- public abstract TypeReference type_reference {
- protected set;
- get;
- }
-
- public void set_type_references ( ) {
- if ( this.type_reference == null )
- return ;
-
- this.type_reference.set_type_references ( );
- }
-
- // ???
- protected void set_ret_type ( Vala.DataType vtref ) {
- var tmp = new TypeReference ( this.settings, vtref, this, this.head );
- this.type_reference = tmp;
- }
-}
-
-
-public interface Valadoc.ConstantHandler : Basic {
- protected abstract Gee.ArrayList<Constant> constants {
- protected set;
- get;
- }
-
- // internal
- protected inline Basic? search_constant ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Constant c in this.constants ) {
- if ( c.name == params[pos] )
- return c;
- }
- return null;
- }
-
- public Gee.ReadOnlyCollection<Constant> get_constant_list ( ) {
- var lstd = new Gee.ArrayList<Constant> ();
- foreach ( Constant c in this.constants ) {
- if ( !c.is_type_visitor_accessible ( this ) )
- continue ;
-
- lstd.add ( c );
- }
-
- return new Gee.ReadOnlyCollection<Type>( lstd );
- }
-
- // internal
- public void add_constants ( Gee.Collection<Vala.Constant> vconstants ) {
- foreach ( Vala.Constant vc in vconstants ) {
- this.add_constant ( vc );
- }
- }
-
- // internal
- public void add_constant ( Vala.Constant vc ) {
- var tmp = new Constant ( this.settings, vc, this, this.head );
- this.constants.add ( tmp );
- tmp.initialisation ( );
- }
-
- // internal
- public void set_constant_type_references ( ) {
- foreach ( Constant c in this.constants ) {
- c.set_type_references ( );
- }
- }
-
- // internal
- public void parse_constant_comments ( Valadoc.Parser docparser ) {
- foreach ( Constant c in this.constants ) {
- c.parse_comment ( docparser );
- }
- }
-
- public void visit_constants ( Doclet doclet ) {
- foreach ( Constant c in this.get_constant_list() ) {
- c.visit ( doclet, this );
- }
- }
-}
-
-
-public interface Valadoc.FieldHandler : Basic {
- protected abstract Gee.ArrayList<Field> fields {
- protected set;
- get;
- }
-
- public abstract uint bracket_level {
- construct set;
- get;
- }
-
- // internal
- protected inline Basic? search_field ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Field f in this.fields ) {
- if ( f.name == params[pos] )
- return f;
- }
- return null;
- }
-
- public Gee.ReadOnlyCollection<Field> get_field_list ( ) {
- var lstd = new Gee.ArrayList<Field> ();
- foreach ( Field f in this.fields ) {
- if ( !f.is_type_visitor_accessible ( this ) )
- continue ;
-
- lstd.add ( f );
- }
-
- return new Gee.ReadOnlyCollection<Type>( lstd );
- }
-
- // internal
- public void add_fields ( Gee.Collection<Vala.Field> vfields ) {
- foreach ( Vala.Field vf in vfields ) {
- this.add_field ( vf );
- }
- }
-
- // internal
- public void add_field ( Vala.Field vf ) {
- var tmp = new Field ( this.settings, vf, this, this.head, 0 /* this.bracket_level + 1 */ );
- this.fields.add ( tmp );
- tmp.initialisation ( );
- }
-
- // internal
- public void set_field_type_references ( ) {
- foreach ( Field field in this.fields ) {
- field.set_type_references ( );
- }
- }
-
- // internal
- public void parse_field_comments ( Valadoc.Parser docparser ) {
- foreach ( Field field in this.fields ) {
- field.parse_comment ( docparser );
- }
- }
-
- public void visit_fields ( Doclet doclet ) {
- foreach ( Field field in this.get_field_list() ) {
- field.visit ( doclet, this );
- }
- }
-}
-
-
-
-public interface Valadoc.ExceptionHandler : Basic {
- protected abstract Gee.ArrayList<TypeReference> err_domains {
- protected set;
- get;
- }
-
- public Gee.ReadOnlyCollection<TypeReference> get_error_domains ( ) {
- return new Gee.ReadOnlyCollection<FormalParameter> ( this.err_domains );
- }
-
- // internal
- public void add_error_domains ( Gee.Collection<Vala.DataType> vexceptions ) {
- foreach ( Vala.DataType vtref in vexceptions ) {
- var tmp = new TypeReference ( this.settings, vtref, (Valadoc.Basic)this, this.head );
- this.err_domains.add ( tmp );
- }
- }
-
- // internal
- public void set_exception_type_references ( ) {
- foreach ( TypeReference tref in this.err_domains ) {
- tref.set_type_references ( );
- }
- }
-}
-
-
-
-public interface Valadoc.ParameterListHandler : Basic {
- protected abstract Gee.ArrayList<FormalParameter> param_list {
- protected set;
- get;
- }
-
- public abstract uint bracket_level {
- construct set;
- get;
- }
-
- public Gee.ReadOnlyCollection<FormalParameter> get_parameter_list ( ) {
- return new Gee.ReadOnlyCollection<FormalParameter> ( this.param_list );
- }
-
- protected void add_parameter_list ( Gee.Collection<Vala.FormalParameter> vparams ) {
- foreach ( Vala.FormalParameter vfparam in vparams ) {
- var tmp = new FormalParameter ( this.settings, vfparam, this, this.head );
- tmp.initialisation ( );
- this.param_list.add ( tmp );
- }
- }
-
- // internal
- public void set_parameter_list_type_references ( ) {
- foreach ( FormalParameter fparam in this.param_list ) {
- fparam.set_type_references ( );
- }
- }
-}
-
-
-
-public interface Valadoc.MethodHandler : Basic {
- protected abstract Gee.ArrayList<Method> methods {
- protected set;
- get;
- }
-
- public abstract uint bracket_level {
- construct set;
- get;
- }
-
- // internal
- protected inline Basic? search_method ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( Method m in this.methods ) {
- if ( m.name == params[pos] )
- return m;
- }
- return null;
- }
-
- // internal
- public void set_method_type_references ( ) {
- foreach ( Method m in this.methods ) {
- m.set_type_references ( );
- }
- }
-
- // internal
- public void parse_method_comments ( Valadoc.Parser docparser ) {
- foreach ( Method m in this.methods ) {
- m.parse_comment ( docparser );
- }
- }
-
- protected void add_method ( Vala.Method vmethod ) {
- var tmp = new Method ( this.settings, vmethod, this, this.head, 0 );
- tmp.initialisation ( );
- this.methods.add ( tmp );
- }
-
- protected void add_methods ( Gee.Collection<Vala.Method> vmethods ) {
- foreach ( Vala.Method vm in vmethods ) {
- this.add_method ( vm );
- }
- }
-
- public void visit_methods ( Doclet doclet ) {
- foreach ( Method m in this.get_method_list() ) {
- m.visit ( doclet, this );
- }
- }
-
-
- public Gee.ReadOnlyCollection<Method> get_method_list ( ) {
- var lst = new Gee.ArrayList<Method> ();
- foreach ( Method m in this.methods ) {
- if ( !m.is_type_visitor_accessible ( this ) )
- continue ;
-
- lst.add ( m );
- }
-
- return new Gee.ReadOnlyCollection<Method>( lst );
- }
-}
-
-
-
-public interface Valadoc.TemplateParameterListHandler : Basic {
- protected abstract Gee.ArrayList<TypeParameter> template_param_lst {
- set;
- get;
- }
-
- public Gee.ReadOnlyCollection<TypeParameter> get_template_param_list ( ) {
- return new Gee.ReadOnlyCollection<TypeParameter> ( this.template_param_lst );
- }
-
- // internal
- public void set_template_parameter_list ( Gee.Collection<Vala.TypeParameter> vtparams ) {
- foreach ( Vala.TypeParameter vtparam in vtparams ) {
- var tmp = new TypeParameter ( this.settings, vtparam, this, this.head );
- tmp.initialisation ( );
- this.template_param_lst.add ( tmp );
- }
- }
-
- // internal
- public void set_template_parameter_list_references ( ) {
- foreach ( TypeParameter tparam in this.template_param_lst ) {
- tparam.set_type_reference ( );
- }
- }
-}
-
-
-
-public class Valadoc.Constant : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable {
- public TypeReference type_reference {
- protected set;
- get;
- }
-
- public Vala.Constant vconst {
- construct set;
- private get;
- }
-
- public override string?# name {
- get {
- return this.vconst.name;
- }
- }
-
- public void initialisation ( ) {
- this.vsymbol = this.vconst;
-
- var vret = this.vconst.type_reference;
- this.set_ret_type ( vret );
- }
-
- public Constant ( Valadoc.Settings settings, Vala.Constant vconst, ConstantHandler parent, Tree head ) {
- this.settings = settings;
- this.vconst = vconst;
- this.parent = parent;
- this.head = head;
- }
-
- // internal
- public void set_type_references ( ) {
- ((TypeHandler)this).set_type_references ( );
- }
-
- // internal
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.CONSTANT );
- }
-
- public void visit ( Doclet doclet, ConstantHandler? parent ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_constant ( this, parent );
- }
-
- public void write ( Langlet langlet, void* ptr, ConstantHandler parent ) {
- langlet.write_constant ( this, parent, ptr );
- }
-}
-
-
-public class Valadoc.Field : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable {
- public Field ( Valadoc.Settings settings, Vala.Field vfield, FieldHandler parent, Tree head, uint bracket_level ) {
- this.bracket_level = bracket_level;
- this.settings = settings;
- this.vfield = vfield;
- this.parent = parent;
- this.head = head;
- }
-
- public string? get_cname () {
- return this.vfield.get_cname();
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public TypeReference type_reference {
- protected set;
- get;
- }
-
- public override string?# name {
- get {
- return this.vfield.name;
- }
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vfield;
-
- var vret = this.vfield.field_type;
- this.set_ret_type ( vret );
- }
-
- public Vala.Field vfield {
- construct set;
- private get;
- }
-
- public bool is_volatile {
- get {
- return this.vfield.is_volatile;
- }
- }
-
- // remove
- public bool is_global {
- get {
- return ( this.parent is Valadoc.Namespace );
- }
- }
-
- // internal
- public void set_type_references ( ) {
- ((TypeHandler)this).set_type_references ( );
- }
-
- // internal
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.FIELD );
- }
-
- public void visit ( Doclet doclet, FieldHandler? parent ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_field ( this, parent );
- }
-
- public void write ( Langlet langlet, void* ptr, FieldHandler parent ) {
- langlet.write_field ( this, parent, ptr );
- }
-}
-
-
-
-public class Valadoc.TypeReference : Basic {
- public TypeReference ( Valadoc.Settings settings, Vala.DataType vtyperef, Basic parent, Tree head ) {
- this.is_return_type = false;
- this.settings = settings;
- this.vtyperef = vtyperef;
- this.parent = parent;
- this.head = head;
- }
-
- // remove
- public TypeReference.return_type ( Valadoc.Settings settings, Vala.DataType vtyperef, Basic parent, Tree head ) {
- this.is_return_type = true;
- this.settings = settings;
- this.vtyperef = vtyperef;
- this.parent = parent;
- this.head = head;
- }
-
- // remove
- public bool is_return_type {
- construct set;
- protected get;
- }
-
- protected Gee.ArrayList<TypeReference> type_arguments = new Gee.ArrayList<TypeReference> ();
-
- public Gee.ReadOnlyCollection<TypeReference> get_type_arguments ( ) {
- return new Gee.ReadOnlyCollection<TypeReference> ( this.type_arguments );
- }
-
- private void set_template_argument_list ( Gee.Collection<Vala.DataType> varguments ) {
- foreach ( Vala.DataType vdtype in varguments ) {
- var dtype = new TypeReference ( this.settings, vdtype, this, this.head );
- dtype.set_type_references ( );
- this.type_arguments.add ( dtype );
- }
- }
-
- public DataType data_type {
- private set;
- get;
- }
-
- public Vala.DataType vtyperef {
- construct set;
- private get;
- }
-
- public bool pass_ownership {
- get {
- Vala.CodeNode? node = this.vtyperef.parent_node;
- if ( node == null )
- return false;
-
- if ( node is Vala.FormalParameter ) {
- return ( ((Vala.FormalParameter)node).direction == ParameterDirection.IN &&
- ((Vala.FormalParameter)node).parameter_type.value_owned );
- }
-
- if ( node is Vala.Property ) {
- return ((Vala.Property)node).property_type.value_owned;
- }
-
- return false;
- }
- }
-
- // from vala/valainterfacewriter.vala
- private bool is_weak_helper (Vala.DataType type) {
- if (type.value_owned) {
- return false;
- } else if (type is VoidType || type is PointerType) {
- return false;
- } else if (type is ValueType) {
- if (type.nullable) {
- // nullable structs are heap allocated
- return false;
- }
- }
- return true;
- }
-
- public bool is_weak {
- get {
- Vala.CodeNode? node = this.vtyperef.parent_node;
- if ( node == null )
- return false;
-
- if ( node is Vala.FormalParameter ) {
- if ( ((Vala.FormalParameter)node).direction == Vala.ParameterDirection.IN)
- return false;
-
- if ( ((Vala.FormalParameter)node).direction == Vala.ParameterDirection.OUT)
- return false;
-
- return !this.vtyperef.value_owned;
- }
-
- return is_weak_helper( this.vtyperef );
- }
- }
-
- public bool is_nullable {
- get {
- return this.vtyperef.nullable && this.vtyperef is Vala.PointerType == false;
- }
- }
-
- public bool is_pointer {
- get {
- return this.vtyperef is Vala.PointerType;
- }
- }
-
- public uint pointer_rank {
- get {
- if ( !this.is_pointer )
- return 0;
-
- Vala.DataType vdtype = this.vtyperef;
- for ( int i = 0 ;; i++ ) {
- if ( vdtype is Vala.PointerType == false )
- return i;
-
- vdtype = ((Vala.PointerType)vdtype).base_type;
- }
- return 0;
- }
- }
-
- public bool is_array {
- get {
- return this.vtyperef.is_array();
- }
- }
-
- public uint array_rank {
- get {
- if ( !this.is_array )
- return 0;
-
- return ((Vala.ArrayType)vtyperef).rank;
- }
- }
-
- public string?# type_nspace_name {
- get {
-
- if ( this.data_type == null )
- return null;
-
- if ( this.data_type.nspace == null )
- return null;
-
- return this.data_type.nspace.name;
- }
- }
-
-
- private string extract_type_name ( Vala.DataType vdtype ) {
- if ( vdtype is Vala.VoidType ) {
- return "void";
- }
- else if ( vdtype is Vala.PointerType ) {
- return this.extract_type_name ( ((Vala.PointerType)vdtype).base_type );
- }
- else if ( vdtype is Vala.DelegateType ) {
- return ((Vala.DelegateType)this.vtyperef).delegate_symbol.name;
- }
- else if ( vdtype is Vala.MethodType ) {
- return ((Vala.MethodType)this.vtyperef).method_symbol.name;
- }
- else if ( vdtype is Vala.SignalType ) {
- return ((Vala.SignalType)this.vtyperef).signal_symbol.name;
- }
- else if ( vdtype is Vala.ArrayType ) {
- this.extract_type_name ( ((Vala.ArrayType)vdtype).element_type );
- }
- /*
- else if ( vdtype is FieldPrototype ) {
- // Vala.Field field_symbol
- }
- InvalidType // nix
- // ReferenceType
- TypeParameterType
- UnresolvedType //Vala.UnresolvedSymbol unresolved_symbol
- ValueType // Vala.TypeSymbol type_symbol
- */
- return vtyperef.to_string();
- }
-
- // remove
- public string# type_name {
- get {
- return this.extract_type_name ( this.vtyperef );
- /*
- Vala.TypeSymbol? vdtype = null;
- if ( this.vtyperef is Vala.VoidType ) {
- return "void";
- }
- else if ( this.vtyperef is Vala.PointerType ) {
- vdtype = ((Vala.PointerType)this.vtyperef).base_type.data_type;
- }
- else if ( this.vtyperef is Vala.DelegateType ) {
- return ((Vala.DelegateType)this.vtyperef).delegate_symbol.name;
- }
- else if ( this.vtyperef is Vala.MethodType ) {
- return ((Vala.MethodType)this.vtyperef).method_symbol.name;
- }
- else if ( this.vtyperef is Vala.SignalType ) {
- return ((Vala.SignalType)this.vtyperef).signal_symbol.name;
- }
- else if ( this.vtyperef is Vala.ArrayType ) {
- vdtype = ((Vala.ArrayType)this.vtyperef).element_type.data_type;
- }
-
- if ( vdtype == null )
- vdtype = this.vtyperef.data_type;
-
- if ( vdtype == null ) {
- return this.vtyperef.to_string();
- }
- return vdtype.name;
- */
- }
- }
-
- private DataType? _get_data_type ( Vala.TypeSymbol vdtype, File file, Namespace ns ) {
- if ( vdtype is Vala.Enum ) {
- return ns.find_enum ( (Vala.Enum)vdtype );
- }
- else if ( vdtype is ErrorDomain ) {
- return ns.find_errordomain ( (Vala.ErrorDomain)vdtype );
- }
- else if ( vdtype is Vala.Delegate ) {
- return ns.find_delegate ( (Vala.Delegate)vdtype );
- }
- else if ( vdtype is Vala.ArrayType ) {
- var vtsym = ((Vala.ArrayType)vdtype).data_type;
- return this._get_data_type ( vtsym, file, ns );
- }
- else if ( vdtype is Vala.Class ) {
- return ns.find_class ( (Vala.Class)vdtype );
- }
- else if ( vdtype is Vala.Struct ) {
- return ns.find_struct ( (Vala.Struct)vdtype );
- }
- else if ( vdtype is Vala.Interface ) {
- return ns.find_interface ( (Vala.Interface)vdtype );
- }
- else if ( vdtype is Vala.PointerIndirection ) {
- Vala.TypeSymbol vtsym = ((Vala.PointerType)vdtype).data_type;
- return this._get_data_type ( vtsym, file, ns );
- }
- return null;
- }
-
- private File? get_file ( Vala.CodeNode vdtype ) {
- if ( vdtype == null )
- return null;
-
- if ( vdtype.source_reference == null )
- return null;
-
-
- Vala.SourceReference sref = vdtype.source_reference;
- if ( sref is SourceReference == false )
- return null;
-
- Vala.SourceFile vfile = sref.file;
- if ( vfile == null )
- return null;
-
- File file = this.head.find_file ( vfile );
- return file;
- }
-
- private Namespace get_nspace ( File file, Vala.Symbol vns ) {
- while ( vns is Vala.Namespace == false ) {
- vns = vns.parent_symbol;
- }
-
- Namespace ns = file.find_namespace ( (Vala.Namespace)vns );
- return ns;
- }
-
- // internal
- public void set_type_references ( ) {
- //stdout.printf ( "> %s\n", this.vtyperef.to_string() );
- this.data_type = this.get_type_references ( this.vtyperef );
- }
-
- public DataType? get_type_references ( Vala.DataType vtyperef ) {
- if ( vtyperef is Vala.ErrorType ) {
- Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtyperef).error_domain;
- if ( verrdom != null ) {
- File file = this.get_file ( verrdom );
- if ( file == null ) {
- return glib_error;
- }
-
- Namespace ns = this.get_nspace ( file, verrdom );
- Valadoc.ErrorDomain errdom = ns.find_errordomain ( (Vala.ErrorDomain)verrdom );
- return errdom;
- }
- }
-
- if ( vtyperef is Vala.ClassType ) {
- Vala.Class vcl = ((Vala.ClassType)vtyperef).class_symbol;
- File file = this.get_file ( vcl );
- if ( file == null )
- return null; // err
-
- Namespace ns = this.get_nspace ( file, vcl );
- Valadoc.Class cl = ns.find_class ( (Vala.Class)vcl );
- return cl;
- }
-
- if ( vtyperef is Vala.InterfaceType ) {
- Vala.Interface vif = ((Vala.InterfaceType)vtyperef).interface_symbol;
- File file = this.get_file ( vif );
- if ( file == null )
- return null; // err
-
- Namespace ns = this.get_nspace ( file, vif );
- Valadoc.Interface iface = ns.find_interface ( (Vala.Interface)vif );
- return iface;
- }
-
- if ( vtyperef is Vala.DelegateType ) {
- Vala.Delegate vdel = ((Vala.DelegateType)vtyperef).delegate_symbol;
- File file = this.get_file ( vdel );
- if ( file == null )
- return null; // err
-
- Namespace ns = this.get_nspace ( file, vdel );
- Valadoc.Delegate del = ns.find_delegate ( (Vala.Delegate)vdel );
- return del;
- }
-
- if ( vtyperef is Vala.PointerType ) {
- Vala.DataType vptr = ((Vala.PointerType)vtyperef).base_type;
- if ( vptr == null )
- return null;
- return this.get_type_references ( vptr );
- }
-
- if ( vtyperef is Vala.ArrayType ) {
- Vala.DataType vptr = ((Vala.ArrayType)vtyperef).element_type;
- if ( vptr == null )
- return null;
-
- return this.get_type_references ( vptr );
- }
- /*
- if ( vtyperef is Vala.ValueType ) {
- // Integer, StructType, Enum
- } */
-
- Vala.TypeSymbol vdtype = vtyperef.data_type;
- if ( vdtype == null ) {
- return null;
- }
-
- var varguments = vtyperef.get_type_arguments ();
- this.set_template_argument_list ( varguments );
-
- File file = this.get_file ( vdtype );
- if ( file == null )
- return null; // err
-
- Namespace ns = this.get_nspace ( file, vdtype );
- return this._get_data_type ( vdtype, file, ns );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_type_reference ( this, ptr );
- }
-}
-
-
-
-// TODO: Remove unused stuff
-// You just need it for the name in a template-parameter-list.
-// remove TypeHandler-interface
-public class Valadoc.TypeParameter : Basic, TypeHandler {
- public TypeParameter ( Valadoc.Settings settings,
- Vala.TypeParameter vtypeparam,
- Basic parent,
- Tree head ) {
- this.vtypeparam = vtypeparam;
- this.settings = settings;
- this.parent = parent;
- this.head = head;
- }
-
- public TypeReference type_reference {
- protected set;
- get;
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_type_parameter ( this, ptr );
- }
-
- public Vala.TypeParameter vtypeparam {
- construct set;
- protected get;
- }
-
- public string# datatype_name {
- get {
- return this.vtypeparam.name;
- }
- }
-
- // internal
- public void initialisation ( ) {
- }
-
- // internal
- public void set_type_reference ( ) {
- }
-}
-
-
-public class Valadoc.FormalParameter : Basic, TypeHandler {
- public FormalParameter ( Valadoc.Settings settings, Vala.FormalParameter vformalparam, Basic parent, Tree head ) {
- this.settings = settings;
- this.vformalparam = vformalparam;
- this.parent = parent;
- this.head = head;
- }
-
- public bool is_out {
- get {
- return this.vformalparam.direction == ParameterDirection.OUT;
- }
- }
-
- public bool is_ref {
- get {
- return this.vformalparam.direction == ParameterDirection.REF;
- }
- }
-
- public ExpressionType default_vaule_type {
- default = ExpressionType.NOT_SET;
- private set;
- get;
- }
-
- public string? default_value {
- private set;
- public get;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vformalparam;
-
- var vformparam = this.vformalparam.parameter_type;
- this.set_ret_type ( vformparam );
-
- var def = this.vformalparam.default_expression;
- if ( def != null ) {
- {
- if ( def is Vala.StringLiteral ) {
- this.default_value = def.to_string;
- this.default_vaule_type = ExpressionType.STRING;
- }
- else if ( def is Vala.CharacterLiteral ) {
- this.default_value = def.to_string;
- this.default_vaule_type = ExpressionType.CHAR;
- }
- else if ( def is Vala.RealLiteral ) {
- this.default_vaule_type = ExpressionType.REAL;
- this.default_value = def.to_string;
- }
- else if ( def is BooleanLiteral ) {
- this.default_value = def.to_string;
- this.default_vaule_type = ExpressionType.BOOL;
- }
- else if ( def is IntegerLiteral ) {
- this.default_value = def.to_string;
- this.default_vaule_type = ExpressionType.INT;
- }
- else if ( def is NullLiteral ) {
- this.default_vaule_type = ExpressionType.NULL;
- this.default_value = "null";
- }
- else {
- this.default_value = def.to_string;
- }
- }
- }
- }
-
- public TypeReference type_reference {
- protected set;
- get;
- }
-
- public bool ellipsis {
- get {
- return this.vformalparam.ellipsis;
- }
- }
-
- public bool is_construct {
- get {
- return this.vformalparam.construct_parameter;
- }
- }
-
- public override string?# name {
- get {
- return ( this.vformalparam.name == null )
- ? "" : this.vformalparam.name;
- }
- }
-
- public Vala.FormalParameter vformalparam {
- construct set;
- protected get;
- }
-
- // internal
- public void set_type_references ( ) {
- if ( this.vformalparam.ellipsis )
- return ;
-
- ((TypeHandler)this).set_type_references ( );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_formal_parameter ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.PropertyAccessor : Object /*, FIXME: Valac-Bug! Can't override properties of SymbolAccessibility */ {
- public PropertyAccessor ( Valadoc.Settings settings, Vala.PropertyAccessor vpropacc, Property parent, Tree head ) {
- this.settings = settings;
- this.vpropacc = vpropacc;
- this.parent = parent;
- this.head = head;
- }
-
- public void construction ( ) {
- }
-
- public Tree head {
- construct;
- get;
- }
-
- public Vala.PropertyAccessor vpropacc {
- construct;
- private get;
- }
-
- public Settings settings {
- construct;
- get;
- }
-
- public Property parent {
- private set;
- get;
- }
-
- public Tree tree {
- construct;
- get;
- }
-
- public bool is_construct {
- get {
- return this.vpropacc.construction;
- }
- }
-
- public bool is_protected {
- get {
- return this.vpropacc.access == Vala.SymbolAccessibility.PROTECTED;
- }
- }
-
- public bool is_public {
- get {
- return this.vpropacc.access == Vala.SymbolAccessibility.PUBLIC;
- }
- }
-
- public bool is_private {
- get {
- return this.vpropacc.access == Vala.SymbolAccessibility.PRIVATE;
- }
- }
-
- public bool is_set {
- get {
- return this.vpropacc.writable;
- }
- }
-
- public bool is_get {
- get {
- return this.vpropacc.readable;
- }
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_property_accessor ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.Property : Basic, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable {
- public Property ( Valadoc.Settings settings,
- Vala.Property vproperty,
- ContainerDataType parent,
- Tree head,
- uint bracket_level ) {
- this.settings = settings;
- this.vproperty = vproperty;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- public string? get_cname () {
- return this.vproperty.nick;
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public bool equals ( Property p ) {
- return this.vproperty.equals ( p.vproperty );
- }
-
- public TypeReference return_type {
- protected set;
- get;
- }
-
- public bool is_virtual {
- get {
- return this.vproperty.is_virtual;
- }
- }
-
- public bool is_abstract {
- get {
- return this.vproperty.is_abstract;
- }
- }
-
- public bool is_override {
- get {
- return this.vproperty.overrides;
- }
- }
-
- public PropertyAccessor setter {
- private set;
- get;
- }
-
- public PropertyAccessor getter {
- private set;
- get;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = vproperty;
-
- var ret = this.vproperty.property_type;
- this.set_ret_type ( ret );
-
- if ( this.vproperty.get_accessor != null )
- this.getter = new PropertyAccessor ( this.settings, this.vproperty.get_accessor, this, this.head );
-
- if ( this.vproperty.set_accessor != null )
- this.setter = new PropertyAccessor ( this.settings, this.vproperty.set_accessor, this, this.head );
- }
-
- public Vala.Property vproperty {
- construct set;
- protected get;
- }
-
- public override string?# name {
- get {
- return this.vproperty.name;
- }
- }
-
- // internal
- public void set_type_references ( ) {
- this.set_return_type_references ( );
- }
-
- // internal
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.PROPERTY );
- }
-
- public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_property ( this );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_property ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.Signal : Basic, ParameterListHandler, SymbolAccessibility,
- ReturnTypeHandler, Visitable, Writeable
-{
- public Signal ( Valadoc.Settings settings,
- Vala.Signal vsignal,
- ContainerDataType parent,
- Tree head,
- uint bracket_level ) {
- this.settings = settings;
- this.vsignal = vsignal;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- construct {
- this.param_list = new Gee.ArrayList<FormalParameter> ();
- }
-
- public string? get_cname () {
- return this.vsignal.get_cname();
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public TypeReference return_type {
- protected set;
- get;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = vsignal;
-
- var vparamlst = this.vsignal.get_parameters ();
- this.add_parameter_list ( vparamlst );
-
- var ret = this.vsignal.return_type;
- this.set_ret_type ( ret );
- }
-
- protected Gee.ArrayList<FormalParameter> param_list {
- protected set;
- get;
- }
-
- public Vala.Signal vsignal {
- construct set;
- private get;
- }
-
- // internal
- public void set_type_references ( ) {
- this.set_parameter_list_type_references ( );
- this.set_return_type_references ( );
- }
-
- // internal
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.SIGNAL );
- }
-
- public override string?# name {
- get {
- return this.vsignal.name;
- }
- }
-
- public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_signal ( this );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_signal ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.Method : Basic, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler,
- SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable
-{
- public Method ( Valadoc.Settings settings,
- Vala.Method vmethod,
- MethodHandler parent,
- Tree head,
- uint bracket_level ) {
- this.settings = settings;
- this.vmethod = vmethod;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- public string? get_cname () {
- return this.vmethod.get_cname();
- }
-
- construct {
- this.err_domains = new Gee.ArrayList<TypeReference>();
- this.param_list = new Gee.ArrayList<FormalParameter>();
- this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
- }
-
- public Method base_method {
- get;
- set;
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public TypeReference return_type {
- protected set;
- get;
- }
-
- public Gee.ArrayList<TypeParameter> template_param_lst {
- protected set;
- get;
- }
-
- public Gee.ArrayList<FormalParameter> param_list {
- protected set;
- get;
- }
-
- public Gee.ArrayList<TypeReference> err_domains {
- protected set;
- get;
- }
-
- public string?# comment_str {
- get {
- return this.vmethod.source_reference.comment;
- }
- }
-
- // intern
- public bool equals ( Method m ) {
- return ( m.vmethod == this.vmethod );
- }
-
- // intern
- public void parse_comment ( Valadoc.Parser docparser ) {
- if ( this.documentation != null )
- return ;
-
- if ( this.comment_string == null )
- return ;
-
- bool tmp = Parser.is_documentation ( this.comment_string );
- if ( tmp == false )
- return ;
-
- if ( this.is_override && Parser.is_inherit_doc ( this.comment_string ) ) {
- this.base_method.parse_comment ( docparser );
- this.documentation = this.base_method.documentation;
- return ;
- }
-
- // wrong context!
- this.parse_comment_helper ( docparser, CommentContext.CLASS );
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = vmethod;
-
- var vret = this.vmethod.return_type;
- this.set_ret_type ( vret );
-
- var vparamlst = this.vmethod.get_parameters ();
- this.add_parameter_list ( vparamlst );
-
- var vexceptionlst = this.vmethod.get_error_types ();
- this.add_error_domains ( vexceptionlst );
- }
-
- public Vala.Method vmethod {
- construct set;
- private get;
- }
-
- public bool is_abstract {
- get {
- return this.vmethod.is_abstract;
- }
- }
-
- public bool is_virtual {
- get {
- return this.vmethod.is_virtual;
- }
- }
-
- public bool is_override {
- get {
- return this.vmethod.overrides;
- }
- }
-
- public bool is_static {
- get {
- if ( this.parent is Namespace || this.is_constructor )
- return false;
-
- return this.vmethod.binding == MemberBinding.STATIC;
- }
- }
-
- public string# parent_name {
- get {
- return this.parent.name;
- }
- }
-
- public bool is_global {
- get {
- return ( this.parent is Namespace );
- }
- }
-
- public bool is_constructor {
- get {
- return ( this.vmethod is Vala.CreationMethod );
- }
- }
-
- public bool is_inline {
- get {
- return this.vmethod.is_inline;
- }
- }
-
- public override string?# name {
- get {
- if ( this.is_constructor )
- return this.parent_name + this.vmethod.name.offset( ".new".len() );
- else
- return this.vmethod.name;
- }
- }
-
- // internal
- public void set_type_references ( ) {
- this.set_return_type_references ( );
-
- this.set_exception_type_references ( );
- this.set_parameter_list_type_references ( );
- }
-
- public void visit ( Doclet doclet, Valadoc.MethodHandler in_type ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_method ( this, in_type );
- }
-
- public void write ( Langlet langlet, void* ptr, Valadoc.MethodHandler parent ) {
- langlet.write_method ( ptr, this, parent );
- }
-}
-
-
-public class Valadoc.EnumValue: Basic, Writeable {
- public EnumValue ( Valadoc.Settings settings,
- Vala.EnumValue venval,
- Enum parent,
- Tree head ) {
- this.settings = settings;
- this.venval = venval;
- this.parent = parent;
- this.head = head;
- }
-
- public void initialisation ( ) {
- this.bracket_level = 1;
- this.vsymbol = venval;
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public override string?# name {
- get {
- return this.venval.name;
- }
- }
-
- public Vala.EnumValue venval {
- construct set;
- protected get;
- }
-
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_enum_value ( this, ptr );
- }
-
- public void visit ( Doclet doclet ) {
- doclet.visit_enum_value ( this );
- }
-}
-
-
-
-public class Valadoc.ErrorCode : Basic, Writeable {
- public ErrorCode ( Valadoc.Settings settings,
- Vala.ErrorCode verrcode,
- ErrorDomain parent,
- Tree head ) {
- this.settings = settings;
- this.verrcode = verrcode;
- this.parent = parent;
- this.head = head;
- }
-
- // internal
- public void initialisation ( ) {
- this.bracket_level = 1;
- this.vsymbol = verrcode;
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- public override string?# name {
- get {
- return this.verrcode.name;
- }
- }
-
- public Vala.ErrorCode verrcode {
- construct set;
- protected get;
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_error_code ( this, ptr );
- }
-
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE );
- }
-
- public void visit ( Doclet doclet ) {
- doclet.visit_error_code ( this );
- }
-}
-
-
-
-public abstract class Valadoc.DataType: Basic, SymbolAccessibility, Visitable, Writeable {
- public override string?# name {
- get {
- return this.vsymbol.name;
- }
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- // internal
- public virtual void set_type_references ( ) {
- }
-
- public virtual void visit ( Doclet doclet ) {
- }
-
- public virtual void write ( Langlet langlet, void* ptr ) {
- }
-}
-
-
-
-public class Valadoc.Delegate : DataType, ParameterListHandler, SymbolAccessibility, Writeable,
- ReturnTypeHandler, TemplateParameterListHandler,
- ExceptionHandler {
- public Delegate ( Valadoc.Settings settings,
- Vala.Delegate vdelegate,
- DelegateHandler parent,
- Tree head,
- uint bracket_level ) {
- this.settings = settings;
- this.vdelegate = vdelegate;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- public string? get_cname () {
- return this.vdelegate.get_cname();
- }
-
- construct {
- this.err_domains = new Gee.ArrayList<TypeReference>();
- this.param_list = new Gee.ArrayList<FormalParameter> ();
- this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
- }
-
- public TypeReference return_type {
- protected set;
- get;
- }
-
- public override void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_delegate ( this );
- }
-
- public Gee.ArrayList<TypeParameter> template_param_lst {
- protected set;
- get;
- }
-
- protected Gee.ArrayList<FormalParameter> param_list {
- protected set;
- get;
- }
-
- protected Gee.ArrayList<TypeReference> err_domains {
- protected set;
- get;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vdelegate;
-
- var vparamlst = this.vdelegate.get_parameters ();
- this.add_parameter_list ( vparamlst );
-
- var vexceptionlst = this.vdelegate.get_error_types ();
- this.add_error_domains ( vexceptionlst );
-
- var ret = this.vdelegate.return_type;
- this.set_ret_type ( ret );
- }
-
- public Vala.Delegate vdelegate {
- construct set;
- private get;
- }
-
- public bool is_static {
- get {
- return this.vdelegate.has_target;
- }
- }
-
- // internal
- public override void set_type_references ( ) {
- this.set_template_parameter_list_references ( );
- this.set_parameter_list_type_references ( );
- this.set_return_type_references ( );
- }
-
- // internal
- public void parse_comment ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.DELEGATE );
- }
-
- // internal
- public bool is_vdelegate ( Vala.Delegate vdel ) {
- return ( this.vdelegate == vdel );
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_delegate ( this, ptr );
- }
-}
-
-
-
-public abstract class Valadoc.ContainerDataType : DataType, MethodHandler, Visitable,
- TemplateParameterListHandler
-{
- protected Gee.ArrayList<DataType> parent_types = new Gee.ArrayList<DataType>();
-
- construct {
- this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
- this.methods = new Gee.ArrayList<Method> ();
- }
-
- protected Class? parent_class {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Method> methods {
- set;
- get;
- }
-
- public string?# comment_str {
- get {
- return null;
- }
- }
-
- protected Gee.ArrayList<TypeParameter> template_param_lst {
- set;
- get;
- }
-
- // rename to get_parent_type_list
- public Gee.Collection<DataType> get_parent_types ( ) {
- return this.parent_types;
- }
-
- public bool derived_from_interface ( Interface iface ) {
- foreach ( DataType dtype in this.parent_types ) {
- if ( dtype == iface )
- return true;
- }
- return false;
- }
-
- // internal <>!<>!<>!<>!<>
- // remove virtual
- public virtual void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_method_comments ( docparser );
- }
-
- protected void set_parent_references ( Gee.Collection<Vala.DataType> lst ) {
- if ( ((Gee.Collection)this.parent_types).size != 0 )
- return ;
-
- foreach ( Vala.DataType vtyperef in lst ) {
- var vtype = vtyperef.data_type;
- if ( vtype == null )
- return ;
-
- Vala.SourceFile vfile = vtype.source_reference.file;
- File file = this.head.find_file ( vfile );
-
- Vala.Symbol vns = vtype;
- while ( vns is Vala.Namespace == false ) {
- vns = vns.parent_symbol;
- }
-
-
- Namespace ns = file.find_namespace ( (Vala.Namespace)vns );
- if ( vtype is Vala.Class ) {
- var tmp = ns.find_vclass ( (Vala.Class)vtype );
- this.parent_types.add ( tmp );
- this.parent_class = tmp;
- }
- else if ( vtype is Vala.Interface ) {
- var tmp = ns.find_interface ( (Vala.Interface)vtype );
- this.parent_types.add ( tmp );
- }
- else if ( vtype is Vala.Struct ) {
- var tmp = ns.find_struct ( (Vala.Struct)vtype );
- this.parent_types.add ( tmp );
- }
- }
- }
-
- // internal
- public override void set_type_references ( ) {
- this.set_template_parameter_list_references ( );
- this.set_method_type_references ( );
- base.set_type_references ( );
- }
-
- public bool is_double_method ( Method met ) {
- foreach ( Method m2 in this.methods ) {
- if ( met == m2 )
- continue;
-
- if ( met.name == m2.name )
- return true;
- }
- return false;
- }
-}
-
-
-
-public class Valadoc.Class : ContainerDataType, Visitable, ClassHandler, StructHandler, SignalHandler,
- EnumHandler, PropertyHandler, ConstructionMethodHandler, FieldHandler,
- DelegateHandler, ConstantHandler {
- public Class ( Valadoc.Settings settings, Vala.Class vclass, ClassHandler parent, Tree head, uint bracket_level = 0 ) {
- this.settings = settings;
- this.vclass = vclass;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- private bool inherited = false;
-
- protected Gee.ArrayList<Delegate> delegates {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Enum> enums {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Field> fields {
- set;
- get;
- }
-
- protected Gee.ArrayList<Method> construction_methods {
- set;
- get;
- }
-
- protected Gee.ArrayList<Property> properties {
- get;
- set;
- }
-
- protected Gee.ArrayList<Class> classes {
- set;
- get;
- }
-
- protected Gee.ArrayList<Struct> structs {
- set;
- get;
- }
-
- protected Gee.ArrayList<Signal> signals {
- get;
- set;
- }
-
- protected Gee.ArrayList<Constant> constants {
- get;
- set;
- }
-
- public string? get_cname () {
- return this.vclass.get_cname();
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( !(this.name == params[pos] || params[0] == "this") )
- return null;
-
- var fooo = string.joinv (".", params);
-
- if ( params[pos+1] == null )
- return this;
-
- var element = this.search_field ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_delegate ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_construction_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_signal ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_property ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_struct ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_class ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_enum ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_constant ( params, pos );
- if ( element != null )
- return element;
-
- return null;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vclass;
-
- if ( this.full_name == "GLib.Error" ) {
- glib_error = this;
- }
-
- var vtparams = this.vclass.get_type_parameters ();
- this.set_template_parameter_list ( vtparams );
-
- Gee.Collection<Vala.Enum> venums = this.vclass.get_enums ();
- enums = new Gee.ArrayList<Enum> ();
- this.add_enums ( venums );
-
- Gee.Collection<Vala.Delegate> vdelegates = this.vclass.get_delegates ();
- delegates = new Gee.ArrayList<Delegate> ();
- this.add_delegates ( vdelegates );
-
- Gee.Collection<Vala.Class> vclasses = this.vclass.get_classes();
- this.classes = new Gee.ArrayList<Class> ();
- this.add_classes ( vclasses );
-
- Gee.Collection<Vala.Struct> vstructs = this.vclass.get_structs();
- this.structs = new Gee.ArrayList<Struct> ();
- this.add_structs ( vstructs );
-
- Gee.Collection<Vala.Field> vfields = this.vclass.get_fields();
- this.fields = new Gee.ArrayList<Field> ();
- this.add_fields ( vfields );
-
- Gee.Collection<Vala.Method> vmethods = this.vclass.get_methods ();
- this.construction_methods = new Gee.ArrayList<Method>();
- this.add_methods_and_construction_methods ( vmethods );
-
- Gee.Collection<Vala.Signal> vsignals = this.vclass.get_signals();
- this.signals = new Gee.ArrayList<Signal>();
- this.add_signals ( vsignals );
-
- Gee.Collection<Vala.Property> vproperties = this.vclass.get_properties();
- this.properties = new Gee.ArrayList<Property>();
- this.add_properties ( vproperties );
-
- Gee.Collection<Vala.Constant> vconstants = this.vclass.get_constants();
- this.constants = new Gee.ArrayList<Constant>();
- this.add_constants ( vconstants );
- }
-
- public string?# comment_str {
- get {
- return this.vclass.source_reference.comment;
- }
- }
-
- public Vala.Class vclass {
- construct set;
- private get;
- }
-
- // internal
- public bool is_vclass ( Vala.Class vcl ) {
- return this.vclass == vcl;
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_class ( this, ptr );
- }
-
- public bool is_abstract {
- get {
- return this.vclass.is_abstract;
- }
- }
-
- // remove
- public bool is_static {
- get {
- return this.vclass.is_static;
- }
- }
-
- public override void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_class ( this );
- }
-
- // internal
- public override void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.CLASS );
-
- this.parse_construction_method_comments ( docparser );
- this.parse_delegate_comments ( docparser );
- this.parse_constant_comments ( docparser );
- this.parse_property_comments ( docparser );
- this.parse_struct_comments ( docparser );
- this.parse_signal_comments ( docparser );
- this.parse_class_comments ( docparser );
- this.parse_field_comments ( docparser );
- this.parse_enum_comments ( docparser );
- base.parse_comments ( docparser );
- }
-
- // remove ?
- protected bool is_double_field ( Field f ) {
- foreach ( Field f2 in this.fields ) {
- if ( f == f2 )
- continue ;
-
- if ( f.name == f2.name )
- return true;
- }
- return false;
- }
-
- // internal
- public override void set_type_references ( ) {
- base.set_type_references ( );
-
- var lst = this.vclass.get_base_types ();
- this.set_parent_references ( lst );
-
- this.set_construction_method_references ( );
- this.set_constant_type_references ( );
- this.set_delegate_type_references ( );
- this.set_property_type_reference ( );
- this.set_signal_type_references ( );
- this.set_field_type_references ( );
- this.set_enum_type_references ( );
- this.set_struct_type_references ( );
- this.set_class_type_references ( );
- }
-
- private void inheritance_class ( Class dtype ) {
- dtype.inheritance ( );
-
- if ( dtype.name == "Object" )
- return ;
-
- var flst = dtype.get_field_list ( );
- foreach ( Field f in flst ) {
- this.fields.add ( f );
- }
-
- var plst = dtype.get_property_list ( );
- foreach ( Property prop in plst ) {
- this.properties.add ( prop );
- }
-
- var proplst = dtype.get_property_list ( );
- foreach ( Property p in proplst ) {
- if ( p.is_private )
- continue ;
-
- if ( p.is_override ) {
- if ( this.is_overwritten_property ( p ) )
- continue ;
- }
-
- this.properties.add ( p );
- }
-
- var mlst = dtype.get_method_list ( );
- foreach ( Method m in mlst ) {
- if ( m.is_private )
- continue ;
-
- if ( m.is_virtual || m.is_override || m.is_abstract ) {
- Method m2 = get_new_method ( m );
- if ( m2 != null )
- m2.base_method = m;
- continue ;
- }
-
- this.methods.add ( m );
- }
- }
-
- private Method? get_new_method ( Method overwritten_method ) {
- foreach ( Method m in this.methods ) {
- if ( !m.is_override )
- continue ;
-
- if ( m.name == overwritten_method.name )
- return m;
- }
- return null;
- }
-
- private void inheritance_interface ( Interface dtype ) {
- /*if ( dtype.derived_from_interface ( dtype ) )
- return ; */
-
- var plst = dtype.get_property_list ( );
- foreach ( Property p in plst ) {
- if ( p.is_private )
- continue ;
-
- if ( p.is_abstract )
- continue ;
-
- this.properties.add ( p );
- }
-
- var mlst = dtype.get_method_list ( );
- foreach ( Method m in mlst ) {
- if ( m.is_private )
- continue ;
-
- if ( m.is_abstract )
- continue ;
-
- this.methods.add ( m );
- }
-
- var slst = dtype.get_signal_list ( );
- foreach ( Signal sig in slst ) {
- if ( sig.is_private )
- continue ;
-
- this.signals.add ( sig );
- }
- }
-
- // internal
- public void inheritance ( ) {
- if ( inherited == true )
- return ;
-
- inherited = true;
- foreach ( DataType dtype in this.parent_types ) {
- if ( dtype is Class )
- this.inheritance_class ( (Class)dtype );
- else if ( dtype is Interface )
- this.inheritance_interface ( (Interface)dtype );
- }
-
- foreach ( Class cl in this.classes ) {
- cl.inheritance( );
- }
- }
-}
-
-
-
-public class Valadoc.ErrorDomain : DataType, MethodHandler, Visitable {
- public ErrorDomain ( Valadoc.Settings settings,
- Vala.ErrorDomain verrdom,
- ErrorDomoainHandler parent,
- Tree head ) {
- this.settings = settings;
- this.verrdom = verrdom;
- this.parent = parent;
- this.head = head;
- }
-
- public string? get_cname () {
- return this.verrdom.get_cname();
- }
-
- private Gee.ArrayList<ErrorCode> errcodes = new Gee.ArrayList<ErrorCode> ();
-
- protected Vala.ErrorDomain verrdom {
- private get;
- set;
- }
-
- protected Gee.ArrayList<Method> methods {
- protected set;
- get;
- }
-
- // internal
- public bool is_verrordomain ( Vala.ErrorDomain ver ) {
- return ( this.verrdom == ver );
- }
-
- //inline
- private inline Basic? search_error_code ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( ErrorCode errcode in this.errcodes ) {
- if ( errcode.name == params[pos] )
- return errcode;
- }
- return null;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( this.name != params[pos] )
- return null;
-
- if ( params[pos+1] == null )
- return this;
-
- var element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_error_code ( params, pos );
- if ( element != null )
- return element;
-
- return null;
- }
-
- // internal
- public void parse_comments ( Valadoc.Parser docparser ) {
- // CommentContext.ENUM
- this.parse_comment_helper ( docparser, CommentContext.ERRORDOMAIN );
- this.parse_method_comments ( docparser );
-
- foreach ( ErrorCode errcode in this.errcodes ) {
- errcode.parse_comment ( docparser );
- }
- }
-
- public void visit_error_codes ( Doclet doclet ) {
- foreach ( ErrorCode errcode in this.errcodes )
- errcode.visit ( doclet );
- }
-
- public Gee.ReadOnlyCollection<ErrorCode> get_error_code_list ( ) {
- return new Gee.ReadOnlyCollection<ErrorCode> ( this.errcodes );
- }
-
- public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_error_domain ( this );
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_error_domain ( this, ptr );
- }
-
- private inline void append_error_code ( Gee.Collection<Vala.ErrorCode> verrcodes ) {
- foreach ( Vala.ErrorCode verrcode in verrcodes ) {
- var tmp = new ErrorCode ( this.settings, verrcode, this, this.head );
- tmp.initialisation ( );
- this.errcodes.add ( tmp );
- }
- }
-
- // internal
- public override void set_type_references ( ) {
- this.set_method_type_references ( );
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.verrdom;
-
- Gee.Collection<Vala.Method> vmethods = this.verrdom.get_methods ();
- this.methods = new Gee.ArrayList<Method> ();
- this.add_methods ( vmethods );
-
- Gee.Collection<Vala.ErrorCode> verrcodes = this.verrdom.get_codes ();
- this.append_error_code ( verrcodes );
- }
-}
-
-
-
-public class Valadoc.Enum : DataType, MethodHandler, Visitable {
- public Enum ( Valadoc.Settings settings,
- Vala.Enum venum,
- EnumHandler parent,
- Tree head ) {
- this.settings = settings;
- this.venum = venum;
- this.parent = parent;
- this.head = head;
- }
-
- public string? get_cname () {
- return this.venum.get_cname();
- }
-
- private inline Basic? search_enum_value ( string[] params, int pos ) {
- pos++;
-
- if ( params[pos+1] != null )
- return null;
-
- foreach ( EnumValue enval in this.en_values ) {
- if ( enval.name == params[pos] )
- return enval;
- }
- return null;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( this.name != params[pos] )
- return null;
-
- if ( params[pos+1] == null )
- return this;
-
-
- var element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_enum_value ( params, pos );
- if ( element != null )
- return element;
-
- return null;
- }
-
- // internal
- public override void set_type_references ( ) {
- this.set_method_type_references ( );
- }
-
- construct {
- this.en_values = new Gee.ArrayList<EnumValue> ();
- this.methods = new Gee.ArrayList<Method> ();
- }
-
- protected Gee.ArrayList<Method> methods {
- protected set;
- get;
- }
-
- protected Gee.ArrayList<EnumValue> en_values {
- get;
- set;
- }
-
- public Gee.ReadOnlyCollection<EnumValue> get_enum_values () {
- return new Gee.ReadOnlyCollection<EnumValue>( this.en_values );
- }
-
- // internal
- public void parse_comments ( Valadoc.Parser docparser ) {
- // CommentContext.ENUM
- this.parse_comment_helper ( docparser, CommentContext.ENUM );
-
- foreach ( EnumValue enval in this.en_values ) {
- enval.parse_comment ( docparser );
- }
-
- this.parse_method_comments ( docparser );
- }
-
- private inline void add_enum_values ( Gee.Collection<Vala.EnumValue> venvals ) {
- foreach ( Vala.EnumValue venval in venvals ) {
- var tmp = new EnumValue ( this.settings, venval, this, this.head );
- tmp.initialisation ( );
- this.en_values.add ( tmp );
- }
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.venum;
-
- Gee.Collection<Vala.Method> vmethods = this.venum.get_methods ();
- this.add_methods ( vmethods );
-
- Gee.Collection<Vala.EnumValue> venvals = this.venum.get_values ();
- this.add_enum_values ( venvals );
- }
-
- public void visit_enum_values ( Doclet doclet ) {
- foreach ( EnumValue enval in this.en_values )
- enval.visit ( doclet );
- }
-
- public override void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_enum ( this );
- }
-
- public Vala.Enum venum {
- construct set;
- private get;
- }
-
- // internal
- public bool is_venum ( Vala.Enum ven ) {
- return ( this.venum == ven );
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_enum ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.Struct : ContainerDataType, Visitable, ConstructionMethodHandler, FieldHandler, ConstantHandler {
- public Struct ( Valadoc.Settings settings, Vala.Struct vstruct, StructHandler parent, Tree head, uint bracket_level ) {
- this.settings = settings;
- this.vstruct = vstruct;
- this.parent = parent;
- this.head = head;
- this.bracket_level = bracket_level;
- }
-
- public string? get_cname () {
- return this.vstruct.get_cname();
- }
-
- protected Gee.ArrayList<Field> fields {
- set;
- get;
- }
-
- protected Gee.ArrayList<Method> construction_methods {
- set;
- get;
- }
-
- protected Gee.ArrayList<Constant> constants {
- set;
- get;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( this.name != params[pos] )
- return null;
-
- if ( params[pos+1] == null )
- return this;
-
- var element = this.search_field ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_constant ( params, pos );
- if ( element != null )
- return element;
-
- return this.search_construction_method ( params, pos );
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vstruct;
-
- var vtparams = this.vstruct.get_type_parameters ();
- this.set_template_parameter_list ( vtparams );
-
- Gee.Collection<Vala.Field> vfields = this.vstruct.get_fields();
- this.fields = new Gee.ArrayList<Field> ();
- this.add_fields ( vfields );
-
- Gee.Collection<Vala.Constant> vconstants = this.vstruct.get_constants();
- this.constants = new Gee.ArrayList<Constant> ();
- this.add_constants ( vconstants );
-
- Gee.Collection<Vala.Method> vmethods = this.vstruct.get_methods ();
- this.construction_methods = new Gee.ArrayList<Method>();
- this.add_methods_and_construction_methods ( vmethods );
- }
-
- public string?# comment_str {
- get {
- return this.vstruct.source_reference.comment;
- }
- }
-
- public Vala.Struct vstruct {
- construct set;
- private get;
- }
-
- // internal
- public bool is_vstruct ( Vala.Struct vstru ) {
- return ( this.vstruct == vstru );
- }
-
- public override void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_struct ( this );
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_struct ( this, ptr );
- }
-
- // internal
- public override void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.STRUCT );
- this.parse_construction_method_comments ( docparser );
- this.parse_constant_comments ( docparser );
- this.parse_field_comments ( docparser );
- base.parse_comments ( docparser );
- }
-
- // internal
- public override void set_type_references ( ) {
- this.set_construction_method_references ( );
- this.set_constant_type_references ( );
- this.set_field_type_references ( );
- base.set_type_references ( );
-
- var lst = this.vstruct.get_base_types ();
- this.set_parent_references ( lst );
- }
-}
-
-
-
-public class Valadoc.Interface : ContainerDataType, Visitable, SignalHandler, PropertyHandler, FieldHandler,
- DelegateHandler, EnumHandler, StructHandler, ClassHandler {
- public Interface ( Valadoc.Settings settings, Vala.Interface vinterface, InterfaceHandler parent, Tree head ) {
- this.settings = settings;
- this.vinterface = vinterface;
- this.parent = parent;
- this.head = head;
- }
-
- public string? get_cname () {
- return this.vinterface.get_cname();
- }
-
- protected Gee.ArrayList<Property> properties {
- get;
- set;
- }
-
- protected Gee.ArrayList<Field> fields {
- get;
- set;
- }
-
- protected Gee.ArrayList<Signal> signals {
- get;
- set;
- }
-
- protected Gee.ArrayList<Enum> enums {
- get;
- set;
- }
-
- protected Gee.ArrayList<Delegate> delegates {
- get;
- set;
- }
-
- protected Gee.ArrayList<Struct> structs {
- get;
- set;
- }
-
- protected Gee.ArrayList<Class> classes {
- get;
- set;
- }
-
- public Vala.Interface vinterface {
- construct set;
- protected get;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( !(this.name == params[pos] || params[0] == "this") )
- return null;
-
- if ( params[pos+1] == null )
- return this;
-
- var element = this.search_field ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_signal ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_property ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_delegate ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_struct ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_enum ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_class ( params, pos );
- if ( element != null )
- return element;
-
- return null;
- }
-
- // internal
- public void initialisation ( ) {
- this.vsymbol = this.vinterface;
-
- var vtparams = this.vinterface.get_type_parameters ();
- this.set_template_parameter_list ( vtparams );
-
- Gee.Collection<Vala.Method> methods = this.vinterface.get_methods ();
- this.methods = new Gee.ArrayList<Method>();
- this.add_methods ( methods );
-
- Gee.Collection<Vala.Delegate> delegates = this.vinterface.get_delegates ();
- this.delegates = new Gee.ArrayList<Delegate>();
- this.add_delegates ( delegates );
-
- Gee.Collection<Vala.Signal> signals = this.vinterface.get_signals();
- this.signals = new Gee.ArrayList<Signal>();
- this.add_signals ( signals );
-
- Gee.Collection<Vala.Property> properties = this.vinterface.get_properties();
- this.properties = new Gee.ArrayList<Property>();
- this.add_properties ( properties );
-
- Gee.Collection<Vala.Field> fields = this.vinterface.get_fields();
- this.fields = new Gee.ArrayList<Field>();
- this.add_fields ( fields );
-
- Gee.Collection<Vala.Struct> structs = this.vinterface.get_structs();
- this.structs = new Gee.ArrayList<Struct>();
- this.add_structs ( structs );
-
- Gee.Collection<Vala.Class> classes = this.vinterface.get_classes();
- this.classes = new Gee.ArrayList<Class>();
- this.add_classes ( classes );
-
- Gee.Collection<Vala.Enum> enums = this.vinterface.get_enums();
- this.enums = new Gee.ArrayList<Enum>();
- this.add_enums ( enums );
- }
-
- public bool is_static {
- get {
- return this.vinterface.is_static;
- }
- }
-
- public string?# comment_str {
- get {
- return this.vinterface.source_reference.comment;
- }
- }
-
- // internal
- public bool is_vinterface ( Vala.Interface viface ) {
- return ( this.vinterface == viface );
- }
-
- public override void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
- doclet.visit_interface ( this );
- }
-
- public override void write ( Langlet langlet, void* ptr ) {
- langlet.write_interface ( this, ptr );
- }
-
- // internal
- public override void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_comment_helper ( docparser, CommentContext.INTERFACE );
- this.parse_delegate_comments ( docparser );
- this.parse_property_comments ( docparser );
- this.parse_signal_comments ( docparser );
- this.parse_struct_comments ( docparser );
- this.parse_field_comments ( docparser );
- this.parse_class_comments ( docparser );
- this.parse_enum_comments ( docparser );
- base.parse_comments ( docparser );
- }
-
- // internal
- public override void set_type_references ( ) {
- base.set_type_references ( );
-
- this.set_delegate_type_references ();
- this.set_property_type_reference ();
- this.set_signal_type_references ();
- this.set_struct_type_references ();
- this.set_field_type_references ();
- this.set_enum_type_references ();
- this.set_class_type_references ();
-
- var lst = this.vinterface.get_prerequisites ( );
- this.set_parent_references ( lst );
- }
-}
-
-
-
-
-public class Valadoc.Namespace : Basic, MethodHandler, FieldHandler, NamespaceHandler, ErrorDomoainHandler,
- EnumHandler, ClassHandler, StructHandler, Writeable, InterfaceHandler,
- DelegateHandler, ConstantHandler
-{
- protected Gee.ArrayList<Constant> constants {
- protected set;
- get;
- }
-
- protected Gee.ArrayList<Enum> enums {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Interface> interfaces {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Delegate> delegates {
- private set;
- get;
- }
-
- protected Gee.ArrayList<ErrorDomain> errdoms {
- private set;
- get;
- }
-
- public void initialisation( ) {
- this.namespaces = new Gee.ArrayList<Namespace> ();
- this.structs = new Gee.ArrayList<Struct>();
- this.classes = new Gee.ArrayList<Class>();
- this.bracket_level = 0;
-
- this.constants = new Gee.ArrayList<Constant> ();
- this.interfaces = new Gee.ArrayList<Interface>();
- this.methods = new Gee.ArrayList<Method> ();
- this.delegates = new Gee.ArrayList<Delegate>();
- this.errdoms = new Gee.ArrayList<ErrorDomain>();
- this.enums = new Gee.ArrayList<Enum>();
- this.fields = new Gee.ArrayList<Field> ();
-
- /*
- Gee.Collection<Vala.Delegate> vdelegates = this.vnspace.get_delegates ();
- this.delegates = new Gee.ArrayList<Delegate>();
- this.add_delegates ( vdelegates );
-
- Gee.Collection<Vala.ErrorDomain> verrdoms = this.vnspace.get_error_types ();
- this.errdoms = new Gee.ArrayList<ErrorDomain>();
- this.add_error_domains ( verrdoms );
-
- Gee.Collection<Vala.Enum> venums = this.vnspace.get_enums ();
- this.enums = new Gee.ArrayList<Enum>();
- this.add_enums ( venums );
-
- Gee.Collection<Vala.Field> vfields = this.vnspace.get_fields ();
- this.fields = new Gee.ArrayList<Field> ();
- this.add_fields ( vfields );
-
- Gee.Collection<Vala.Method> vmethods = this.vnspace.get_methods ();
- this.methods = new Gee.ArrayList<Method> ();
- this.add_methods ( vmethods );
-
- Gee.Collection<Vala.Interface> vifaces = this.vnspace.get_interfaces ();
- this.interfaces = new Gee.ArrayList<Interface>();
- this.add_interfaces ( vifaces );
- */
- }
-
- public Gee.ArrayList<Namespace> namespaces {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Class> classes {
- private set;
- get;
- }
-
- protected Gee.ArrayList<Struct> structs {
- private set;
- get;
- }
-
- private inline Basic? search_namespace ( string[] params, int pos ) {
- foreach ( Namespace ns in this.namespaces ) {
- Basic element = ns.search_element ( params, pos+1 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- if ( this.name != params[pos] )
- return null;
-
- if ( params[pos+1] == null )
- return this;
-
-
- Basic element = this.search_namespace ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_class ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_interface ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_struct ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_enum ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_error_domain ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_method ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_field ( params, pos );
- if ( element != null )
- return element;
-
- element = this.search_delegate ( params, pos );
- if ( element != null )
- return element;
-
- element = search_constant ( params, pos );
- if ( element != null )
- return element;
-
- return null;
- }
-
- public uint bracket_level {
- construct set;
- get;
- }
-
- protected Gee.ArrayList<Field> fields {
- set;
- get;
- }
-
- protected Gee.ArrayList<Method> methods {
- set;
- get;
- }
-
- // internal, remove
- public Struct? find_struct ( Vala.Struct vstruct ) {
- foreach ( Struct stru in this.structs ) {
- if ( stru.is_vstruct( vstruct ) )
- return stru;
- }
-
- return null;
- }
-
- // internal, remove
- public Class? find_class ( Vala.Class vclass ) {
- foreach ( Class cl in this.classes ) {
- if ( cl.is_vclass( vclass ) )
- return cl;
- }
-
- return null;
- }
-
- public Namespace ( Valadoc.Settings settings,
- Vala.Namespace vnspace,
- NamespaceHandler parent,
- Tree head ) {
- this.settings = settings;
- this.vnspace = vnspace;
- this.parent = parent;
- this.head = head;
- }
-
- public void visit ( Doclet doclet ) {
- doclet.visit_namespace ( this );
- }
-
- public Vala.Namespace vnspace {
- construct set;
- private get;
- }
-
- public override string?# name {
- get {
- return this.vnspace.name;
- }
- }
-
- /*/ internal
- public void append_interface ( Vala.Interface viface ) {
- var tmp = new Interface ( this.settings, viface, this, this.head );
- tmp.initialisation ( );
- this.interfaces.add ( tmp );
- } */
-
- /*/ internal
- private Valadoc.Class create_subclasses ( Vala.Class vcl, Basic parent,
- Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Class> > sub_classes,
- Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Struct> > sub_structs,
- uint rank )
- {
- var cl = new Class ( this.settings, vcl, (ClassHandler)parent, this.head, rank++ );
- cl.initialisation( );
-
- foreach ( Vala.Struct vsubstruct in sub_structs.get( vcl ) ) {
- var substru = new Struct ( this.settings, vsubstruct, cl, this.head, rank );
- substru.initialisation( );
- cl.append_struct ( substru );
- }
-
- foreach ( Vala.Class vsubcl in sub_classes.get ( vcl ) ) {
- var subcl = this.create_subclasses ( vsubcl, cl,sub_classes, sub_structs, rank );
- cl.append_class ( subcl );
- }
- return cl;
- }
-*/
-/*
- // internal
- public void append_global_class ( Vala.Class vclass,
- Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Class> > vsubclasses,
- Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Class> > vsubstructs )
- {
- var tmp = this.create_subclasses ( vclass, this, vsubclasses, vsubstructs, 0 );
- this.append_class ( tmp );
- }
-
- // internal
- public void append_global_struct ( Vala.Struct vstruct ) {
- var tmp = new Struct ( this.settings, vstruct, this, this.head, 0 );
- tmp.initialisation ( );
- this.append_struct ( tmp );
- }
-*/
- /*/ internal
- public void append_enum ( Vala.Enum venum ) {
- var tmp = new Enum ( this.settings, venum, this, this.head );
- tmp.initialisation ( );
- this.enums.add( tmp );
- }*/
-
- /*/ internal
- public void append_error_domain ( Vala.ErrorDomain verrdom ) {
- var tmp = new ErrorDomain ( this.settings, verrdom, this, this.head );
- tmp.initialisation ( );
- this.errdoms.add ( tmp );
- } */
-
- /*/ internal
- public void append_global_method ( Vala.Method vm ) {
- var tmp = new Method ( this.settings, vm, this, this.head, 0 );
- tmp.initialisation ( );
- this.methods.add ( tmp );
- }*/
-
- /*/ internal
- public void append_global_field ( Vala.Field vf ) {
- var tmp = new Field ( this.settings, vf, this, this.head, 0 );
- tmp.initialisation ( );
- this.fields.add( tmp );
- }
-*/
- /*/ internal
- public void append_delegate ( Vala.Delegate vdel ) {
- var tmp = new Delegate ( this.settings, vdel, this, this.head, 0 );
- tmp.initialisation ( );
- this.delegates.add ( tmp );
- } */
-
- // interface
- public void set_type_references ( ) {
- this.set_errordomain_type_referenes ( );
- this.set_namespace_type_references ( );
- this.set_interface_type_references ( );
- this.set_delegate_type_references ( );
- this.set_constant_type_references ( );
- this.set_method_type_references ( );
- this.set_field_type_references ( );
- this.set_struct_type_references ( );
- this.set_class_type_references ( );
- }
-
- // internal
- public void inheritance ( ) {
- this.namespace_inheritance ( );
-
- foreach ( Class cl in this.classes ) {
- cl.inheritance ( );
- }
- }
-
- // internal
- public void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_enum_comments ( docparser );
- this.parse_field_comments ( docparser );
- this.parse_class_comments ( docparser );
- this.parse_method_comments ( docparser );
- this.parse_struct_comments ( docparser );
- this.parse_constant_comments ( docparser );
- this.parse_delegate_comments ( docparser );
- this.parse_interface_comments ( docparser );
- this.parse_namespace_comments ( docparser );
- this.parse_errordomain_comments ( docparser );
- }
-
- // internal
- public bool is_vnspace ( Vala.Namespace vns ) {
- return ( this.vnspace == vns );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_namespace ( this, ptr );
- }
-}
-
-
-// rename to package
-public class Valadoc.File : Basic, NamespaceHandler {
- public Gee.ArrayList<Namespace> namespaces {
- default = new Gee.ArrayList<Namespace>();
- private set;
- private get;
- }
-
- public File ( Valadoc.Settings settings, Vala.SourceFile vfile, Tree head ) {
- this.settings = settings;
- this.vfile = vfile;
- this.head = head;
- }
-
- public override string?# name {
- get {
- return this.vfile.filename;
- }
- }
-
- public Vala.SourceFile vfile {
- construct set;
- private get;
- }
-
- // internal
- public override Basic? search_element ( string[] params, int pos ) {
- foreach ( Namespace ns in this.namespaces ) {
- Basic element = ns.search_element( params, pos );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- // internal
- public bool is_file ( Vala.SourceFile vfile ) {
- return ( vfile == this.vfile );
- }
-
- public void visit ( Doclet doclet ) {
- if ( !settings.to_doc ( this.name ) )
- return ;
-
- doclet.visit_file ( this );
- }
-
- /*/ internal
- public void append_interface ( Vala.Interface viface ) {
- var ns = this.get_namespace ( viface );
- ns.append_interface ( viface );
- }
- */
-/*
- // internal
- public void append_class ( Vala.Class vclass,
- Gee.HashMap< Gee.Collection<Vala.Class> > vsubclasses,
- Gee.HashMap< Gee.Collection<Vala.Struct> > vsubstructs ) {
- var ns = this.get_namespace ( vclass );
- ns.append_global_class ( vclass, vsubclasses, vsubstructs );
- }
-
- // internal
- public void append_struct ( Vala.Struct vstruct ) {
- var ns = this.get_namespace ( vstruct );
- ns.append_global_struct ( vstruct );
- }
-
- // internal
- public void append_enum ( Vala.Enum venum ) {
- var ns = this.get_namespace ( venum );
- ns.append_enum ( venum );
- }*/
-
- /*/ internal
- public void append_error_domain ( Vala.ErrorDomain verrdom ) {
- var ns = this.get_namespace ( verrdom );
- ns.append_error_domain ( verrdom );
- } */
-
- /*/ internal
- public void append_global_method ( Vala.Method vm ){
- var ns = this.get_namespace ( vm );
- ns.append_global_method ( vm );
- } */
-
-
- /*/ internal
- public void append_global_field ( Vala.Field vf ) {
- var ns = this.get_namespace ( vf );
- ns.append_global_field( vf );
- }*/
-
- /* internal
- public void append_delegate ( Vala.Delegate vdel ) {
- var ns = this.get_namespace ( vdel );
- ns.append_delegate ( vdel );
- } */
-
- // internal
- public void inheritance ( ) {
- this.namespace_inheritance ( );
- }
-
- // internal
- public void parse_comments ( Valadoc.Parser docparser ) {
- this.parse_namespace_comments ( docparser );
- }
-
- // internal
- public void set_type_references ( ) {
- this.set_namespace_type_references ( );
- }
-
- public void write ( Langlet langlet, void* ptr ) {
- langlet.write_file ( this, ptr );
- }
-}
-
-
-
-public class Valadoc.Tree : Vala.CodeVisitor {
- private Gee.ArrayList<File> files = new Gee.ArrayList<File>();
-
- // remove
- private uint level = 0;
-
- // remove
- private Vala.TypeSymbol current_type = null;
-
- // remove
- private Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Class> > sub_classes
- = new Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Class> > ();
-
- // remove
- private Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Struct> > sub_structs
- = new Gee.HashMap<Vala.Class, Gee.ArrayList<Vala.Struct> > ();
-
-
- public Valadoc.Settings settings {
- construct set;
- private get;
- }
-
- public Tree (Valadoc.Settings settings, Vala.CodeContext context ) {
- this.settings = settings;
- this.context = context;
- }
-
- public CodeContext context {
- construct set;
- private get;
- }
-
- public void visit ( Doclet doclet ) {
- foreach ( File file in this.files ) {
- file.visit ( doclet );
- }
- }
-
- private Basic? search_symbol_in_namespace ( Basic element, string[] params ) {
- return this.search_symbol_in_symbol ( element.nspace, params );
- }
-
- private Basic? search_symbol_in_type ( Basic element, string[] params, int params_offset = 0 ) {
- if ( !( element.parent is ContainerDataType || element.parent is Enum || element.parent is ErrorDomain ) )
- return null;
-
- if ( params[0] != "this" ) {
- string[] nparams = new string[ params.length+1 ];
- nparams[0] = "this";
- for ( int i = 0; params.length > i ; i++ ) {
- nparams [i+1] = params[i];
- }
- return this.search_symbol_in_symbol ( element.parent, nparams, 0 );
- }
-
- return this.search_symbol_in_symbol ( element.parent, params, 0 );
- }
-
- private Basic? search_symbol_in_symbol ( Basic element, string[] params, int params_offset = 0 ) {
- if ( element is Class || element is Interface || element is Struct ) {
- return element.search_element ( params, params_offset );
- }
- else if ( element is Enum ) {
- return element.search_element ( params, params_offset );
- }
- else if ( element is ErrorDomain ) {
- return element.search_element ( params, params_offset );
- }
- return null;
- }
-
- private Basic? search_symbol_in_global_namespaces ( Basic? element, string[] params ) {
- int param_size = 0;
- for ( param_size = 0; params[param_size] != null; param_size++ );
-
- string[] global_params = new string [ param_size +1];
-
- global_params[0] = null;
- for ( int i = 0; params[i-1] != null ; i++ ) {
- global_params[i+1] = params[i];
- }
-
- foreach ( File f in this.files ) {
- Basic element = f.search_element ( global_params, 0 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- private Basic? search_symbol_in_namespaces ( Basic element, string[] params ) {
- foreach ( File f in this.files ) {
- Basic element = f.search_element ( params, 0 );
- if ( element != null )
- return element;
- }
- return null;
- }
-
- private Basic? search_element ( Basic? element, string[] params ) {
- if ( element != null ) {
- if ( params[0] == "this" ) {
- return search_symbol_in_type ( element, params, 1 );
- }
-
- var tmp = search_symbol_in_type ( element, params );
- if ( tmp != null )
- return tmp;
- }
-
- var tmp = search_symbol_in_global_namespaces ( element, params );
- if ( tmp != null )
- return tmp;
-
- if ( element != null ) {
- var tmp = this.search_symbol_in_namespaces ( element, params );
- if ( tmp != null )
- return tmp;
- }
- return null;
- }
-
- public Basic? search_symbol_str ( Valadoc.Basic? element, string symname ) {
- string[] params = symname.split( ".", -1 );
- int i = 0; while ( params[i] != null ) i++;
- params.length = i;
-
- return this.search_element ( element, params );
- }
-
- public override void visit_namespace ( Vala.Namespace vns ) {
- vns.accept_children ( this );
- }
-
- public override void visit_class ( Vala.Class vcl ) {
- if ( vcl.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vcl.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vcl );
- ns.add_class ( vcl );
- }
-
- public override void visit_interface ( Vala.Interface viface ) {
- if ( viface.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = viface.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( viface );
- ns.add_interface ( viface );
- }
-
- public override void visit_struct ( Vala.Struct vstru ) {
- if ( vstru.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vstru.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vstru );
- ns.add_struct ( vstru );
- }
-
- public override void visit_field ( Vala.Field vf ) {
- if ( vf.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vf.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vf );
- ns.add_field ( vf );
- }
-
- public override void visit_method ( Vala.Method vm ) {
- if ( vm.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vm.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vm );
- ns.add_method ( vm );
- }
-
- public override void visit_delegate ( Vala.Delegate vd ) {
- if ( vd.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vd.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vd );
- ns.add_delegate ( vd );
- }
-
- public override void visit_enum ( Vala.Enum venum ) {
- if ( venum.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = venum.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( venum );
- ns.add_enum ( venum );
- }
-
- public override void visit_constant ( Vala.Constant vc ) {
- if ( vc.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = vc.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( vc );
- ns.add_constant ( vc );
- }
-
- public override void visit_error_domain ( Vala.ErrorDomain verrdom ) {
- if ( verrdom.parent_symbol is Vala.Namespace == false )
- return ;
-
- Vala.SourceFile vfile = verrdom.source_reference.file;
- File file = this.get_file ( vfile );
- Namespace ns = file.get_namespace ( verrdom );
- ns.add_error_domain ( verrdom );
- }
-
-/*
- public override void visit_field ( Vala.Field vf ) {
- if ( this.level > 0 )
- return ;
-
- Vala.SourceReference vsrcref = vf.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
-
- File file = get_file ( vsrc );
- file.append_global_field ( vf );
- }
-
- public override void visit_method ( Vala.Method vm ) {
- if ( this.level > 0 )
- return ;
-
- Vala.SourceReference vsrcref = vm.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
-
- File file = get_file ( vsrc );
- file.append_global_method ( vm );
- }
-*
- public override void visit_struct ( Vala.Struct vstruct ) {
- this.level++;
-
- if ( this.level == 1 ) {
- Vala.SourceReference vsrcref = vstruct.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
-
- File file = get_file ( vsrc );
- file.append_struct ( vstruct );
- }
- else {
- // is it really a class in our case?
- Gee.ArrayList<Vala.Struct> vstrulist = this.sub_structs.get ( (Vala.Class)this.current_type );
- vstrulist.add ( vstruct );
- }
-
- this.level--;
- }
-
- public override void visit_class ( Vala.Class vcl ) {
- Vala.TypeSymbol parent_type = this.current_type;
- this.current_type = vcl;
- this.level++;
-
- var vcllist = new Gee.ArrayList<Vala.Class> ();
- this.sub_classes.set ( vcl, vcllist );
-
- var vstrulist = new Gee.ArrayList<Vala.Struct> ();
- this.sub_structs.set ( vcl, vstrulist );
-
- vcl.accept_children ( this );
-
- if ( this.level == 1 ) {
- Vala.SourceReference vsrcref = vcl.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
-
- File file = get_file ( vsrc );
- file.append_class ( vcl, this.sub_classes, this.sub_structs );
- this.sub_classes.clear ();
- this.sub_structs.clear ();
- }
- else {
- // Really a class?
- Gee.ArrayList<Vala.Class> vcllist = this.sub_classes.get ( (Vala.Class)parent_type );
- vcllist.add ( vcl );
- }
-
- this.current_type = parent_type;
- this.level--;
- }
-*/
-/*
- public override void visit_delegate ( Vala.Delegate vdel ) {
- Vala.SourceReference vsrcref = vdel.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
-
- File file = get_file ( vsrc );
- file.append_delegate ( vdel );
- }
-
- public override void visit_error_domain ( Vala.ErrorDomain verrdom ) {
- Vala.SourceReference vsrcref = verrdom.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
- File file = get_file ( vsrc );
-
- file.append_error_domain ( verrdom );
- }
-
- public override void visit_enum ( Vala.Enum ven ) {
- Vala.SourceReference vsrcref = ven.source_reference;
- Vala.SourceFile vsrc = vsrcref.file;
- File file = get_file ( vsrc );
-
- file.append_enum ( ven );
- }
-*/
-
- public void create_tree ( ) {
- this.context.accept( this );
- this.set_type_references ( );
- this.inheritance ( ); // remove
- }
-
- // internal
- public File? find_file ( Vala.SourceFile vfile ) {
- foreach ( File f in this.files ) {
- if ( f.is_file( vfile ) )
- return f;
- }
- return null;
- }
-
- private void set_type_references ( ) {
- foreach ( File f in this.files ) {
- f.set_type_references( );
- }
- }
-
- private void inheritance ( ) {
- foreach ( File f in this.files ) {
- f.inheritance( );
- }
- }
-
- public void parse_comments ( Valadoc.Parser docparser ) {
- foreach ( File f in this.files ) {
- f.parse_comments( docparser );
- }
- }
-
- // internal
- public File get_file ( Vala.SourceFile vfile ) {
- File file = this.find_file( vfile );
- if ( file != null )
- return file;
-
- var tmp = new File ( this.settings,vfile, this );
- this.files.add ( tmp );
- return tmp;
- }
-}
-
-
}
}
- private bool check_image_path ( int startpos, GLib.StringBuilder buf ) {
- //this.error ( "invalid image path", startpos-this.pos );
- return true;
- }
-
private ImageDocElementPosition parse_image_position () {
int separatorpos = this.pos;
imgpos = parse_image_position ();
if ( str[pos+1] == '}' ) {
- bool tmp = check_image_path ( startpos+2, buf );
- if ( tmp == true ) {
- ImageDocElement img = (ImageDocElement)GLib.Object.new ( this.modules.imgtag );
- img.parse ( this.settings, tree, me, buf.str, imgpos );
- elements.add ( img );
+ ImageDocElement img = (ImageDocElement)GLib.Object.new ( this.modules.imgtag );
+ bool tmp = img.parse ( this.settings, tree, me, buf.str, imgpos );
+ if ( tmp == false ) {
+ this.error ( "image not found.", startpos-this.pos );
}
+ elements.add ( img );
pos++;
return ;
}
}
if ( this.str[this.pos+1] == ']' ) {
- bool tmp = check_image_path ( startpos, buf );
+ bool tmp = check_link_path ( startpos, buf );
if ( tmp == true && linkstat == true ) {
LinkDocElement linktag = (LinkDocElement)GLib.Object.new ( this.modules.linktag );
linktag.parse ( this.settings, tree, me, buf.str, txt );
if ( pluginpath == null ) {
- pluginpath = Config.plugin_dir + "/template/";
+ pluginpath = Config.plugin_dir + "/html/";
}
else {
if ( !pluginpath.has_suffix ( "/" ) )
+++ /dev/null
-/* mysql.vala
- *
- * Copyright (C) 2008 Jukka-Pekka Iivonen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Jukka-Pekka Iivonen <jp0409@jippii.fi>
- */
-
-[CCode (lower_case_cprefix = "mysql_", cheader_filename = "mysql/mysql.h")]
-namespace Mysql {
- /* Database Connection Handle */
- [Compact]
- [CCode (free_function = "mysql_close", cname = "MYSQL", cprefix = "mysql_")]
- public class Database {
- [CCode (argument0 = "NULL", cname = "mysql_init")]
- public void init ();
-
- public ulong affected_rows ();
- public bool autocommit (bool mode);
- public bool change_user (string username, string passwd, string dbname);
- public weak string character_set_name ();
- public bool commit ();
- public int dump_debug_info ();
- public uint errno ();
- public weak string error ();
- public weak string get_host_info ();
- public uint get_proto_info ();
- public weak string get_server_info ();
- public ulong get_server_version ();
- public weak string get_ssl_cipher ();
- public weak string info ();
- public ulong insert_id ();
- public int kill (ulong pid);
- public Result list_dbs (string wild);
- public Result list_fields (string table, string wild);
- public Result list_processes ();
- public Result list_tables (string wild);
- public bool more_results ();
- public int next_result ();
- public int options (int option, string arg);
- public int ping ();
- public int query (string stmt_str);
- public bool real_connect (string host, string username, string passwd, string dbname, uint port, string? unix_socket, ulong client_flag);
- public ulong real_escape_string (string to, string from, ulong length);
- public int real_query (string query, ulong len);
- public int reload ();
- public bool rollback ();
- public int select_db (string dbname);
- public int set_character_set (string csname);
- public void set_local_infile_default ();
- public int set_server_option (int option);
- public weak string sqlstate ();
- public int shutdown (int shutdown_level);
- public bool ssl_set (string key, string cert, string ca, string capath, string cipher);
- public weak string stat ();
- public Result? store_result ();
- public ulong thread_id ();
- public Result use_result ();
- public uint warning_count ();
- }
- [Compact]
- [CCode (free_function = "mysql_free_result", cname = "MYSQL_RES", cprefix = "mysql_")]
- public class Result {
- public bool eof ();
- public Field fetch_field ();
- public Field fetch_field_direct (uint field_nbr);
- public Field[] fetch_fields ();
- public ulong[] fetch_lengths ();
- [CCode(array_length=false)]
- [NoArrayLength]
- public weak string[]? fetch_row ();
- public uint fetch_count ();
- public uint num_fields ();
- public uint num_rows ();
-
- public bool data_seek (ulong offset);
- }
- [CCode (cname = "MYSQL_FIELD")]
- public struct Field {
- }
-
- public weak string get_client_info ();
- public ulong get_client_version ();
- public void debug (string msg);
- public ulong hex_string (string to, string from, ulong length);
- public void library_end ();
- public int library_init (int argc, string[] argv, string[] groups);
- public void server_end ();
- public int server_init (int argc, string[] argv, string[] groups);
- public void thread_end ();
- public bool thread_init ();
- public uint thread_safe ();
-}
-