valadoc r27 - in trunk: . src/doclets/devhelp/doclet src/doclets/devhelp/linkhelper src/doclets/devhelp/taglets/bold src/doclets/devhelp/taglets/cell src/doclets/devhelp/taglets/center src/doclets/devhelp/taglets/image src/doclets/devhelp/taglets/italic src/doclets/devhelp/taglets/link src/doclets/devhelp/taglets/list src/doclets/devhelp/taglets/listelement src/doclets/devhelp/taglets/notification src/doclets/devhelp/taglets/parameter src/doclets/devhelp/taglets/return src/doclets/devhelp/taglets/right src/doclets/devhelp/taglets/see src/doclets/devhelp/taglets/source src/doclets/devhelp/taglets/string src/doclets/devhelp/taglets/table src/doclets/devhelp/taglets/throws src/doclets/devhelp/taglets/underline src/doclets/devhelp/taglets/version src/doclets/devhelp/taglets/wikilink src/doclets/html/doclet src/doclets/html/linkhelper src/doclets/html/taglets/bold src/doclets/html/taglets/cell src/doclets/html/taglets/center src/doclets/html/taglets/image src/doclets/html /taglets/italic src/doclets/html/taglets/link src/doclets/html/taglets/list src/doclets/html/taglets/listelement src/doclets/html/taglets/notification src/doclets/html/taglets/parameter src/doclets/html/taglets/return src/doclets/html/taglets/right src/doclets/html/taglets/see src/doclets/html/taglets/source src/doclets/html/taglets/string src/doclets/html/taglets/table src/doclets/html/taglets/throws src/doclets/html/taglets/underline src/doclets/html/taglets/version src/doclets/html/taglets/wikilink src/doclets/htmlhelpers src/doclets/valadoc.org src/doclets/valadoc.org/doclet src/doclets/valadoc.org/linkhelper src/doclets/valadoc.org/taglets src/libvaladoc src/valadoc src/vapi



Author: flobrosch
Date: Wed Jan 14 00:57:23 2009
New Revision: 27
URL: http://svn.gnome.org/viewvc/valadoc?rev=27&view=rev

Log:

 - new mysql-based valadoc.org doclet (--enable-valadocorg)
 - trivial cleanups
 - vala-0.5.5-emigration
 - delegate exception lists




Added:
   trunk/src/doclets/valadoc.org/taglets/
   trunk/src/vapi/mysql.vapi
Removed:
   trunk/src/doclets/valadoc.org/linkhelper/
Modified:
   trunk/configure.in
   trunk/src/doclets/devhelp/doclet/Makefile.am
   trunk/src/doclets/devhelp/doclet/template.vala
   trunk/src/doclets/devhelp/linkhelper/Makefile.am
   trunk/src/doclets/devhelp/linkhelper/helper.vala
   trunk/src/doclets/devhelp/taglets/bold/Makefile.am
   trunk/src/doclets/devhelp/taglets/cell/Makefile.am
   trunk/src/doclets/devhelp/taglets/center/Makefile.am
   trunk/src/doclets/devhelp/taglets/image/Makefile.am
   trunk/src/doclets/devhelp/taglets/italic/Makefile.am
   trunk/src/doclets/devhelp/taglets/link/Makefile.am
   trunk/src/doclets/devhelp/taglets/list/Makefile.am
   trunk/src/doclets/devhelp/taglets/listelement/Makefile.am
   trunk/src/doclets/devhelp/taglets/notification/Makefile.am
   trunk/src/doclets/devhelp/taglets/parameter/Makefile.am
   trunk/src/doclets/devhelp/taglets/return/Makefile.am
   trunk/src/doclets/devhelp/taglets/right/Makefile.am
   trunk/src/doclets/devhelp/taglets/see/Makefile.am
   trunk/src/doclets/devhelp/taglets/see/taglet.vala
   trunk/src/doclets/devhelp/taglets/source/Makefile.am
   trunk/src/doclets/devhelp/taglets/string/Makefile.am
   trunk/src/doclets/devhelp/taglets/table/Makefile.am
   trunk/src/doclets/devhelp/taglets/throws/Makefile.am
   trunk/src/doclets/devhelp/taglets/underline/Makefile.am
   trunk/src/doclets/devhelp/taglets/version/Makefile.am
   trunk/src/doclets/devhelp/taglets/wikilink/Makefile.am
   trunk/src/doclets/html/doclet/Makefile.am
   trunk/src/doclets/html/doclet/template.vala
   trunk/src/doclets/html/linkhelper/Makefile.am
   trunk/src/doclets/html/linkhelper/helper.vala
   trunk/src/doclets/html/taglets/bold/Makefile.am
   trunk/src/doclets/html/taglets/cell/Makefile.am
   trunk/src/doclets/html/taglets/center/Makefile.am
   trunk/src/doclets/html/taglets/image/Makefile.am
   trunk/src/doclets/html/taglets/italic/Makefile.am
   trunk/src/doclets/html/taglets/link/Makefile.am
   trunk/src/doclets/html/taglets/link/taglet.vala
   trunk/src/doclets/html/taglets/list/Makefile.am
   trunk/src/doclets/html/taglets/listelement/Makefile.am
   trunk/src/doclets/html/taglets/notification/Makefile.am
   trunk/src/doclets/html/taglets/parameter/Makefile.am
   trunk/src/doclets/html/taglets/return/Makefile.am
   trunk/src/doclets/html/taglets/right/Makefile.am
   trunk/src/doclets/html/taglets/see/Makefile.am
   trunk/src/doclets/html/taglets/see/taglet.vala
   trunk/src/doclets/html/taglets/source/Makefile.am
   trunk/src/doclets/html/taglets/string/Makefile.am
   trunk/src/doclets/html/taglets/table/Makefile.am
   trunk/src/doclets/html/taglets/throws/Makefile.am
   trunk/src/doclets/html/taglets/underline/Makefile.am
   trunk/src/doclets/html/taglets/version/Makefile.am
   trunk/src/doclets/html/taglets/wikilink/Makefile.am
   trunk/src/doclets/htmlhelpers/Makefile.am
   trunk/src/doclets/htmlhelpers/htmlhelpers.vala
   trunk/src/doclets/valadoc.org/Makefile.am
   trunk/src/doclets/valadoc.org/doclet/Makefile.am
   trunk/src/doclets/valadoc.org/doclet/template.vala
   trunk/src/libvaladoc/Makefile.am
   trunk/src/libvaladoc/doclet.vala
   trunk/src/libvaladoc/doctree.vala
   trunk/src/libvaladoc/parser.vala
   trunk/src/libvaladoc/settings.vala
   trunk/src/valadoc/Makefile.am
   trunk/src/valadoc/valadoc.vala

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Jan 14 00:57:23 2009
@@ -12,6 +12,22 @@
 AC_PATH_PROG(VALAC, valac, valac)
 AC_SUBST(VALAC)
 
+
+
+AC_ARG_ENABLE(valadocorg, AS_HELP_STRING([--enable-valadocorg], []), enable_valadocorg=$enableval, enable_valadocorg=no)
+AM_CONDITIONAL(ENABLE_VALADOCORG, test x$enable_valadocorg = xyes)
+
+
+
+if test x$enable_valadocorg = xyes; then
+	AC_CHECK_PROGS(YACC, mysql_config, :)
+	if test "$YACC" = :; then
+		AC_MSG_ERROR([mysql_config not found but required])
+	fi
+fi
+
+
+
 # Checks for libraries.
 LIBVALA_REQUIRED=0.3.4
 LIBGVC_REQUIRED=2.16
@@ -19,6 +35,7 @@
 GTK_REQUIRED=2.10.0
 LIBXML2_REQUIRED=2.0
 
+
 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED )
 AC_SUBST(LIBXML2_CFLAGS)
 AC_SUBST(LIBXML2_LIBS)
@@ -41,6 +58,8 @@
 
 
 
+
+
 # Checks for header files.
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -81,16 +100,7 @@
                  src/doclets/html/taglets/listelement/Makefile
                  src/doclets/html/taglets/cell/Makefile
                  src/doclets/valadoc.org/Makefile
-                 src/doclets/valadoc.org/linkhelper/Makefile
                  src/doclets/valadoc.org/doclet/Makefile
-                 src/doclets/valadoc.org/taglets/Makefile
-                 src/doclets/valadoc.org/taglets/parameter/Makefile
-                 src/doclets/valadoc.org/taglets/version/Makefile
-                 src/doclets/valadoc.org/taglets/throws/Makefile
-                 src/doclets/valadoc.org/taglets/return/Makefile
-                 src/doclets/valadoc.org/taglets/string/Makefile
-                 src/doclets/valadoc.org/taglets/link/Makefile
-                 src/doclets/valadoc.org/taglets/see/Makefile
                  src/doclets/devhelp/Makefile
                  src/doclets/devhelp/taglets/image/Makefile
                  src/doclets/devhelp/taglets/notification/Makefile

Modified: trunk/src/doclets/devhelp/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/doclet/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/doclet/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -12,7 +12,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(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 $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/doclet/template.vala
==============================================================================
--- trunk/src/doclets/devhelp/doclet/template.vala	(original)
+++ trunk/src/doclets/devhelp/doclet/template.vala	Wed Jan 14 00:57:23 2009
@@ -26,7 +26,7 @@
 
 
 public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.HtmlHelper {
-	protected override string get_link ( Basic element, Basic pos ) {
+	protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
 		return this.get_html_link ( this.settings, element, pos );
 	}
 
@@ -150,23 +150,23 @@
 	private string package_dir_name = "";
 	private DevhelpFormat devhelp;
 
-	protected override string get_link ( Valadoc.Basic p1, Valadoc.Basic? p2 ) {
+	protected override string get_link ( DocumentedElement p1, DocumentedElement? p2 ) {
 		return this.get_html_link ( this.settings, p1, p2 );		
 	}
 
-	private string get_path ( Valadoc.Basic element ) {
+	private string get_path ( DocumentedElement element ) {
 		return element.full_name () + ".html";
 	}
 
-	private string get_real_path ( Valadoc.Basic element ) {
+	private string get_real_path ( DocumentedElement element ) {
 		return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + element.full_name () + ".html";
 	}
 
-	protected override string get_img_path ( Valadoc.Basic element ) {
+	protected override string get_img_path ( DocumentedElement element ) {
 		return "img/" + element.full_name () + ".png";
 	}
 
-	protected override string get_img_real_path ( Valadoc.Basic element ) {
+	protected override string get_img_real_path ( DocumentedElement element ) {
 		return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + "img/" + element.full_name () + ".png";
 	}
 
@@ -175,7 +175,7 @@
 		protected get;
 	}
 
-	public override void initialisation ( Settings settings ) {
+	public override void initialisation ( Settings settings, Tree tree ) {
 		this.settings = settings;
 
 		var rt = DirUtils.create ( this.settings.path, 0777 );
@@ -183,6 +183,11 @@
 
 		this.langlet = new Valadoc.LangletIndex ( settings );
 		this.devhelp = new DevhelpFormat ( settings.pkg_name, "" );
+
+		Gee.ReadOnlyCollection<Package> packages = tree.get_package_list ();
+		foreach ( Package pkg in packages ) {
+			pkg.visit ( this );
+		}
 	}
 
 	public override void visit_package ( Package file ) {
@@ -313,7 +318,6 @@
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
 		this.write_file_header ( file, "style.css", stru.full_name() );
 
-		// HIER CRASHT ES!!
 		this.write_struct_content ( file, stru, stru );
 		this.write_file_footer ( file );
 		file = null;

Modified: trunk/src/doclets/devhelp/linkhelper/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/linkhelper/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/linkhelper/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0  --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0  --vapidir ../../../vapi --pkg valadoc-1.0 $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/devhelp/linkhelper/helper.vala	(original)
+++ trunk/src/doclets/devhelp/linkhelper/helper.vala	Wed Jan 14 00:57:23 2009
@@ -23,7 +23,7 @@
 
 
 public interface Valadoc.HtmlHelper {
-	protected string? get_html_link ( Settings settings, Basic element, Basic pos ) {
+	protected string? get_html_link ( Settings settings, DocumentedElement element, DocumentedElement? pos ) {
 		if ( element is Package ) {
 			return "../" + element.name + "/index.html";
 		}
@@ -32,12 +32,12 @@
 		string prefix = "";
 	
 		if ( element != pos ) {
-			prefix =  "../" + element.file.name;
+			prefix =  "../" + element.package.name;
 		}
 
 		if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
 			tmp = "#" + element.name;
-			element = element.parent;
+			element = (DocumentedElement)element.parent;
 		}
 
 		return prefix + "/" + element.full_name () + ".html" + tmp;

Modified: trunk/src/doclets/devhelp/taglets/bold/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/bold/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/bold/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/cell/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/cell/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/cell/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/center/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/center/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/center/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/image/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/image/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/image/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/italic/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/italic/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/italic/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/link/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/link/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/link/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/list/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/list/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/list/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/listelement/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/listelement/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/listelement/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/notification/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/notification/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/notification/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/parameter/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/parameter/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/parameter/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/return/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/return/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/return/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/right/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/right/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/right/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/see/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/see/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/see/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/devhelp/taglets/see/taglet.vala	(original)
+++ trunk/src/doclets/devhelp/taglets/see/taglet.vala	Wed Jan 14 00:57:23 2009
@@ -25,7 +25,7 @@
 
 
 public class Valadoc.SeeDevhelpTaglet : SeeHtmlHelperTaglet, HtmlHelper {
-	protected override string? get_link ( Settings settings, Tree tree, Basic element, Basic? pos ) {
+	protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
 		return this.get_html_link ( settings, element, pos );
 	}
 
@@ -41,7 +41,7 @@
 		return this.write_imp ( res, max, index );
 	}
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		return this.parse_imp ( settings, tree, me, content, out errmsg );
 	}
 }

Modified: trunk/src/doclets/devhelp/taglets/source/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/source/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/source/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/string/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/string/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/string/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/table/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/table/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/table/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/throws/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/throws/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/throws/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/underline/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/underline/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/underline/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/version/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/version/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/version/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/devhelp/taglets/wikilink/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/wikilink/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/wikilink/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/html/doclet/Makefile.am	(original)
+++ trunk/src/doclets/html/doclet/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 --disable-non-null --save-temps $^
+	$(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 $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/doclet/template.vala
==============================================================================
--- trunk/src/doclets/html/doclet/template.vala	(original)
+++ trunk/src/doclets/html/doclet/template.vala	Wed Jan 14 00:57:23 2009
@@ -26,7 +26,7 @@
 
 
 public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper {
-	protected override string get_link ( Basic element, Basic pos ) {
+	protected override string get_link ( DocumentedElement element, DocumentedElement? pos ) {
 		return this.get_html_link ( this.settings, element, pos );
 	}
 
@@ -56,11 +56,11 @@
 		return css_path.str;
 	}
 
-	protected override string get_link ( Valadoc.Basic element, Valadoc.Basic? pos ) {
+	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, Basic? pos ) {
+	protected override void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) {
 		string top = "";
 
 		if ( pos != null )
@@ -101,14 +101,19 @@
 		protected get;
 	}
 
-	public override void initialisation ( Settings settings ) {
+	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 ( Basic element ) {
+	protected override string get_img_real_path ( DocumentedElement element ) {
 		if ( element is Package ) {
 			return this.current_path + element.name + ".png";
 		}
@@ -116,7 +121,7 @@
 		return this.current_path + "tree.png";
 	}
 
-	protected override string get_img_path ( Basic element ) {
+	protected override string get_img_path ( DocumentedElement element ) {
 		if ( element is Package ) {
 			return element.name + ".png";
 		}

Modified: trunk/src/doclets/html/linkhelper/Makefile.am
==============================================================================
--- trunk/src/doclets/html/linkhelper/Makefile.am	(original)
+++ trunk/src/doclets/html/linkhelper/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/html/linkhelper/helper.vala	(original)
+++ trunk/src/doclets/html/linkhelper/helper.vala	Wed Jan 14 00:57:23 2009
@@ -23,7 +23,7 @@
 
 
 public interface Valadoc.LinkHelper {
-	protected string get_html_top_link ( Valadoc.Basic postag ) {
+	protected string get_html_top_link ( DocumentedElement? postag ) {
 		GLib.StringBuilder str = new GLib.StringBuilder ( "" );
 		Valadoc.Basic pos = postag;
 
@@ -34,41 +34,38 @@
 		return str.str;
 	}
 
-	protected string? get_html_link ( Valadoc.Settings settings, Valadoc.Basic element, Valadoc.Basic pos2 ) {
-		Package pkg = ( element is Package )? (Package)element : element.file;
+	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 ( "" );
-		Valadoc.Basic pos = element;
+		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 = pos.parent;
+				pos = (DocumentedElement)pos.parent;
 			}
 			else if ( element is Visitable ) {
 				if ( !((Visitable)element).is_visitor_accessible() )
 					return null;
 			}
 
-			while ( pos != null ) {
-				if ( pos.name == null )
+			while ( pos is Package == false ) {
+				string name = pos.name;
+				if ( name == null )
 					str.prepend ( "0" );
 				else
-					str.prepend ( pos.name );
+					str.prepend ( name );
 
 				str.prepend ( "/" );
-
-				if ( pos.parent is Valadoc.Package )
-					break;
-
-				pos = pos.parent;
+				pos = (DocumentedElement)pos.parent;
 			}
 		}
 
-		str.prepend ( pos.file.name );
+		str.prepend ( pos.package.name );
 		str.prepend ( this.get_html_top_link ( pos2 ) );
 		str.append ( "/index.html" );
 

Modified: trunk/src/doclets/html/taglets/bold/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/bold/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/bold/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/cell/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/cell/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/cell/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/center/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/center/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/center/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/image/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/image/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/image/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/italic/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/italic/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/italic/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/link/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/link/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/link/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/link/taglet.vala	(original)
+++ trunk/src/doclets/html/taglets/link/taglet.vala	Wed Jan 14 00:57:23 2009
@@ -24,7 +24,7 @@
 
 
 public class Valadoc.LinkHtmlTaglet : Valadoc.LinkHtmlHelperTaglet, LinkHelper {
-	protected override string? get_link ( Settings settings, Tree tree, Basic element, Basic? pos ) {
+	protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
 		return this.get_html_link ( settings, element, pos );
 	}
 
@@ -36,7 +36,7 @@
 		return write_imp ( res, max, index );
 	}
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, string content, out string[] errmsg ) {
+	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 );
 	}
 }

Modified: trunk/src/doclets/html/taglets/list/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/list/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/list/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/listelement/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/listelement/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/listelement/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/notification/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/notification/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/notification/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/parameter/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/parameter/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/parameter/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/return/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/return/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/return/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/right/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/right/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/right/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/see/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/see/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/see/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/see/taglet.vala	(original)
+++ trunk/src/doclets/html/taglets/see/taglet.vala	Wed Jan 14 00:57:23 2009
@@ -25,7 +25,7 @@
 
 
 public class Valadoc.SeeHtmlTaglet : SeeHtmlHelperTaglet, LinkHelper {
-	protected override string? get_link ( Settings settings, Tree tree, Basic element, Basic? pos ) {
+	protected override string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos ) {
 		return this.get_html_link ( settings, element, pos );
 	}
 
@@ -41,7 +41,7 @@
 		return this.write_imp ( res, max, index );
 	}
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		return this.parse_imp ( settings, tree, me, content, out errmsg );
 	}
 }

Modified: trunk/src/doclets/html/taglets/source/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/source/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/source/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/string/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/string/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/string/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/table/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/table/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/table/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/throws/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/throws/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/throws/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/underline/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/underline/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/underline/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/version/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/version/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/version/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/html/taglets/wikilink/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/wikilink/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/wikilink/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --vapidir ../../../htmlhelpers/ --pkg libhtmlhelpers-1.0 --pkg libhtmlhelper-1.0 --basedir . --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/htmlhelpers/Makefile.am
==============================================================================
--- trunk/src/doclets/htmlhelpers/Makefile.am	(original)
+++ trunk/src/doclets/htmlhelpers/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -11,7 +11,7 @@
 
 
 libhtmlhelpers.vala.stamp: $(libhtmlhelpers_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelpers-1.0 --basedir . --vapidir ../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelpers-1.0 --basedir . --vapidir ../../vapi --pkg valadoc-1.0 --save-temps $^
 	touch $@
 
 

Modified: trunk/src/doclets/htmlhelpers/htmlhelpers.vala
==============================================================================
--- trunk/src/doclets/htmlhelpers/htmlhelpers.vala	(original)
+++ trunk/src/doclets/htmlhelpers/htmlhelpers.vala	Wed Jan 14 00:57:23 2009
@@ -277,7 +277,7 @@
 	private string link;
 	private string css;
 
-	protected abstract string? get_link ( Settings settings, Tree tree, Basic element, Basic? pos );
+	protected abstract string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos );
 
 	// override-bug
 	protected bool write_block_start_imp ( void* res ) {
@@ -302,7 +302,7 @@
 	}
 
 	// override-bug
-	protected bool parse_imp ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	protected bool parse_imp ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		if ( content.size != 1 ) {
 			errmsg = new string[1];
 			errmsg[0] = "Type name was expected.";
@@ -319,7 +319,7 @@
 			return false;
 		}
 
-		Valadoc.Basic? node = tree.search_symbol_str ( me, ((StringTaglet)element).content.strip ( ) );
+		Valadoc.DocumentedElement? node = tree.search_symbol_str ( me, ((StringTaglet)element).content.strip ( ) );
 		if ( node == null ) {
 			errmsg = new string[1];
 			errmsg[0] = "Linked type is not available.";
@@ -355,7 +355,7 @@
 		return true;
 	}
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		if ( content.size != 1 ) {
 			errmsg = new string[1];
 			errmsg[0] = "Version name was expected.";
@@ -384,7 +384,7 @@
 	private string? name = null;
 	private string? css = null;
 
-	protected abstract string? get_link ( Settings settings, Tree tree, Basic element, Basic? pos );
+	protected abstract string? get_link ( Settings settings, Tree tree, DocumentedElement element, DocumentedElement? pos );
 
 	protected string to_string_imp ( ) {
 		return this.name;
@@ -399,8 +399,8 @@
 		return true;
 	}
 
-	protected bool parse_imp ( Settings settings, Tree tree, Basic me, string content, out string[] errmsg ) {
-		Valadoc.Basic? element = tree.search_symbol_str ( me, content.strip() );
+	protected bool parse_imp ( Settings settings, Tree tree, DocumentedElement me, string content, out string[] errmsg ) {
+		Valadoc.DocumentedElement? element = tree.search_symbol_str ( me, content.strip() );
 		if ( element == null ) {
 			errmsg = new string[1];
 			errmsg[0] = "Linked type is not available.";
@@ -420,7 +420,7 @@
 	private Gee.ArrayList<DocElement> content;
 	private string paramname;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		if ( me is Valadoc.ExceptionHandler == false ) {
 			errmsg = new string[1];
 			errmsg[0] = "Tag @throws cannot be used in %s documentation.  It can only be used in the following types of documentation: method, signal, delegate.".printf ( this.get_data_type ( me ) );
@@ -481,11 +481,8 @@
 	}
 
 	private bool check_exception_parameter_name ( Valadoc.ExceptionHandler me, string paramname ) {
-		if ( paramname[0] == '.' || paramname == "" )
-			return false;
-
-		foreach ( Valadoc.TypeReference param in me.get_error_domains() ) {
-			if ( param.type_name.has_suffix ( paramname ) )
+		foreach ( Valadoc.DataType param in me.get_error_domains() ) {
+			if ( param.name == paramname )
 				return true;
 		}
 		return false;
@@ -580,7 +577,7 @@
 		return true;
 	}
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		if ( me is Valadoc.ParameterListHandler == false ) {
 			errmsg = new string[1];
 			errmsg[0] = "Tag @param cannot be used in %s documentation.  It can only be used in the following types of documentation: method, signal, delegate.".printf ( this.get_data_type ( me ) );
@@ -644,7 +641,7 @@
 	public override int order { get { return 300; } }
 	private Gee.Collection<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg ) {
 		if ( !(me is Valadoc.Method || me is Valadoc.Signal || me is Valadoc.Delegate) ) {
 			errmsg = new string[1];
 			errmsg[0] = "Tag @return cannot be used in %s documentation.  It can only be used in the following types of documentation: method, signal, delegate.".printf ( this.get_data_type ( me ) );
@@ -679,7 +676,7 @@
 
 
 public class Valadoc.StringHtmlTaglet : StringTaglet {
-	public override bool parse ( Settings settings, Tree tree, Basic me, string content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string content ) {
 		this.content = content;
 		return true;
 	}
@@ -735,9 +732,9 @@
 		this.settings = settings;
 	}
 
-	private Basic position = null;
+	private DocumentedElement position = null;
 
-	protected abstract string get_link ( Basic type, Basic position );
+	protected abstract string get_link ( DocumentedElement type, DocumentedElement? position );
 
 	private inline bool is_basic_type ( string name ) {
 		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
@@ -760,7 +757,7 @@
 		}
 
 		string typename = datatype.full_name ();
-		if ( datatype.parent.name == null && (datatype is Class || datatype is Struct) ) {
+		if ( ((DocumentedElement)datatype.parent).name == null && (datatype is Class || datatype is Struct) ) {
 			if ( this.is_basic_type ( typename ) ) {
 				string link = this.get_link(datatype, this.position );
 				if ( link == null )
@@ -824,6 +821,10 @@
 
 		if ( type_reference.is_weak )
 			modifiers.append ( "weak " );
+		else if ( type_reference.is_unowned )
+			modifiers.append ( "unowned " );
+		else if ( type_reference.is_owned )
+			modifiers.append ( "owned " );
 
 		if ( modifiers.len > 0 )
 			file.printf ( "<font class=\"%s\">%s</font> ", css_keyword, modifiers.str );
@@ -837,13 +838,8 @@
 			file.printf ( "[%s]", str );
 		}
 
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
+		if ( type_reference.is_nullable )
 			file.putc ( '?' );
-		}
 
 		string str = string.nfill ( type_reference.pointer_rank, '*' );
 		file.puts ( str );
@@ -912,7 +908,7 @@
 		foreach ( FormalParameter param in params ) {
 			i++;
 
-			if ( param.default_value != null && open_bracket == false ) {
+			if ( param.has_default_value == true && open_bracket == false ) {
 				file.printf ( "<span class=\"%s\">[", css_optional_parameter );
 				open_bracket = true;
 			}
@@ -930,7 +926,7 @@
 	}
 
 	private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
-		Gee.ReadOnlyCollection<TypeReference> error_domains = exception_handler.get_error_domains ();
+		Gee.ReadOnlyCollection<DataType> error_domains = exception_handler.get_error_domains ();
 		int size = error_domains.size;
 		int i = 1;
 
@@ -939,14 +935,8 @@
 
 		file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
 
-		foreach ( TypeReference type_reference in error_domains ) {
-			if ( type_reference == null ) {
-				file.printf ( "<span class=\"%s\">GLib.Error</span>", css_other_type );
-			}
-			else {
-				this.write_type_reference ( type_reference, file );
-			}
-
+		foreach ( DataType type in error_domains ) {
+			this.write_type_name ( type, file );
 			if ( error_domains.size > i ) {
 				file.puts ( ", " );
 			}
@@ -974,7 +964,7 @@
 			modifiers.append ( " inline" );
 
 		file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
-		this.write_type_reference ( m.return_type, file );
+		this.write_type_reference ( m.type_reference, file );
 		file.puts ( m.name );
 		file.puts ( " " );
 		this.write_parameter_list ( m, file );
@@ -987,7 +977,7 @@
 
 	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
 		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		file.puts ( param.datatype_name );
+		file.puts ( param.name );
 	}
 
 	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
@@ -1039,27 +1029,27 @@
 
 		Property prop = (Property)propac.parent;
 
+		file.printf ( "<span class=\"%s\">", css_keyword );
+
 		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
 			// FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
 			if ( propac.is_public )
-				file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
+				file.puts ( "public " );
 			else if ( propac.is_protected )
-				file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
+				file.puts ( "protected " );
 			else if ( propac.is_private )
-				file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
+				file.puts ( "private " );
 		}
 
+		if ( propac.is_owned )
+			file.puts ( "owned " );
 
-		if ( propac.is_get ) {
-			file.printf ( "<span class=\"%s\"> get</span>;", css_keyword );
-		}
-		else if ( propac.is_set ) {
-			if ( propac.is_construct ) {
-				file.printf ( "<span class=\"%s\"> construct</span> ", css_keyword );
-			}
+		if ( propac.is_get )
+			file.puts ( "get" );
+		else if ( propac.is_set )
+			file.puts ( "set" );
 
-			file.printf ( "<span class=\"%s\"> set</span>;", css_keyword );
-		}
+		file.puts ( "</span>;" );
 	}
 
 	public override void write_property ( Valadoc.Property prop, void* ptr ) {
@@ -1079,7 +1069,7 @@
 		if ( modifiers.len > 0 )
 			file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
 
-		this.write_type_reference ( prop.return_type, file );
+		this.write_type_reference ( prop.type_reference, file );
 		file.printf ( " %s { ", prop.name );
 
 		if ( prop.setter != null )
@@ -1100,9 +1090,14 @@
 
 		this.write_accessor ( sig, file );
 
-		file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
+		file.printf ( " <span class=\"%s\">", css_keyword );
+
+		if ( sig.is_virtual == true )
+			file.printf ( "virtual " );
+
+		file.printf ( "signal</span> " );
 
-		this.write_type_reference ( sig.return_type, file );
+		this.write_type_reference ( sig.type_reference, file );
 		file.printf ( " %s ", sig.name );
 		this.write_parameter_list ( sig, file );
 	}
@@ -1120,7 +1115,7 @@
 		this.write_accessor ( del, file );
 
 		file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
-		this.write_type_reference ( del.return_type, file );
+		this.write_type_reference ( del.type_reference, file );
 		file.printf ( " %s ", del.name );
 		this.write_parameter_list ( del, file );
 		this.write_exception_list ( del, file );
@@ -1212,7 +1207,7 @@
 public class Valadoc.UnderlinedHtmlHelperDocElement : UnderlinedDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1238,7 +1233,7 @@
 public class Valadoc.ListHtmlHelperEntryDocElement : ListEntryDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, ListType type, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, ListType type, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1265,7 +1260,7 @@
 	private Gee.ArrayList<ListEntryDocElement> entries;
 	private ListType type;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, ListType type, Gee.ArrayList<ListEntryDocElement> entries ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, ListType type, Gee.ArrayList<ListEntryDocElement> entries ) {
 		this.entries = entries;
 		this.type = type;
 		return true;
@@ -1295,7 +1290,7 @@
 	protected Gee.ArrayList<DocElement>? desc;
 	protected string path;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, string# path, Gee.ArrayList<DocElement>? desc ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string# path, Gee.ArrayList<DocElement>? desc ) {
 		this.path = #path;
 		this.desc = desc;
 		return true;
@@ -1332,7 +1327,7 @@
 	private int dcells;
 	private int cells;
 	
-	public override void parse ( Settings settings, Tree tree, Basic me, TextPosition pos, TextVerticalPosition hpos, int cells, int dcells, Gee.ArrayList<DocElement> content ) {
+	public override void parse ( Settings settings, Tree tree, DocumentedElement me, TextPosition pos, TextVerticalPosition hpos, int cells, int dcells, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		this.dcells = dcells;
 		this.cells = cells;
@@ -1422,7 +1417,7 @@
 public class Valadoc.NotificationHtmlHelperDocElement : NotificationDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1448,7 +1443,7 @@
 	public Language lang;
 	public string src;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, string# src, Language lang ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string# src, Language lang ) {
 		this.lang = lang;
 		this.src = #src;
 		return true;
@@ -1468,7 +1463,7 @@
 public class Valadoc.ItalicHtmlHelperDocElement : ItalicDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1494,7 +1489,7 @@
 public class Valadoc.BoldHtmlHelperDocElement : BoldDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1521,7 +1516,7 @@
 public class Valadoc.RightAlignedHtmlHelperDocElement : RightAlignedDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1550,7 +1545,7 @@
 public class Valadoc.CenterHtmlHelperDocElement : CenterDocElement {
 	private Gee.ArrayList<DocElement> content;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		this.content = content;
 		return true;
 	}
@@ -1583,7 +1578,7 @@
 	protected ImageDocElementPosition position;
 	protected string path;
 
-	public override bool parse ( Settings settings, Tree tree, Basic me, string# path, ImageDocElementPosition pos ) {
+	public override bool parse ( Settings settings, Tree tree, DocumentedElement me, string# path, ImageDocElementPosition pos ) {
 		this.position = pos;
 		this.path = #path;
 		return true;
@@ -1637,7 +1632,7 @@
 public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet {
 	protected Valadoc.Langlet langlet;
 
-	protected abstract string get_link ( Valadoc.Basic p1, Valadoc.Basic? p2 );
+	protected abstract string get_link ( DocumentedElement p1, DocumentedElement? p2 );
 
 
 	// Navi:
@@ -1649,7 +1644,7 @@
 		file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", style, css_navi_link, link, content );
 	}
 
-	protected void write_navi_entry ( GLib.FileStream file, Basic element, Basic pos, string style, bool link, bool full_name = false ) {
+	protected void write_navi_entry ( GLib.FileStream file, DocumentedElement element, DocumentedElement? pos, string style, bool link, bool full_name = false ) {
 		string name;
 
 		if ( element is Class ) {
@@ -1659,7 +1654,7 @@
 				name = element.name;
 		}
 		else if ( element is Package ) {
-			name = element.file.name;
+			name = element.package.name;
 		}
 		else if ( full_name == true && element is Namespace ) {
 			string tmp = element.full_name();
@@ -1676,7 +1671,7 @@
 			this.write_navi_entry_html_template ( file, style, name );
 	}
 
-	protected void write_navi_top_entry ( GLib.FileStream file, Basic element, Basic mself ) {
+	protected void write_navi_top_entry ( GLib.FileStream file, DocumentedElement element, DocumentedElement? mself ) {
 		string name = (element.name == null)? "Global Namespace" : element.name;
 		string style = null;
 
@@ -1693,7 +1688,7 @@
 		else if ( element is Interface )
 			style = css_navi_iface;
 		else if ( element is Package ) {
-			name = element.file.name;
+			name = element.package.name;
 			style = css_navi_package;
 		}
 
@@ -1713,12 +1708,12 @@
 	}
 
 	//FIXME: Basic pos => Basic? pos
-	protected virtual void write_top_element ( GLib.FileStream file, Basic? pos ) {
+	protected virtual void write_top_element ( GLib.FileStream file, DocumentedElement? pos ) {
 	}
 
-	protected void write_top_elements ( GLib.FileStream file, Basic element, Basic? mself ) {
-		Gee.ArrayList<Basic> lst = new Gee.ArrayList<Basic> ();
-		Basic pos = element;
+	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;
@@ -1729,11 +1724,11 @@
 
 		while ( pos != null ) {
 			lst.add ( pos );
-			pos = pos.parent;
+			pos = (DocumentedElement)pos.parent;
 		}
 
 		for ( int i = lst.size-1; i >= 0  ; i-- ) {
-			Basic el = lst.get ( i );
+			DocumentedElement el = lst.get ( i );
 
 			if ( el.name != null ) {
 				this.write_navi_top_entry ( file, el, mself );
@@ -1750,7 +1745,7 @@
 		}
 	}
 
-	protected void write_navi_file ( GLib.FileStream file, Package efile, Basic pos ) {
+	protected void write_navi_file ( GLib.FileStream file, Package efile, DocumentedElement? pos ) {
 		Gee.ArrayList<Namespace> ns_list = new Gee.ArrayList<Namespace> ();
 		this.fetch_subnamespace_names (efile, ns_list );
 
@@ -1763,7 +1758,7 @@
 		else if ( pos == efile )
 			this.write_top_elements ( file, efile, efile );
 		else
-			this.write_top_elements ( file, pos.parent.parent, pos );
+			this.write_top_elements ( file, (DocumentedElement)pos.parent.parent, pos );
 
 		file.printf ( "\t\t\t\t<ul class=\"%s\">\n", css_navi );
 
@@ -1785,7 +1780,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_child_namespaces_inline_withouth_block ( GLib.FileStream file, Namespace ns, Basic mself ) {
+	protected void write_navi_child_namespaces_inline_withouth_block ( GLib.FileStream file, Namespace ns, DocumentedElement? mself ) {
 		this.write_navi_child_namespaces_without_childs ( file, ns, mself );
 		this.write_navi_child_classes_without_childs ( file, ns, mself );
 		this.write_navi_child_interfaces_without_childs ( file, ns, mself );
@@ -1799,7 +1794,7 @@
 		this.write_navi_child_constants ( file, ns, mself );
 	}
 
-	protected void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, Basic mself ) {
+	protected void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, DocumentedElement? mself ) {
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 
 		if ( ns.name == null ) {
@@ -1811,12 +1806,12 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_navi_child_namespaces ( GLib.FileStream file, Namespace ns, Basic mself ) {
+	protected void write_navi_child_namespaces ( GLib.FileStream file, Namespace ns, DocumentedElement? mself ) {
 		this.write_top_elements ( file, ns, mself );
 		this.write_navi_child_namespaces_inline ( file, ns, mself );
 	}
 
-	protected void write_navi_struct_inline ( GLib.FileStream file, Struct stru, Basic mself ) {
+	protected void write_navi_struct_inline ( GLib.FileStream file, Struct stru, DocumentedElement? mself ) {
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 		this.write_navi_child_construction_methods ( file, stru, mself );
 		this.write_navi_child_static_methods ( file, stru, mself );
@@ -1826,14 +1821,14 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_navi_struct ( GLib.FileStream file, Struct stru, Basic mself ) {
+	protected void write_navi_struct ( GLib.FileStream file, Struct stru, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 		this.write_top_elements ( file, stru, mself );
 		this.write_navi_struct_inline ( file, stru, mself );
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_interface_inline ( GLib.FileStream file, Interface iface, Basic mself ) {
+	protected void write_navi_interface_inline ( GLib.FileStream file, Interface iface, DocumentedElement? mself ) {
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 		this.write_navi_child_static_methods ( file, iface, mself );
 		this.write_navi_child_delegates ( file, iface, mself );
@@ -1844,14 +1839,14 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_navi_interface ( GLib.FileStream file, Interface iface, Basic mself ) {
+	protected void write_navi_interface ( GLib.FileStream file, Interface iface, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 		this.write_top_elements ( file, iface, mself );
 		this.write_navi_interface_inline ( file, iface, mself );
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_enum_inline ( GLib.FileStream file, Enum en, Basic mself ) {
+	protected void write_navi_enum_inline ( GLib.FileStream file, Enum en, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ( );
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 
@@ -1864,14 +1859,14 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_navi_enum ( GLib.FileStream file, Enum en, Basic mself ) {
+	protected void write_navi_enum ( GLib.FileStream file, Enum en, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 		this.write_top_elements ( file, en, mself );
 		this.write_navi_enum_inline ( file, en, mself );
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, Basic mself = null ) {
+	protected void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, DocumentedElement? mself = null ) {
 		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ( );
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 
@@ -1891,14 +1886,14 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_error_domain ( GLib.FileStream file, ErrorDomain errdom, Basic mself ) {
+	protected void write_navi_error_domain ( GLib.FileStream file, ErrorDomain errdom, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 		this.write_top_elements ( file, errdom, mself );
 		this.write_navi_error_domain_inline ( file, errdom, mself );
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_navi_class_inline ( GLib.FileStream file, Class cl, Basic mself ) {
+	protected void write_navi_class_inline ( GLib.FileStream file, Class cl, DocumentedElement? mself ) {
 		file.printf ( "<ul class=\"%s\">\n", css_navi );
 		this.write_navi_child_construction_methods ( file, cl, mself );
 		this.write_navi_child_static_methods ( file, cl, mself );
@@ -1914,7 +1909,7 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_navi_class ( GLib.FileStream file, Class cl, Basic mself ) {
+	protected void write_navi_class ( GLib.FileStream file, Class cl, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 		this.write_top_elements ( file, cl, mself );
 		this.write_navi_class_inline ( file, cl, mself );
@@ -1922,7 +1917,7 @@
 	}
 
 	protected void write_navi_method ( GLib.FileStream file, Method m ) {
-		Basic parent = m.parent;
+		DocumentedElement parent = (DocumentedElement)m.parent;
 
 		if ( parent.name == null ) {
 			this.write_navi_file ( file, (Package)parent.parent, m );
@@ -1950,10 +1945,10 @@
 	}
 
 	protected void write_navi_property ( GLib.FileStream file, Property prop ) {
-		Basic parent = prop.parent;
+		DocumentedElement parent = (DocumentedElement)prop.parent;
 
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, prop.parent, prop );
+		this.write_top_elements ( file, parent, prop );
 
 		if ( parent is Class )
 			this.write_navi_class_inline ( file, (Class)parent, prop );
@@ -1964,11 +1959,11 @@
 	}
 
 	protected void write_navi_signal ( GLib.FileStream file, Signal sig ) {
-		Basic parent = sig.parent;
+		DocumentedElement parent = (DocumentedElement)sig.parent;
 
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
 
-		this.write_top_elements ( file, sig.parent, sig );
+		this.write_top_elements ( file, parent, sig );
 
 		if ( parent is Class )
 			this.write_navi_class_inline ( file, (Class)parent, sig );
@@ -1979,7 +1974,7 @@
 	}
 
 	protected void write_navi_constant ( GLib.FileStream file, Constant c ) {
-		Basic parent = c.parent;
+		DocumentedElement parent = (DocumentedElement)c.parent;
 
 		if ( parent.name == null ) {
 			this.write_navi_file ( file, (Package)parent.parent, c );
@@ -2002,7 +1997,7 @@
 	}
 
 	protected void write_navi_field ( GLib.FileStream file, Field f ) {
-		Basic parent = f.parent;
+		DocumentedElement parent = (DocumentedElement)f.parent;
 
 		if ( parent.name == null ) {
 			this.write_navi_file ( file, (Package)parent.parent, f );
@@ -2025,7 +2020,7 @@
 	}
 
 	protected void write_navi_delegate ( GLib.FileStream file, Delegate del ) {
-		Basic parent = del.parent;
+		DocumentedElement parent = (DocumentedElement)del.parent;
 
 		if ( parent.name == null ) {
 			this.write_navi_file ( file, (Package)parent.parent, del );
@@ -2045,7 +2040,7 @@
 		}
 	}
 
-	protected void write_navi_child_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself ) {
+	protected void write_navi_child_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, DocumentedElement? mself ) {
 		foreach ( Method m in methods ) {
 			if ( !m.is_static ) {
 				string css;
@@ -2065,7 +2060,7 @@
 		}
 	}
 
-	protected void write_navi_child_construction_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself ) {
+	protected void write_navi_child_construction_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, DocumentedElement? mself ) {
 		foreach ( Method m in methods ) {
 			if ( m == mself )
 				this.write_navi_entry ( file, m, mself, css_navi_construction_method, false );
@@ -2074,7 +2069,7 @@
 		}
 	}
 
-	protected void write_navi_child_static_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself ) {
+	protected void write_navi_child_static_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, DocumentedElement? mself ) {
 		foreach ( Method m in methods ) {
 			if ( m.is_static ) {
 				if ( m == mself )
@@ -2085,17 +2080,17 @@
 		}
 	}
 
-	protected void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, Basic mself ) {
+	protected void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ( );
 		this.write_navi_child_methods_collection ( file, methods, mself );
 	}
 
-	protected void write_navi_child_static_methods ( GLib.FileStream file, MethodHandler mh, Basic mself ) {
+	protected void write_navi_child_static_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ( );
 		this.write_navi_child_static_methods_collection ( file, methods, mself );
 	}
 
-	protected void write_navi_child_classes_without_childs_collection ( GLib.FileStream file, Gee.Collection<Class> classes, Basic mself ) {
+	protected void write_navi_child_classes_without_childs_collection ( GLib.FileStream file, Gee.Collection<Class> classes, DocumentedElement? mself ) {
 		foreach ( Class cl in classes ) {
 			if ( cl == mself )
 				this.write_navi_entry ( file, cl, mself, (cl.is_abstract)? css_navi_abstract_class : css_navi_class, false );
@@ -2104,17 +2099,17 @@
 		}
 	}
 
-	protected void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, Basic mself ) {
+	protected void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ( );
 		this.write_navi_child_classes_without_childs_collection ( file, classes, mself );
 	}
 
-	protected void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, Basic mself ) {
+	protected void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ( );
 		this.write_navi_child_construction_methods_collection ( file, methods, mself );
 	}
 
-	protected void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, Basic mself ) {
+	protected void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ( );
 
 		foreach ( Signal sig in signals ) {
@@ -2125,7 +2120,7 @@
 		}
 	}
 
-	protected void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, Basic mself ) {
+	protected void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ( );
 
 		foreach ( Property p in properties ) {
@@ -2144,7 +2139,7 @@
 		}
 	}
 
-	protected void write_navi_child_fields_collection ( GLib.FileStream file, Gee.Collection<Field> fields, Basic mself ) {
+	protected void write_navi_child_fields_collection ( GLib.FileStream file, Gee.Collection<Field> fields, DocumentedElement? mself ) {
 		foreach ( Field f in fields ) {
 			if ( f == mself )
 				this.write_navi_entry ( file, f, mself, css_navi_field, false );
@@ -2153,12 +2148,12 @@
 		}
 	}
 
-	protected void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, Basic mself ) {
+	protected void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ( );
 		this.write_navi_child_fields_collection ( file, fields, mself );
 	}
 
-	protected void write_navi_child_constants_collection ( GLib.FileStream file, Gee.Collection<Constant> constants, Basic mself ) {
+	protected void write_navi_child_constants_collection ( GLib.FileStream file, Gee.Collection<Constant> constants, DocumentedElement? mself ) {
 		foreach ( Constant c in constants ) {
 			if ( c == mself )
 				this.write_navi_entry ( file, c, mself, css_navi_constant, false );
@@ -2167,12 +2162,12 @@
 		}
 	}
 
-	protected void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, Basic mself ) {
+	protected void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ( );
 		this.write_navi_child_constants_collection ( file, constants, mself );
 	}
 
-	protected void write_navi_child_structs_without_childs_collection ( GLib.FileStream file, Gee.Collection<Struct> structs, Basic mself ) {
+	protected void write_navi_child_structs_without_childs_collection ( GLib.FileStream file, Gee.Collection<Struct> structs, DocumentedElement? mself ) {
 		foreach ( Struct stru in structs ) {
 			if ( stru == mself )
 				this.write_navi_entry ( file, stru, mself, css_navi_struct, false );
@@ -2181,12 +2176,12 @@
 		}
 	}
 
-	protected void write_navi_child_structs_without_childs ( GLib.FileStream file, StructHandler strh, Basic mself ) {
+	protected void write_navi_child_structs_without_childs ( GLib.FileStream file, StructHandler strh, DocumentedElement? mself ) {
 		Gee.Collection<Struct> structs = strh.get_struct_list ( );
 		this.write_navi_child_structs_without_childs_collection ( file, structs, mself );
 	}
 
-	protected void write_navi_child_delegates_collection ( GLib.FileStream file, Gee.Collection<Delegate> delegates, Basic mself ) {
+	protected void write_navi_child_delegates_collection ( GLib.FileStream file, Gee.Collection<Delegate> delegates, DocumentedElement? mself ) {
 		foreach ( Delegate del in delegates ) {
 			if ( del == mself )
 				this.write_navi_entry ( file, del, mself, css_navi_del, false );
@@ -2195,12 +2190,12 @@
 		}
 	}
 
-	protected void write_navi_child_delegates ( GLib.FileStream file, DelegateHandler delh, Basic mself ) {
+	protected void write_navi_child_delegates ( GLib.FileStream file, DelegateHandler delh, DocumentedElement? mself ) {
 		Gee.Collection<Delegate> delegates = delh.get_delegate_list ( );
 		this.write_navi_child_delegates_collection ( file, delegates, mself );
 	}
 
-	protected void write_navi_child_interfaces_without_childs_collection ( GLib.FileStream file, Gee.Collection<Interface> interfaces, Basic mself ) {
+	protected void write_navi_child_interfaces_without_childs_collection ( GLib.FileStream file, Gee.Collection<Interface> interfaces, DocumentedElement? mself ) {
 		foreach ( Interface iface in interfaces ) {
 			if ( iface == mself )
 				this.write_navi_entry ( file, iface, mself, css_navi_iface, false );
@@ -2209,12 +2204,12 @@
 		}
 	}
 
-	protected void write_navi_child_interfaces_without_childs ( GLib.FileStream file, Namespace ifh, Basic mself ) {
+	protected void write_navi_child_interfaces_without_childs ( GLib.FileStream file, Namespace ifh, DocumentedElement? mself ) {
 		Gee.Collection<Interface> interfaces = ifh.get_interface_list ( );
 		this.write_navi_child_interfaces_without_childs_collection ( file, interfaces, mself );
 	}
 
-	protected void write_navi_child_enums_without_childs_collection ( GLib.FileStream file, Gee.Collection<Enum> enums, Basic mself ) {
+	protected void write_navi_child_enums_without_childs_collection ( GLib.FileStream file, Gee.Collection<Enum> enums, DocumentedElement? mself ) {
 		foreach ( Enum en in enums ) {
 			if ( en == mself )
 				this.write_navi_entry ( file, en, mself, css_navi_enum, false );
@@ -2223,12 +2218,12 @@
 		}
 	}
 
-	protected void write_navi_child_enums_without_childs ( GLib.FileStream file, EnumHandler eh, Basic mself ) {
+	protected void write_navi_child_enums_without_childs ( GLib.FileStream file, EnumHandler eh, DocumentedElement? mself ) {
 		Gee.Collection<Enum> enums = eh.get_enum_list ( );
 		this.write_navi_child_enums_without_childs_collection ( file, enums, mself );
 	}
 
-	protected void write_navi_child_error_domains_without_childs_collection ( GLib.FileStream file, Gee.Collection<ErrorDomain> errordomains, Basic mself ) {
+	protected void write_navi_child_error_domains_without_childs_collection ( GLib.FileStream file, Gee.Collection<ErrorDomain> errordomains, DocumentedElement? mself ) {
 		foreach ( ErrorDomain errdom in errordomains ) {
 			if ( errdom == mself )
 				this.write_navi_entry ( file, errdom, mself, css_navi_error_domain, false );
@@ -2237,12 +2232,12 @@
 		}
 	}
 
-	protected void write_navi_child_error_domains_without_childs ( GLib.FileStream file, Namespace errdomh, Basic mself ) {
+	protected void write_navi_child_error_domains_without_childs ( GLib.FileStream file, Namespace errdomh, DocumentedElement? mself ) {
 		Gee.Collection<ErrorDomain> errordomains = errdomh.get_error_domain_list ( );
 		this.write_navi_child_error_domains_without_childs_collection ( file, errordomains, mself );
 	}
 
-	protected void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, Basic mself ) {
+	protected void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Namespace> namespaces = nsh.get_namespace_list ( );
 		foreach ( Namespace ns in namespaces ) {
 			if ( ns.name == null )
@@ -2255,32 +2250,26 @@
 		}
 	}
 
-
-////////////////
-
-
-	protected void write_package_note ( GLib.FileStream file, Basic element ) {
-		string package = element.package;
+	protected void write_package_note ( GLib.FileStream file, DocumentedElement element ) {
+		string package = element.package.name;
 		if ( package == null )
 			return ;
 
 		file.printf ( "\n\n<br />\n<b>Package:</b> %s\n\n", package );
 	}
 
-	protected void write_namespace_note ( GLib.FileStream file, Basic element ) {
-		for ( ; element is Namespace == false; element = element.parent )
-			;
-
-		if ( element.parent == null )
+	protected void write_namespace_note ( GLib.FileStream file, DocumentedElement element ) {
+		Namespace? ns = element.nspace;
+		if ( ns == null )
 			return ;
 
-		if ( element.name == null )
+		if ( ns.name == null )
 			return ;
 
-		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", element.full_name() );
+		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", ns.full_name() );
 	}
 
-	private void write_brief_description ( GLib.FileStream file, Valadoc.Basic element , Valadoc.Basic? pos ) {
+	private void write_brief_description ( GLib.FileStream file, DocumentedElement element , DocumentedElement? pos ) {
 		DocumentationTree? doctree = element.documentation;
 		if ( doctree == null )
 			return ;
@@ -2304,7 +2293,7 @@
 		}
 	}
 
-	private void write_documentation ( GLib.FileStream file, Valadoc.Basic element , Valadoc.Basic? pos ) {
+	private void write_documentation ( GLib.FileStream file, DocumentedElement element , DocumentedElement? pos ) {
 		DocumentationTree? doctree = element.documentation;
 		if ( doctree == null )
 			return ;
@@ -2449,7 +2438,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	public void write_enum_content ( GLib.FileStream file, Enum en, Basic? mself ) {
+	public void write_enum_content ( GLib.FileStream file, Enum en, DocumentedElement? mself ) {
 		string full_name = en.full_name ( );
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
@@ -2490,7 +2479,7 @@
 		}
 	}
 
-	protected void write_child_namespaces ( GLib.FileStream file, NamespaceHandler nh, Basic? mself ) {
+	protected void write_child_namespaces ( GLib.FileStream file, NamespaceHandler nh, DocumentedElement? mself ) {
 		Gee.ArrayList<Namespace> nsl = new Gee.ArrayList<Namespace> ();
 		this.fetch_subnamespace_names ( nh, nsl );
 
@@ -2525,7 +2514,7 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_child_methods ( GLib.FileStream file, MethodHandler mh, Basic? mself ) {
+	protected void write_child_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
 		Gee.ArrayList<Method> imethods = new Gee.ArrayList<Method> ( );
 		foreach ( Method m in methods ) {
@@ -2545,7 +2534,7 @@
 		}
 	}
 
-	protected void write_child_dependencies ( GLib.FileStream file, Package package, Basic? mself ) {
+	protected void write_child_dependencies ( GLib.FileStream file, Package package, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Package> deps = package.get_full_dependency_list ();
 		if ( deps.size == 0 )
 			return ;
@@ -2573,7 +2562,7 @@
 		file.puts ( "</ul>\n" );
 	}
 
-	protected void write_child_static_methods ( GLib.FileStream file, MethodHandler mh, Basic? mself ) {
+	protected void write_child_static_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
 
 		Gee.ArrayList<Method> static_methods = new Gee.ArrayList<Method> ( );
@@ -2594,7 +2583,7 @@
 		}
 	}
 
-	public void write_class_content ( GLib.FileStream file, Class cl, Basic? mself ) {
+	public void write_class_content ( GLib.FileStream file, Class cl, DocumentedElement? mself ) {
 		string full_name = cl.full_name ( );
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
@@ -2627,7 +2616,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	public void write_interface_content ( GLib.FileStream file, Interface iface, Basic? mself ) {
+	public void write_interface_content ( GLib.FileStream file, Interface iface, DocumentedElement? mself ) {
 		string full_name = iface.full_name ();
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
@@ -2657,7 +2646,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom, Basic? mself ) {
+	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom, DocumentedElement? mself ) {
 		string full_name = errdom.full_name ( );
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
@@ -2678,7 +2667,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	public void write_struct_content ( GLib.FileStream file, Struct stru, Basic? mself ) {
+	public void write_struct_content ( GLib.FileStream file, Struct stru, DocumentedElement? mself ) {
 		string full_name = stru.full_name ( );
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
@@ -2707,12 +2696,12 @@
 	}
 
 
-	protected abstract string get_img_real_path ( Basic element );
+	protected abstract string get_img_real_path ( DocumentedElement element );
 
-	protected abstract string get_img_path ( Basic element );
+	protected abstract string get_img_path ( DocumentedElement element );
 
 
-	protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch, Basic? mself ) {
+	protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
 		if ( constants.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
@@ -2726,7 +2715,7 @@
 		}
 	}
 
-	protected void write_child_enums ( GLib.FileStream file, EnumHandler eh, Basic? mself ) {
+	protected void write_child_enums ( GLib.FileStream file, EnumHandler eh, DocumentedElement? mself ) {
 		Gee.Collection<Enum> enums = eh.get_enum_list ();
 		if ( enums.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
@@ -2740,7 +2729,7 @@
 		}
 	}
 
-	protected void write_child_errordomains ( GLib.FileStream file, ErrorDomainHandler eh, Basic? mself ) {
+	protected void write_child_errordomains ( GLib.FileStream file, ErrorDomainHandler eh, DocumentedElement? mself ) {
 		Gee.Collection<ErrorDomain> errdoms = eh.get_error_domain_list ();
 		if ( errdoms.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Errordomains:</h3>\n", css_title );
@@ -2754,7 +2743,7 @@
 		}
 	}
 
-	protected void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, Basic? mself ) {
+	protected void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ();
 		if ( methods.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
@@ -2786,7 +2775,7 @@
 		file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, imgpath );
 	}
 
-	protected void write_child_fields ( GLib.FileStream file, FieldHandler fh, Basic? mself ) {
+	protected void write_child_fields ( GLib.FileStream file, FieldHandler fh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ();
 		if ( fields.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
@@ -2800,7 +2789,7 @@
 		}
 	}
 
-	protected void write_child_properties ( GLib.FileStream file, PropertyHandler ph, Basic? mself ) {
+	protected void write_child_properties ( GLib.FileStream file, PropertyHandler ph, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ();
 		if ( properties.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
@@ -2814,7 +2803,7 @@
 		}
 	}
 
-	protected void write_child_signals ( GLib.FileStream file, SignalHandler sh, Basic? mself ) {
+	protected void write_child_signals ( GLib.FileStream file, SignalHandler sh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ();
 		if ( signals.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
@@ -2828,7 +2817,7 @@
 		}
 	}
 
-	protected void write_child_classes ( GLib.FileStream file, ClassHandler clh, Basic? mself ) {
+	protected void write_child_classes ( GLib.FileStream file, ClassHandler clh, DocumentedElement? mself ) {
 		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ();
 		if ( classes.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Classes:</h3>\n", css_title );
@@ -2850,7 +2839,7 @@
 		}
 	}
 
-	protected void write_child_interfaces ( GLib.FileStream file, InterfaceHandler ih, Basic? mself ) {
+	protected void write_child_interfaces ( GLib.FileStream file, InterfaceHandler ih, DocumentedElement? mself ) {
 		Gee.Collection<Interface> ifaces = ih.get_interface_list ( );
 		if ( ifaces.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Interfaces:</h3>\n", css_title );
@@ -2864,7 +2853,7 @@
 		}
 	}
 
-	protected void write_child_delegates ( GLib.FileStream file, DelegateHandler dh, Basic? mself ) {
+	protected void write_child_delegates ( GLib.FileStream file, DelegateHandler dh, DocumentedElement? mself ) {
 		Gee.Collection<Delegate> delegates = dh.get_delegate_list ();
 		if ( delegates.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
@@ -2878,7 +2867,7 @@
 		}
 	}
 
-	protected void write_child_structs ( GLib.FileStream file, StructHandler struh, Basic? mself ) {
+	protected void write_child_structs ( GLib.FileStream file, StructHandler struh, DocumentedElement? mself ) {
 		Gee.Collection<Struct> structs = struh.get_struct_list ();
 		if ( structs.size > 0 ) {
 			file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
@@ -2892,7 +2881,7 @@
 		}
 	}
 
-	public void write_namespace_content ( GLib.FileStream file, Namespace ns, Basic? mself ) {
+	public void write_namespace_content ( GLib.FileStream file, Namespace ns, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, (ns.name == null)? "Global Namespace" : ns.full_name () );
 		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_hr );
@@ -2918,7 +2907,7 @@
 		file.puts ( "\t\t\t</div>\n" );
 	}
 
-	protected void write_file_content ( GLib.FileStream file, Package f, Basic? mself ) {
+	protected void write_file_content ( GLib.FileStream file, Package f, DocumentedElement? mself ) {
 		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
 		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 );

Modified: trunk/src/doclets/valadoc.org/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -1,16 +1,17 @@
 # src/Makefile.am
 
+
+
+
+
+if ENABLE_VALADOCORG
+
 NULL =
 
 
 SUBDIRS = \
-          linkhelper  \
           doclet      \
-          taglets     \
           $(NULL)
 
-#          langlet     \
-#          doclet      \
-#          $(NULL)
-
 
+endif

Modified: trunk/src/doclets/valadoc.org/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/doclet/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/doclet/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -12,7 +12,7 @@
 
 
 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 . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../vapi --pkg mysql --pkg valadoc-1.0 --basedir . --save-temps $^
 	touch $@
 
 
@@ -33,21 +33,19 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../libvaladoc/   \
-	-I ../../htmlhelpers/     \
-	-I ../linkhelper/         \
-	-I ../                    \
+	`mysql_config --cflags`     \
 	$(GLIB_CFLAGS)            \
 	$(LIBVALA_CFLAGS)         \
 	$(NULL)
 
 
-libdoclet_la_LDFLAGS = -module -avoid-version
+libdoclet_la_LDFLAGS = -module -avoid-version \
+	`mysql_config --libs`                     \
+	$(NULL)
 
 
 libdoclet_la_LIBADD =                   \
-	../../htmlhelpers/libhtmlhelpers.la \
 	../../../libvaladoc/libvaladoc.la   \
-	../linkhelper/libhtmlhelper.la      \
 	$(GLIB_LIBS)                        \
 	$(LIBVALA_LIBS)                     \
 	$(NULL)

Modified: trunk/src/doclets/valadoc.org/doclet/template.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/doclet/template.vala	(original)
+++ trunk/src/doclets/valadoc.org/doclet/template.vala	Wed Jan 14 00:57:23 2009
@@ -18,408 +18,1702 @@
  */
 
 using Valadoc;
+using Mysql;
 using GLib;
 using Gee;
 
 
 
 
-public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper {
-	protected override string get_link ( Basic element, Basic pos ) {
-		return this.get_html_link ( this.settings, element );
+
+
+public class Valadoc.ValadocOrgLanglet : Valadoc.Langlet {
+	private const string css_optional_parameter = "";
+	private const string css_basic_type = "";
+	private const string css_other_type = "";
+	private const string css_keyword = "";
+
+	public Valadoc.Settings settings {
+		construct set;
+		protected get;
 	}
 
-	public LangletIndex ( Settings settings ) {
-		base ( settings );
+	public ValadocOrgLanglet ( Settings settings ) {
+		this.settings = settings;
 	}
-}
 
+	private Basic position = null;
 
+	protected string get_link ( Basic type, Basic position ) {
+		return "";
+	}
 
+	private inline bool is_basic_type ( string name ) {
+		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
+				"long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
+				"uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
+			};
 
+		foreach ( string str in basic_types ) {
+			if ( str == name )
+				return true;
+		}
 
+		return false;
+	}
 
+	private void write_type_name ( DataType? datatype, GLib.StringBuilder stream ) {
+		if ( datatype == null ) {
+			stream.append ( "<font class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">void</font>" );
+			return ;
+		}
 
+		string typename = datatype.full_name ();
+		if ( ((DocumentedElement)datatype.parent).name == null && (datatype is Class || datatype is Struct) ) {
+			if ( this.is_basic_type ( typename ) ) {
+				string link = this.get_link(datatype, this.position );
+				if ( link == null ) {
+					stream.append ( "<span class=\"" );
+					stream.append ( css_basic_type );
+					stream.append ( "\">" );
+					stream.append ( typename );
+					stream.append ( "</span>" );
+				}
+				else {
+					stream.append ( "<a class=\"" );
+					stream.append ( css_basic_type );
+					stream.append ( "\" href=\"" );
+					stream.append ( link );
+					stream.append ( "\">" );
+					stream.append ( typename );
+					stream.append ( "</a>" );
+				}
+				return ;
+			}
+		}
 
+		string link = this.get_link(datatype, this.position);
+		if ( link == null ) {
+			stream.append ( "<span class=\"" );
+			stream.append ( css_other_type );
+			stream.append ( "\">" );
+			stream.append ( typename );
+			stream.append ( "</span>" );
+		}
+		else {
+			stream.append ( "<a class=\"" );
+			stream.append ( css_other_type );
+			stream.append ( "\" href=\"" );
+			stream.append ( link );
+			stream.append ( "\">" );
+			stream.append ( typename );
+			stream.append ( "</a>" );
+		}
+	}
 
-public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
-	private string current_path = null;
-	private bool is_vapi = false;
+	private void write_type_reference_name ( TypeReference type_reference, GLib.StringBuilder stream ) {
+		if ( type_reference.type_name == "void" ) {
+			stream.append ( "<font class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">void</font>" );
+		}
+		else {
+			if ( type_reference.data_type == null  ) {
+				stream.append ( "<font class=\"" );
+				stream.append ( css_other_type );
+				stream.append ( "\">" );
+				stream.append ( type_reference.type_name );
+				stream.append ( "</font>" );
+			}
+			else {
+				this.write_type_name ( type_reference.data_type, stream );
+			}
+		}
+	}
+
+	private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.StringBuilder stream ) {
+		Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
+		int size = arglst.size;
+		if ( size == 0 )
+			return ;
+
+		stream.append ( "<" );
+		int i = 0;
+
+		foreach ( TypeReference arg in arglst ) {
+			i++;
+
+			this.write_nested_type_referene ( arg, stream );
+			if ( i != size )
+				stream.append ( ", " );
+		}
 
-	protected override string get_link ( Valadoc.Basic p1, Valadoc.Basic? p2 ) {
-		return this.get_html_link ( this.settings, p1 );
+		stream.append ( ">" );
 	}
 
-	private override void write_top_element ( GLib.FileStream file, Basic? pos ) {
-		this.write_top_element_template ( file, "?" );
+	private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.StringBuilder stream ) {
+		if ( type_reference.type_name == null )
+			return ;
+
+
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ();
+
+		if ( type_reference.is_dynamic )
+			modifiers.append ( "dynamic " );
+
+		if ( type_reference.is_weak )
+			modifiers.append ( "weak " );
+		else if ( type_reference.is_unowned )
+			modifiers.append ( "unowned " );
+		else if ( type_reference.is_owned )
+			modifiers.append ( "owned " );
+
+		if ( modifiers.len > 0 ) {
+			stream.append ( "<font class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">" );
+			stream.append ( modifiers.str );
+			stream.append ( "</font> ");
+		}
+
+
+		this.write_type_reference_name ( type_reference, stream );
+		this.write_type_reference_template_arguments ( type_reference, stream );
+
+		if ( type_reference.is_array ) {
+			stream.append_unichar ( '[' );
+			stream.append ( string.nfill ( type_reference.array_rank-1, ',') );
+			stream.append_unichar ( ']' );
+		}
+
+		if ( type_reference.is_nullable ) {
+			stream.append_unichar ( '?' );
+		}
+
+		stream.append ( string.nfill ( type_reference.pointer_rank, '*') );
 	}
 
+	public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
 
+		if ( type_reference == null )
+			return ;
 
+		this.write_nested_type_referene ( type_reference, stream );
+		stream.append_unichar ( ' ' );
 
+		/*
+		if ( type_reference.is_weak ) {
+			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
+		}
 
-	private string get_full_path ( Basic element ) {
-		if ( element.name == null )
-			return "";
+		this.write_type_name ( type_reference.data_type, file );
 
-		GLib.StringBuilder str = new GLib.StringBuilder ( "" );
+		if ( type_reference.is_array ) {
+			string str = string.nfill ( type_reference.array_rank-1, ',');
+			file.printf ( "[%s]", str );
+		}
 
-		for ( var pos = element; pos != null ; pos = pos.parent ) {
-			if ( pos is Package )
-				break;
+		if ( type_reference.pass_ownership ) {
+			file.putc ( '#' );
+		}
 
-			str.prepend_unichar ( '/' );
+		if ( type_reference.is_nullable ) {
+			file.putc ( '?' );
+		}
+
+		string str = string.nfill ( type_reference.pointer_rank, '*' );
+		file.puts ( str );
+		*/
+	}
 
-			if ( pos.name == null )
-				str.prepend ( "0" );
-			else
-				str.prepend ( pos.name );
+	private void write_formal_parameter ( FormalParameter param, GLib.StringBuilder stream ) {
+		if ( param.ellipsis ) {
+			stream.append ( " ..." );
+		}
+		else {
+			if ( param.is_out ) {
+				stream.append ( "<span class=\"" );
+				stream.append ( css_keyword );
+				stream.append ( "\">out</span> " );
+			}
+			else if ( param.is_ref ) {
+				stream.append ( "<span class=\"" );
+				stream.append ( css_keyword );
+				stream.append ( "\">ref</span> " );
+			}
+
+			this.write_type_reference ( param.type_reference, stream );
+			stream.append_unichar ( ' ' );
+			stream.append ( param.name );
 		}
+	}
 
-		string package_name = element.file.name  + "/";
+	public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		bool open_bracket = false;
+
+		Gee.ArrayList<FormalParameter> params = thandler.param_list;
+		int size = params.size;
+		int i = 0;
+
+		stream.append_unichar ( '(' );
+
+		foreach ( FormalParameter param in params ) {
+			i++;
+
+			if ( param.has_default_value == true && open_bracket == false ) {
+				stream.append ( "<span class=\"" );
+				stream.append ( css_optional_parameter );
+				stream.append ( "\">[" );
+				open_bracket = true;
+			}
+
+			this.write_formal_parameter ( param, stream );
+			if ( i != size ) {
+				stream.append ( ", " );
+			}
+			else if ( open_bracket == true ) {
+				stream.append ( "]</span>" );
+			}
+		}
 
-		str.prepend ( package_name );
-		str.append_unichar ( '/' );
-		return str.str;
+		stream.append_unichar ( ')' );
 	}
 
-	public Valadoc.Settings settings {
-		construct set;
-		protected get;
+	private void write_exception_list ( ExceptionHandler exception_handler, GLib.StringBuilder stream ) {
+		Gee.ReadOnlyCollection<DataType> error_domains = exception_handler.get_error_domains ();
+		int size = error_domains.size;
+		int i = 1;
+
+		if ( size == 0 )
+			return ;
+
+		stream.append ( " <span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">throws</span> " );
+
+
+		foreach ( DataType type in error_domains ) {
+			this.write_type_name ( type, stream );
+			if ( error_domains.size > i ) {
+				stream.append ( ", " );
+			}
+			i++;
+		}
 	}
 
-	public override void initialisation ( Settings settings ) {
-		this.settings = settings;
+	public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = m;
+
+		this.write_accessor ( m, stream );
+
+		if ( m.is_abstract )
+			modifiers.append ( " abstract" );
+		else if ( m.is_virtual )
+			modifiers.append ( " virtual" );
+		else if ( m.is_override )
+			modifiers.append ( " override" );
+		if ( m.is_static )
+			modifiers.append ( " static" );
+		if ( m.is_inline )
+			modifiers.append ( " inline" );
+
+		if ( modifiers.len > 0 ) {
+			stream.append ( " <span class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">" );
+			stream.append ( modifiers.str );
+			stream.append ( "</span>" );
+		}
 
-		DirUtils.create ( this.settings.path, 0777 );
-		this.langlet = new Valadoc.LangletIndex ( settings );
+		this.write_type_reference ( m.type_reference, stream );
+		stream.append ( m.name );
+		stream.append_unichar ( ' ' );
+		this.write_parameter_list ( m, stream );
+
+		if ( m.is_yields ) {
+			stream.append ( " <span class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">yields</span> " );
+		}
+
+		this.write_exception_list ( m, stream );
 	}
 
-	protected override string get_img_real_path ( Basic element ) {
-		return this.current_path + "tree.png";
+	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		stream.append ( param.name );
 	}
 
-	protected override string get_img_path ( Basic element ) {
-		return "docs/" + get_full_path ( element ) + "tree.png";
+	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		int i = 1;
+
+		var lst = thandler.get_template_param_list( );
+		if ( lst.size == 0 )
+			return ;
+
+		stream.append ( "&lt;" ); // <
+
+		foreach ( TypeParameter param in lst ) {
+			param.write ( this, stream );
+			if ( lst.size > i )
+				stream.append ( ", " );
+
+			i++;
+		}
+		stream.append ( "&gt;" ); // >
 	}
 
-	public override void visit_package ( Package file ) {
-		string package_name = file.name;
-		this.is_vapi = file.is_package;
+	public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = field;
 
-		string new_path = this.settings.path + package_name + "/";
+		this.write_accessor ( field, stream );
 
-		DirUtils.create ( new_path, 0777 );
+		if ( field.is_volatile ) {
+			stream.append ( " <span class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">volatile</span>" );
+		}
 
-		GLib.FileStream nav = GLib.FileStream.open ( new_path + "navi.html", "w" );
-		this.write_navi_file ( nav, file, file );
-		nav = null;
+		this.write_type_reference ( field.type_reference, stream );
 
-		GLib.FileStream sfile = GLib.FileStream.open ( new_path + "index.html", "w" );
-		this.write_file_content ( sfile, file, file );
-		sfile = null;
+		stream.append_unichar ( ' ' );
+		stream.append ( field.name );
+	}
 
+	public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = constant;
 
-		this.current_path = new_path;
-		file.visit_namespaces ( this );
-		this.current_path = null;
+		this.write_accessor ( constant, stream );
+		stream.append ( " <span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\"> const </span>" );
+
+		this.write_type_reference ( constant.type_reference, stream );
+
+		stream.append_unichar ( ' ' );
+		stream.append ( constant.name );
 	}
 
-	public override void visit_namespace ( Namespace ns ) {
-		string old_path = this.current_path;
+	public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		Property prop = (Property)propac.parent;
 
-		if ( ns.name == null ) {
-			string tmp = this.current_path + "0/";
-			this.current_path = tmp;
+		stream.append ( "<span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">" );
+
+		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
+			// FIXME: PropertyAccessor isn't a SymbolAccessibility.
+			if ( propac.is_public )
+				stream.append ( "public " );
+			else if ( propac.is_protected )
+				stream.append ( "protected " );
+			else if ( propac.is_private )
+				stream.append ( "private " );
 		}
-		else {
-			string tmp = this.current_path + ns.name + "/";
-			this.current_path = tmp;
+
+		if (  propac.is_owned )
+			stream.append ( "owned " );
+
+		if ( propac.is_get )
+			stream.append ( "get" );
+		else if ( propac.is_set )
+			stream.append ( "set" );
+
+		stream.append ( "</span>; " );
+	}
+
+	public override void write_property ( Valadoc.Property prop, void* ptr ) {
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = prop;
+
+
+		this.write_accessor ( prop, stream );
+
+		if ( prop.is_virtual ) {
+			modifiers.append ( " virtual " );
+		}
+		else if ( prop.is_abstract ) {
+			modifiers.append ( " abstract " );
+		}
+		else if ( prop.is_override ) {
+			modifiers.append ( " override " );
+		}
+
+		if ( modifiers.len > 0 ) {
+			stream.append ( " <span class=\"" );
+			stream.append ( css_keyword );
+			stream.append ( "\">" );
+			stream.append ( modifiers.str );
+			stream.append ( "</span> " );
 		}
 
-		DirUtils.create ( this.current_path, 0777 );
+		this.write_type_reference ( prop.type_reference, stream );
+		stream.append_unichar ( ' ' );
+		stream.append ( prop.name );
+		stream.append ( " { " );
 
-		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_namespace ( navi, ns );
-		navi = null;
+		if ( prop.setter != null )
+			this.write_property_accessor ( prop.setter, stream );
 
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
-		this.write_namespace_content ( file, ns, ns );
-		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 );
+		stream.append_unichar ( ' ' );
 
-		this.current_path = old_path;
+		if ( prop.getter != null )
+			this.write_property_accessor ( prop.getter, stream );
+
+		stream.append ( " }" );
 	}
 
-	public override void visit_interface ( Interface iface ) {
-		string old_path = this.current_path;
-		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 cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
-		cname.puts ( iface.get_cname() );
-		cname = null;
-
-		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_interface ( navi, iface, iface );
-		navi = null;
-
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_interface_content ( file, iface, iface );
-		file = null;
+	public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = sig;
+
+		this.write_accessor ( sig, stream );
+
+		stream.append ( " <span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">" );
+
+		if ( sig.is_virtual == true )
+			stream.append ( "virtual " );
 
-		this.current_path = old_path;
+		stream.append ( "signal</span> " );
+
+		this.write_type_reference ( sig.type_reference, stream );
+		stream.append_unichar ( ' ' );
+		stream.append ( sig.name );
+		stream.append_unichar ( ' ' );
+		this.write_parameter_list ( sig, stream );
 	}
 
-	public override void visit_class ( Class cl ) {
-		string old_path = this.current_path;
-		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 navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_class ( navi, cl, cl );
-		navi = null;
-
-		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
-		cname.puts ( cl.get_cname() );
-		cname = null;
-
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_class_content ( file, cl, cl );
-		file = null;
+	public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
+	}
 
-		this.current_path = old_path;
+	public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
 	}
 
-	public override void visit_struct ( Struct stru ) {
-		string old_path = this.current_path;
-		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 navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_struct ( navi, stru, stru );
-		navi = null;
-
-		// FIXME: libbonoboui-2.0
-		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
-		if ( cname != null ) {
-			cname.puts ( stru.get_cname() );
-			cname = null;
-		}
-
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_struct_content ( file, stru, stru );
-		file = null;
+	public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = del;
+
+		this.write_accessor ( del, stream );
+
+		stream.append ( " <span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">delegate</span> " );
 
-		this.current_path = old_path;
+		this.write_type_reference ( del.type_reference, stream );
+
+		stream.append_unichar ( ' ' );
+		stream.append ( del.name );
+		stream.append_unichar ( ' ' );
+		this.write_parameter_list ( del, stream );
+		this.write_exception_list ( del, stream );
 	}
 
-	public override void visit_error_domain ( ErrorDomain errdom ) {
-		string old_path = this.current_path;
-		this.current_path += errdom.name + "/";
-		DirUtils.create ( this.current_path, 0777 );
+	public override void write_enum ( Valadoc.Enum en, void* ptr ) {
+	}
 
-		errdom.visit_methods ( this );
+	public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
+	}
+
+	private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.StringBuilder stream ) {
+		stream.append ( "<span class=\"%s\">public</span> " );
+		stream.append ( css_keyword );
+		stream.append ( "\">" );
 
-		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
-		cname.puts ( errdom.get_cname() );
-		cname = null;
+		if ( element.is_public )
+			stream.append ( "public" );
+		else if ( element.is_protected )
+			stream.append ( "protected" );
+		else if ( element.is_private )
+			stream.append ( "private" );
 
-		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_error_domain ( navi, errdom, errdom );
-		navi = null;
+		stream.append ( "</span> " );
+	}
 
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_error_domain_content ( file, errdom, errdom );
-		file = null;
+	public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = stru;
 
-		this.current_path = old_path;
+		this.write_accessor ( stru, stream );
+		stream.append ( "<span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">struct</span> " );
+		stream.append ( stru.name );
+
+		this.write_template_parameters ( stru, stream );
+		this.write_inheritance_list ( stru, stream );
 	}
 
-	public override void visit_enum ( Enum en ) {
-		string old_path = this.current_path;
-		this.current_path += en.name + "/";
-		DirUtils.create ( this.current_path, 0777 );
-
-		en.visit_enum_values ( this );
-		en.visit_methods ( this );
-
-		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
-		cname.puts ( en.get_cname() );
-		cname = null;
-
-		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_enum ( navi, en, en );
-		navi = null;
-
-		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_enum_content ( file, en, en );
-		file = null;
+	private void write_inheritance_list ( Valadoc.ContainerDataType dtype, GLib.StringBuilder stream ) {
+		Gee.Collection<DataType> lst = dtype.get_parent_types ( );
+		int size = lst.size;
+		int i = 1;
+
+		if ( size == 0 )
+			return ;
 
-		this.current_path = old_path;
+		stream.append ( " : " );
+
+		foreach ( DataType cntype in lst ) {
+			this.write_type_name ( cntype, stream );
+			if ( size > i )
+				stream.append ( ", " );
+
+			i++;
+		}
+
+		stream.append_unichar ( ' ' );
 	}
 
-	public override void visit_property ( Property prop ) {
-		string path = this.current_path + prop.name + "/";
-		DirUtils.create ( path, 0777 );
+	public override void write_class ( Valadoc.Class cl, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = cl;
+
+		this.write_accessor ( cl, stream );
+
+		stream.append ( "<span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">" );
+
+		if ( cl.is_abstract )
+			stream.append ( "abstract " );
 
-		GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
-		if ( prop.parent is Class ) {
-			cname.printf ( "%s:%s", ((Class)prop.parent).get_cname(), prop.get_cname() );
+		stream.append ( " class</span> " );
+		stream.append ( cl.name );
+
+		this.write_template_parameters ( cl, stream );
+		this.write_inheritance_list ( cl, stream );
+	}
+
+	public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
+		weak GLib.StringBuilder stream = (GLib.StringBuilder)ptr;
+		this.position = iface;
+
+		this.write_accessor ( iface, stream );
+
+		stream.append ( "<span class=\"" );
+		stream.append ( css_keyword );
+		stream.append ( "\">interface</span> " );
+		stream.append ( iface.name );
+
+		this.write_template_parameters ( iface, stream );
+		this.write_inheritance_list ( iface, stream );
+	}
+
+	public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
+	}
+
+	public override void write_file ( Valadoc.Package file, void* ptr ) {
+	}
+}
+
+
+
+
+
+
+
+
+
+public class Valadoc.HtmlDoclet : Valadoc.Doclet {
+	private Gee.HashMap<Object, ulong> ids = new Gee.HashMap<Object, ulong> ();
+	private GLib.List<Package> exist = new GLib.List<Package> ();
+	private Valadoc.ValadocOrgLanglet langlet;
+	private Settings settings;
+	private bool run = true;
+	private Database mysql;
+	private int level;
+
+	private Namespace? get_global_namespace ( Package pkg ) {
+		foreach ( Namespace ns in pkg.get_namespace_list() ) {
+			if ( ns.name == null ) {
+				return ns;
+			}
+		}
+		return null;
+	}
+
+	private ulong get_package_id ( Package element ) {
+		if ( this.ids.contains ( element ) == true ) {
+			return this.ids.get ( element );
+		}
+
+		string query = "SELECT `id` FROM `Element` NATURAL JOIN `PackageElement` WHERE `name`='" + element.name + "' LIMIT 1";
+		if ( mysql.query ( query ) != 0 ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		Result? res = mysql.store_result ();
+		if ( res == null ) {
+			return 0;
+		}
+
+		weak string[]? row = res.fetch_row ();
+		if ( row == null ) {
+			return 0;
+		}
+
+		ulong id = row[0].to_ulong ();
+		Namespace? ns = this.get_global_namespace ( element );
+		if ( ns != null ) {
+			this.ids.set ( ns, id );
+		}
+
+		this.ids.set ( element, id );
+		return id;
+	}
+
+	private ulong get_type_id ( DocumentedElement element ) {
+		if ( this.ids.contains ( element ) == true ) {
+			return this.ids.get ( element );
+		}
+
+
+		GLib.Queue<DocumentedElement> stack = new Queue<DocumentedElement> ();
+
+		for ( DocumentedElement pos = element; pos != null ; pos = (DocumentedElement)pos.parent ) {
+			stack.push_head ( pos );
+		}
+
+		Package pkg = (Package)stack.pop_head ( );
+		ulong lastid = this.get_package_id ( pkg );
+
+		foreach ( DocumentedElement pos in stack.head ) {
+			if ( this.ids.contains ( pos ) ) {
+				lastid = this.ids.get ( pos );
+				continue ;
+			}
+
+			string query = "SELECT `id` FROM `ChildElement` NATURAL JOIN `Element` WHERE `name`='%s' AND `parentelement`='%lu' LIMIT 1".printf ( pos.name, lastid );
+			bool tmp = mysql.query ( query ) == 0;
+			if ( tmp == false ) {
+				stderr.printf ("ERROR: '%s'\n", mysql.error ());
+				return 0;
+			}
+
+			Result? res = mysql.store_result ();
+			if ( res == null ) {
+				stderr.printf ("ERROR: '%s'\n", mysql.error ());
+				return 0;
+			}
+
+			weak string[]? row = res.fetch_row ();
+			if ( row == null ) {
+				return 0;
+			}
+
+			lastid = row[0].to_ulong ();
+
+			if ( lastid == 0 ) {
+				return 0;
+			}
+
+			this.ids.set ( pos, lastid );
+		}
+
+		return lastid;
+	}
+
+	private ulong db_create_element ( DocumentedElement element ) {
+		string name = element.name;
+		if ( name == null ) {
+			// err msg
+			return 0;
+		}
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `Element` (`name`,`fullname`,`txtid`) VALUES ( '");
+		query.append ( name );
+		query.append ( "', '" );
+		query.append ( element.full_name () );
+		query.append ( "', '" );
+
+		if ( element is Package == false ) {
+			query.append ( element.package.name );
+			query.append_unichar ( '/' );
+		}
+
+		query.append ( element.full_name () );
+		query.append ( "');" );
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			// err msg
+			return 0;
+		}
+
+		ulong id = this.mysql.insert_id ();
+		this.ids.set ( element, id );
+		return id;
+	}
+
+	private ulong db_create_property ( Property element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 ) {
+			return 0;
+		}
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `PropertyElement` (`id`,`abstract`,`virtual`,`override`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_abstract ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_virtual ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_override ) );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		ulong tmp2 = this.db_create_accessibility ( element );
+		if ( tmp2 == 0 )
+			return 0;
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_field ( Field element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		bool tmp = mysql.query ( "INSERT INTO `FieldElement` (`id`,`volatile`) VALUES ('%lu','%s');".printf ( id, this.db_boolean ( element.is_volatile ) ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		ulong tmp2 = this.db_create_accessibility ( element );
+		if ( tmp2 == 0 )
+			return 0;
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_constant ( Constant element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		bool tmp = mysql.query ( "INSERT INTO `ConstantElement` (`id`) VALUES ('%lu');".printf ( id ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		ulong tmp2 = this.db_create_accessibility ( element );
+		if ( tmp2 == 0 )
+			return 0;
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private bool db_add_child_element ( Basic element ) {
+		bool tmp = mysql.query ( "INSERT INTO `ChildElement` (`id`, `parentelement`) VALUES ('%lu', '%lu');".printf ( this.ids.get ( element ), this.ids.get ( element.parent ) ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return false;
+		}
+		return true;
+	}
+
+	private ulong db_create_package ( Package element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		bool tmp = mysql.query ( "INSERT INTO `PackageElement` (`id`) VALUES ('%lu');".printf ( id ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		return id;
+	}
+
+	private ulong db_create_namespace ( Namespace element ) {
+		if ( element.name == null ) {
+			ulong id = this.get_type_id ( element.package );
+			this.ids.set ( element, id );
+			return id;
+		}
+
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+
+		bool tmp = mysql.query ( "INSERT INTO `NamespaceElement` (`id`) VALUES ('%lu');".printf ( id ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_type ( DocumentedElement element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		bool tmp = mysql.query ( "INSERT INTO `TypeElement` (`id`) VALUES ('%lu');".printf ( id ) ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private string db_boolean ( bool boolean ) {
+		return ( boolean == true )? "1" : "0";
+	}
+
+	private bool db_create_class_parent ( Class element ) {
+		ContainerDataType parent = element.parent_class;
+		if ( parent == null )
+			return true;
+
+		ulong id = this.get_type_id ( element );
+		ulong pid = this.get_type_id ( parent );
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ParentClassElement` (`id`, `parent`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+		query.append ( pid.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return false;
+		}
+		return true;
+	}
+
+	private bool db_create_interface_list ( ContainerDataType element ) {
+		Gee.Collection<DataType> interfacelist = element.get_parent_types ();
+		if ( interfacelist.size == 0 )
+			return true;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ImplementedInterfaceList` (`id`, `interface`) VALUES ('" );
+		query.append ( this.get_type_id ( element ).to_string() );
+		query.append ( "', '%lu');" );
+
+		foreach ( DataType type in interfacelist ) {
+			if ( type is Valadoc.Interface ) {
+				bool tmp = mysql.query ( query.str.printf ( this.get_type_id ( type ) ) ) == 0;
+				if ( tmp == false ) {
+					stderr.printf ("ERROR: '%s'\n", mysql.error ());
+					return false;
+				}
+			}
+		}
+		return true;
+	}
+
+	private bool db_create_with_image_element ( DocumentedElement element ) {
+		string realimgpath = this.settings.path + element.package.name + "/" + element.full_name () + ".png";
+		if ( element is Class ) {
+			Diagrams.write_class_diagram ( (Class)element, realimgpath );
+		}
+		else if ( element is Interface ) {
+			Diagrams.write_interface_diagram ( (Interface)element, realimgpath );
+		}
+		else if ( element is Struct ) {
+			Diagrams.write_struct_diagram ( (Struct)element, realimgpath );
+		}
+		return true;
+	}
+
+	private bool db_create_with_api_element ( DocumentedElement element ) {
+		GLib.StringBuilder stream = new GLib.StringBuilder ();
+
+		if ( element is Class ) {
+			((Class)element).write ( this.langlet, stream );
+		}
+		else if ( element is Interface ) {
+			((Interface)element).write ( this.langlet, stream );
+		}
+		else if ( element is Struct ) {
+			((Struct)element).write ( this.langlet, stream );
+		}
+		else if ( element is Method ) {
+			((Method)element).write ( this.langlet, stream, (MethodHandler)element.parent );
+		}
+		else if ( element is Delegate ) {
+			((Delegate)element).write ( this.langlet, stream );
+		}
+		else if ( element is Signal ) {
+			((Signal)element).write ( this.langlet, stream );
+		}
+		else if ( element is Property ) {
+			((Property)element).write ( this.langlet, stream );
+		}
+		else if ( element is Constant ) {
+			((Constant)element).write ( this.langlet, stream, (ConstantHandler)element.parent );
+		}
+		else if ( element is Field ) {
+			((Field)element).write ( this.langlet, stream, (FieldHandler)element.parent );
 		}
 		else {
-			cname.printf ( "%s:%s", ((Interface)prop.parent).get_cname(), prop.get_cname() );
+			return true;
 		}
-		cname = null;
 
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_property ( navi, prop );
-		navi = null;
+		unichar[] code = new unichar[stream.len*2+1];
+		this.mysql.real_escape_string ( (string)code, stream.str, stream.len );
 
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_property_content ( file, prop );
-		file = null;
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `WithApiElement` (`id`, `code`) VALUES ('" );
+		query.append ( this.ids.get ( element ).to_string() );
+		query.append ( "', '" );
+		query.append ( (string)code );
+		query.append ( "');" );
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return false;
+		}
+		return true;
 	}
 
-	public override void visit_constant ( Constant constant, ConstantHandler parent ) {
-		string path = this.current_path + constant.name + "/";
-		DirUtils.create ( path, 0777 );
+	private bool db_create_exception_list ( ExceptionHandler element ) {
+		Gee.ReadOnlyCollection<DataType> list = element.get_error_domains ();
+		if ( list.size == 0 )
+			return true;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ExceptionList` (`id`, `errordomain`) VALUES ('" );
+		query.append ( this.ids.get ( element ).to_string() );
+		query.append ( "', '%d');" );
+
+		foreach ( DataType type in list ) {
+			bool tmp = mysql.query ( query.str.printf ( this.get_type_id ( type ) ) ) == 0;
+			if ( tmp == false ) {
+				stderr.printf ("ERROR: '%s'\n", mysql.error ());
+				return false;
+			}
+		}
+		return true;
+	}
+	
+	private ulong db_create_accessibility ( SymbolAccessibility element ) {
+		ulong id = this.ids.get ( element );
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `AccessibilityElement` (`id`,`accessibility`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+
+		if ( element.is_protected )
+			query.append ( "PROTECTED" );
+		else if ( element.is_private )
+			query.append ( "PRIVATE" );
+		else if ( element.is_public )
+			query.append ( "PUBLIC" );
+
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
 
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_constant ( navi, constant );
-		navi = null;
-
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_constant_content ( file, constant, parent );
-		file = null;
+		return id;
 	}
 
-	public override void visit_field ( Field field, FieldHandler parent ) {
-		string path = this.current_path + field.name + "/";
-		DirUtils.create ( path, 0777 );
+	private ulong db_create_class ( Class element ) {
+		ulong id = this.db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = this.db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ClassElement` (`id`,`abstract`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_abstract ) );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_create_with_image_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_enum ( Enum element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `EnumElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_errordomain ( ErrorDomain element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ErrordomainElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_enumvalue ( EnumValue element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `EnumValueElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_errorcode ( ErrorCode element ) {
+		ulong id = db_create_element ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `ErrorCodeElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
 
-		GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
-		if ( field.parent is Class ) {
-			cname.puts( ((Class)field.parent).get_cname() );
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_interface ( Interface element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `InterfaceElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
 		}
-		else if ( field.parent is Struct ) {
-			cname.puts( ((Struct)field.parent).get_cname() );
+
+		tmp = this.db_create_with_image_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_delegate ( Delegate element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `DelegateElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
+		}
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_method ( Method element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `MethodElement` (`id`, `yields`, `abstract`, `virtual`, `override`, `static`, `inline`, `constructor`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_yields ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_abstract ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_virtual ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_override ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_static ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_inline ) );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_constructor ) );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
 		}
-		else if ( field.parent is Interface ) {
-			cname.puts( ((Interface)field.parent).get_cname() );
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_signal ( Signal element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `SignalElement` (`id`, `virtual`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "', '" );
+		query.append ( this.db_boolean ( element.is_virtual ) );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
 		}
-		else if ( field.parent is Namespace ) {
-			cname.puts( field.get_cname() );
+
+		tmp = this.db_create_with_api_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		return id;
+	}
+
+	private ulong db_create_struct ( Struct element ) {
+		ulong id = db_create_type ( element );
+		if ( id == 0 )
+			return 0;
+
+		id = db_create_accessibility ( element );
+		if ( id == 0 )
+			return 0;
+
+		GLib.StringBuilder query = new GLib.StringBuilder ( "INSERT INTO `StructElement` (`id`) VALUES ('" );
+		query.append ( id.to_string() );
+		query.append ( "');" );
+
+		bool tmp = mysql.query ( query.str ) == 0;
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return 0;
 		}
-		cname = null;
 
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_field ( navi, field );
-		navi = null;
+		tmp = this.db_create_with_image_element ( element );
+		if ( tmp == false )
+			return 0;
+
+		tmp = this.db_add_child_element ( element );
+		if ( tmp == false )
+			return 0;
 
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_field_content ( file, field, parent );
-		file = null;
+		return id;
 	}
 
-	public override void visit_error_code ( ErrorCode errcode ) {
+	private string getline ( ) {
+		GLib.StringBuilder str = new GLib.StringBuilder ( );
+
+		for ( int c = stdin.getc (); c != '\n' ; c = stdin.getc () ) {
+			str.append_c ( (char)c );
+		}
+		return str.str;
+	}	
+
+	public override void initialisation ( Settings settings, Tree tree ) {
+		this.langlet = new Valadoc.ValadocOrgLanglet ( settings );
+		this.settings = settings;
+
+		this.mysql = new Database ();
+		mysql.init ();
+
+		DirUtils.create ( this.settings.path, 0777 );
+
+
+		stdout.puts ( "host: " );
+		string host = this.getline ( );
+
+		stdout.puts ( "user: " );
+		string usr = this.getline ( );
+
+		stdout.puts ( "password: " );
+		string pw = this.getline ( );
+
+		stdout.puts ( "database: " );
+		string db = this.getline ( );
+
+		bool tmp = mysql.real_connect (host, usr, pw, db, 0, null, 0);
+		if ( tmp == false ) {
+			stderr.printf ("ERROR: '%s'\n", mysql.error ());
+			return;
+		}
+
+		Gee.ReadOnlyCollection<Package> packages = tree.get_package_list ();
+		this.level = 0;
+
+		foreach ( Package pkg in packages ) {
+			pkg.visit ( this );
+		}
+
+		this.level = 1;
+
+		foreach ( Package pkg in packages ) {
+			if ( this.run == false ) {
+				break;
+			}
+
+			pkg.visit ( this );
+		}
 	}
 
-	public override void visit_enum_value ( EnumValue enval ) {
+	public override void visit_package ( Package pkg ) {
+		if ( this.level == 0 ) {
+			ulong id = this.get_package_id ( pkg );
+			if ( id > 0 ) {
+				this.exist.append ( pkg );
+				return ;
+			}
+
+			DirUtils.create ( this.settings.path + pkg.name, 0777 );
+
+			id = this.db_create_package ( pkg );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			pkg.visit_namespaces ( this );
+		}
+		else if ( this.exist.find ( pkg ) == null ) {
+			pkg.visit_namespaces ( this );
+		}
 	}
 
-	public override void visit_delegate ( Delegate del ) {
-		string path = this.current_path + del.name + "/";
-		DirUtils.create ( path, 0777 );
+	public override void visit_namespace ( Namespace ns ) {
+		if ( this.run == false ) {
+			return ;
+		}
 
-		GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
-		cname.puts ( del.get_cname() );
-		cname = null;
-
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_delegate ( navi, del );
-		navi = null;
-
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_delegate_content ( file, del );
-		file = null;
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_namespace ( ns );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			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 );
+		}
+		else {
+			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_signal ( Signal sig ) {
-		string path = this.current_path + sig.name + "/";
-		DirUtils.create ( path, 0777 );
+	//TODO: parent list
+	public override void visit_interface ( Interface iface ) {
+		if ( this.run == false ) {
+			return ;
+		}
 
-		GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
-		if ( sig.parent is Class ) {
-			cname.printf ( "%s::%s", ((Class)sig.parent).get_cname(), sig.get_cname() );
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_interface ( iface );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			iface.visit_classes ( this );
+			iface.visit_structs ( this );
+			iface.visit_delegates ( this );
 		}
 		else {
-			cname.printf ( "%s::%s", ((Interface)sig.parent).get_cname(), sig.get_cname() );
+			bool tmp = this.db_create_interface_list ( iface );
+			if ( tmp == false ) {
+				this.run = false;
+				return ;
+			}
+
+			iface.visit_methods ( this );
+			iface.visit_signals ( this );
+			iface.visit_properties ( this );
+			iface.visit_fields ( this );
+			iface.visit_classes ( this );
+			iface.visit_structs ( this );
+			iface.visit_delegates ( this );
 		}
-		cname = null;
+	}
 
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_signal ( navi, sig );
-		navi = null;
+	public override void visit_class ( Class cl ) {
+		if ( this.run == false ) {
+			return ;
+		}
 
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		write_signal_content ( file, sig );
-		file = null;
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_class ( cl );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			cl.visit_classes ( this );
+			cl.visit_structs ( this );
+			cl.visit_enums ( this );
+			cl.visit_delegates ( this );
+		}
+		else {
+			bool tmp = this.db_create_interface_list ( cl );
+			if ( tmp == false ) {
+				this.run = false;
+				return ;
+			}
+
+			tmp = this.db_create_class_parent ( cl );
+			if ( tmp == false ) {
+				this.run = false;
+				return ;
+			}
+
+			cl.visit_construction_methods ( this );
+			cl.visit_methods ( this );
+			cl.visit_signals ( this );
+			cl.visit_properties ( this );
+			cl.visit_fields ( this );
+			cl.visit_constants ( this );
+			cl.visit_classes ( this );
+			cl.visit_structs ( this );
+			cl.visit_enums ( this );
+			cl.visit_delegates ( this );
+		}
 	}
 
-	public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
-		string path = this.current_path + m.name + "/";
-		DirUtils.create ( path, 0777 );
+	//TODO: parent list
+	public override void visit_struct ( Struct stru ) {
+		if ( this.run == false ) {
+			return ;
+		}
 
-		GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
-		cname.puts ( m.get_cname () );
-		cname = null;
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_struct ( stru );
+			if ( id == 0 ) {
+				this.run = false;
+			}
+		}
+		else {
+			stru.visit_construction_methods ( this );
+			stru.visit_methods ( this );
+			stru.visit_fields ( this );
+			stru.visit_constants ( this );
+		}
+	}
 
-		GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
-		this.write_navi_method ( navi, m );
-		navi = null;
+	public override void visit_error_domain ( ErrorDomain errdom ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_errordomain ( errdom );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			errdom.visit_error_codes ( this );
+		}
+		else {
+			errdom.visit_methods ( this );
+		}
+	}
+
+	public override void visit_enum ( Enum en ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_enum ( en );
+			if ( id == 0 ) {
+				this.run = false;
+				return ;
+			}
+
+			en.visit_enum_values ( this );
+		}
+		else {
+			en.visit_methods ( this );
+		}
+	}
+
+	public override void visit_property ( Property prop ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 1 ) {
+			ulong id = this.db_create_property ( prop );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
 
-		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_method_content ( file, m, parent );
-		file = null;
+	public override void visit_constant ( Constant constant, ConstantHandler parent ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 1 ) {
+			ulong id = this.db_create_constant ( constant );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
+
+	public override void visit_field ( Field field, FieldHandler parent ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 1 ) {
+			ulong id = this.db_create_field ( field );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
+
+	public override void visit_error_code ( ErrorCode errcode ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_errorcode ( errcode );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
+
+	public override void visit_enum_value ( EnumValue enval ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_enumvalue ( enval );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
+
+	public override void visit_delegate ( Delegate del ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 0 ) {
+			ulong id = this.db_create_delegate ( del );
+			if ( id == 0 )
+				this.run = false;
+		}
+		else {
+			bool tmp = this.db_create_exception_list ( del );
+			if ( tmp == false )
+				this.run = false;
+		}
+	}
+
+	//TODO: exception list
+	public override void visit_signal ( Signal sig ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 1 ) {
+			ulong id = this.db_create_signal ( sig );
+			if ( id == 0 )
+				this.run = false;
+		}
+	}
+
+	public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
+		if ( this.run == false ) {
+			return ;
+		}
+
+		if ( this.level == 1 ) {
+			ulong id = this.db_create_method ( m );
+			if ( id == 0 )
+				this.run = false;
+		}
+		else {
+			bool tmp = this.db_create_exception_list ( m );
+			if ( tmp == false )
+				this.run = false;
+		}
 	}
 
-	public override void cleanups () {
+	public override void cleanups ( ) {
 	}
 }
 

Modified: trunk/src/libvaladoc/Makefile.am
==============================================================================
--- trunk/src/libvaladoc/Makefile.am	(original)
+++ trunk/src/libvaladoc/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -17,7 +17,7 @@
 
 
 libvaladoc.vala.stamp: $(libvaladoc_VALASOURCES)
-	$(VALAC) -C --pkg vala-1.0 --pkg gmodule-2.0 --vapidir ../vapi --pkg libxml-2.0 --pkg libgvc --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --disable-non-null --save-temps $^
+	$(VALAC) -C --pkg vala-1.0 --pkg gmodule-2.0 --vapidir ../vapi --pkg libxml-2.0 --pkg libgvc --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --save-temps $^
 	touch $@
 
 

Modified: trunk/src/libvaladoc/doclet.vala
==============================================================================
--- trunk/src/libvaladoc/doclet.vala	(original)
+++ trunk/src/libvaladoc/doclet.vala	Wed Jan 14 00:57:23 2009
@@ -27,9 +27,9 @@
 
 
 public abstract class Valadoc.Doclet : GLib.Object {
-	public abstract void initialisation ( Settings settings );
+	public abstract void initialisation ( Settings settings, Tree tree );
 
-	// walkarround for a strage bug
+	// walkarround for a strange valac-bug
 	public abstract void cleanups ( );
 
 	public abstract void visit_package ( Package pkg );

Modified: trunk/src/libvaladoc/doctree.vala
==============================================================================
--- trunk/src/libvaladoc/doctree.vala	(original)
+++ trunk/src/libvaladoc/doctree.vala	Wed Jan 14 00:57:23 2009
@@ -119,77 +119,73 @@
 public Valadoc.Class glib_error = null;
 
 
-public enum CommentContext {
-	NAMESPACE,
-	ERRORDOMAIN,
-	ENUMVALUE,
-	ERRORCODE,
-	INTERFACE,
-	DELEGATE,
-	CONSTANT,
-	PROPERTY,
-	SIGNAL,
-	STRUCT,
-	CLASS,
-	FIELD,
-	ENUM
-}
 
+public abstract class Valadoc.Basic : Object {
+	public Valadoc.Settings settings {
+		construct set;
+		protected get;
+	}
 
+	public Basic parent {
+		construct set;
+		get;
+	}
 
-public class Valadoc.Basic : Object {
-	private string _full_name = null;
+	protected Vala.Symbol vsymbol {
+		protected get;
+		set;
+	}
 
-	public string? full_name () {
-		if ( this.name == null )
-			return null;
+	public Tree head {
+		construct set;
+		protected get;
+	}
+}
 
-		if ( this._full_name == null ) {
-			this._full_name = this.name;
-			Basic pos = this.parent;
 
-			while ( pos is Package == false ) {
-				if ( pos.name != null )
-					this._full_name = pos.name + "." + this._full_name;
+public abstract class Valadoc.DocumentedElement : Basic {
+	private Namespace? _nspace = null;
+	private Package? _package = null;
+	private string _full_name = null;
+	private int _line = -1;
 
-				pos = pos.parent;
+	public Package? package {
+		get {
+			if ( this._package == null ) {
+				Valadoc.Basic ast = this;
+				while ( ast is Valadoc.Package == false ) {
+					ast = ast.parent;
+					if ( ast == null )
+						return null;
+				}
+				this._package = (Valadoc.Package)ast;
 			}
+			return this._package;
 		}
-		return this._full_name;
 	}
 
-	public string?# package {
+	public Namespace? nspace {
 		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() );
+			if ( this._nspace == null ) {
+				Valadoc.Basic ast = this;
+				while ( ast is Valadoc.Namespace == false ) {
+					ast = ast.parent;
+					if ( ast == null )
+						return null;
+				}
+				this._nspace = (Valadoc.Namespace)ast;
 			}
-
-			return this.settings.pkg_name;
+			return this._nspace;
 		}
 	}
 
-	public string?# filename {
+	public int line {
 		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;
-			return GLib.Path.get_basename ( path );
+			if ( this._line == -1 ) {
+				Vala.SourceReference vsref = this.vsymbol.source_reference;
+				this._line = ( vsref == null )? 0 : vsref.first_line;
+			}
+			return this._line;
 		}
 	}
 
@@ -210,157 +206,82 @@
 		}
 	}
 
-	//- Nur dort hin packen, wo es gebraucht wird.
 	public DocumentationTree? documentation {
 		protected set;
 		get;
 	}
 
-	// internal
-	public virtual weak Basic? search_element ( string[] params, int pos ) {
-		return null;
-	}
-
-	// internal
-	public virtual weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> list, 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;
-
+	public virtual string? name {
+		owned get {
 			return null;
 		}
 	}
 
-	public string? file_name {
-		get {
-			Basic element = this;
-			while ( element != null ) {
-				if ( element is Package )
-					return element.name;
-
-				element = element.parent;
-			}
-			return null;
-		}
-	}
+	// rename to get_full_name, weak
+	public string? full_name () {
+		if ( this._full_name == null ) {
+			if ( this.name == null )
+				return null;
 
-	// construct set -> creation method
-	public Package? file {
-		get {
-			Valadoc.Basic ast = this;
-			while ( ast is Valadoc.Package == false ) {
-				ast = ast.parent;
-				if ( ast == null )
-					return null;
-			}
-			return (Valadoc.Package)ast;
-		}
-	}
+			GLib.StringBuilder full_name = new GLib.StringBuilder ( this.name );
 
-	// 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;
+			if ( this.parent != null ) {
+				for ( Basic pos = this.parent; pos is Package == false ; pos = pos.parent ) {
+					string name = ((DocumentedElement)pos).name;
+					if ( name != null ) {
+						full_name.prepend_unichar ( '.' );
+						full_name.prepend ( name );
+					}
+				}
 			}
-			return (Valadoc.Namespace)ast;
+			this._full_name = full_name.str;
 		}
+		return this._full_name;
 	}
 
-	public Basic parent {
-		construct set;
-		get;
-	}
-
-	protected Vala.Symbol vsymbol {
-		// internal
-		protected get;
-		set;
-	}
+	// rename to file_name
+	public string? filename {
+		owned get {
+			SourceReference? sref = this.vsymbol.source_reference;
+			if ( sref == null )
+				return null;
 
-	public Tree head {
-		construct set;
-		protected get;
-	}
+			Vala.SourceFile? file = sref.file;
+			if ( file == null )
+				return null;
 
-	public virtual string?# name {
-		get {
-			return null;
+			string path = sref.file.filename;
+			return GLib.Path.get_basename ( path );
 		}
 	}
 
+	protected void parse_comment_helper ( Valadoc.Parser docparser ) {
+		if ( this.documentation != null )
+			return ;
 
-	public bool is_public {
-		get {
-			Vala.SymbolAccessibility access = vsymbol.access;
-			return ( access == Vala.SymbolAccessibility.PUBLIC );
-		}
-	}
+		string? docu = this.comment_string;
+		if ( docu == null )
+			return ;
 
-	public bool is_protected {
-		get {
-			Vala.SymbolAccessibility access = vsymbol.access;
-			return ( access == Vala.SymbolAccessibility.PROTECTED );
-		}
-	}
+		bool tmp = Parser.is_documentation ( docu );
+		if ( tmp == false )
+			return ;
 
-	public bool is_private {
-		get {
-			Vala.SymbolAccessibility access = vsymbol.access;
-			return ( access == Vala.SymbolAccessibility.PRIVATE );
-		}
+		this.documentation = docparser.parse ( this.head, this, docu );
 	}
 
+	// internal
+	public virtual weak DocumentedElement? search_element ( string[] params, int pos ) {
+		return null;
+	}
 
-	// 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;
-		}
+	// internal
+	public virtual weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> list, int pos ) {
 		return null;
 	}
 }
 
+
 public interface Valadoc.EnumHandler : Basic {
 	protected abstract Gee.ArrayList<Enum> enums {
 		private set;
@@ -373,18 +294,18 @@
 		}
 	}
 
-	protected weak Basic? search_enum_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak DocumentedElement? search_enum_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Enum en in this.enums ) {
-			Basic element = en.search_element_vala ( params, pos+1 );
+			DocumentedElement element = en.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;			
 		}
 		return null;
 	}
 
-	protected weak Basic? search_enum ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_enum ( string[] params, int pos ) {
 		foreach ( Enum en in this.enums ) {
-			Basic element = en.search_element ( params, pos+1 );
+			DocumentedElement element = en.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -434,7 +355,7 @@
 		get;
 	}
 
-	protected weak Basic? search_delegate_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -447,7 +368,7 @@
 		return null;
 	}
 
-	protected weak Basic? search_delegate ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_delegate ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -509,18 +430,18 @@
 		get;
 	}
 
-	protected weak Basic? search_interface_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak DocumentedElement? search_interface_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Interface iface in this.interfaces ) {
-			Basic? element = iface.search_element_vala ( params, pos+1 );
+			DocumentedElement? element = iface.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
 		return null;
 	}
 
-	protected weak Basic? search_interface ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_interface ( string[] params, int pos ) {
 		foreach ( Interface iface in this.interfaces ) {
-			Basic element = iface.search_element ( params, pos+1 );
+			DocumentedElement? element = iface.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -579,18 +500,18 @@
 		get;
 	}
 
-	protected weak Basic? search_error_domain_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak DocumentedElement? search_error_domain_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( ErrorDomain errdom in this.errdoms ) {
-			Basic? element = errdom.search_element_vala ( params, pos+1 );
+			DocumentedElement? element = errdom.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
 		return null;
 	}
 
-	protected weak Basic? search_error_domain ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_error_domain ( string[] params, int pos ) {
 		foreach ( ErrorDomain errdom in this.errdoms ) {
-			Basic? element = errdom.search_element ( params, pos+1 );
+			DocumentedElement? element = errdom.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -649,21 +570,12 @@
 	}
 }
 
-// remove
+// rename
 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 {
@@ -805,18 +717,18 @@
 		get;
 	}
 
-	protected weak Basic? search_class_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak DocumentedElement? search_class_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Class cl in this.classes ) {
-			Basic element = cl.search_element_vala ( params, pos+1 );
+			DocumentedElement? element = cl.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;			
 		}
 		return null;
 	}
 
-	protected weak Basic? search_class ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_class ( string[] params, int pos ) {
 		foreach ( Class cl in this.classes ) {
-			Basic element = cl.search_element ( params, pos+1 );
+			DocumentedElement? element = cl.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -847,11 +759,6 @@
 		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 );
@@ -893,7 +800,7 @@
 		set;
 	}
 
-	protected weak Basic? search_property_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -909,7 +816,7 @@
 		return null;
 	}
 
-	protected weak Basic? search_property ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_property ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -982,7 +889,7 @@
 		get;
 	}
 
-	protected weak Basic? search_construction_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -998,7 +905,7 @@
 		return null;
 	}
 
-	protected weak Basic? search_construction_method ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_construction_method ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] == null )
@@ -1072,7 +979,7 @@
 		set;
 	}
 
-	protected weak Basic? search_signal_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -1088,7 +995,7 @@
 		return null;
 	}
 
-	protected weak Basic? search_signal ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_signal ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -1151,9 +1058,9 @@
 		get;
 	} 
 
-	protected weak Basic? search_struct_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak DocumentedElement? search_struct_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Struct stru in this.structs ) {
-			Basic element = stru.search_element_vala ( params, pos+1 );
+			DocumentedElement? element = stru.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -1161,9 +1068,9 @@
 	}
 
 
-	protected weak Basic? search_struct ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_struct ( string[] params, int pos ) {
 		foreach ( Struct stru in this.structs ) {
-			Basic element = stru.search_element ( params, pos+1 );
+			DocumentedElement? element = stru.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -1182,11 +1089,6 @@
 		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 );
 		this.structs.add( stru );
@@ -1246,44 +1148,53 @@
 }
 
 
-public interface Valadoc.SymbolAccessibility {
-	public abstract bool is_public {
-		get;
+public interface Valadoc.SymbolAccessibility : Basic {
+	public bool is_public {
+		get {
+			Vala.SymbolAccessibility access = vsymbol.access;
+			return ( access == Vala.SymbolAccessibility.PUBLIC );
+		}
 	}
 
-	public abstract bool is_protected {
-		get;
+	public bool is_protected {
+		get {
+			Vala.SymbolAccessibility access = vsymbol.access;
+			return ( access == Vala.SymbolAccessibility.PROTECTED );
+		}
 	}
 
-	public abstract bool is_private {
-		get;
+	public bool is_private {
+		get {
+			Vala.SymbolAccessibility access = vsymbol.access;
+			return ( access == Vala.SymbolAccessibility.PRIVATE );
+		}
 	}
 }
 
 
 
 public interface Valadoc.ReturnTypeHandler : Basic {
-	public abstract TypeReference return_type {
+	public abstract TypeReference? type_reference {
 		protected set;
 		get;
 	}
 
 	// internal
 	public void set_return_type_references ( ) {
-		if ( this.return_type == null )
+		if ( this.type_reference == null )
 			return ;
 
-		this.return_type.set_type_references ( );
+		this.type_reference.set_type_references ( );
 	}
 
 	// internal, rename
-	protected void set_ret_type ( Vala.DataType vtref ) {
+	protected void set_ret_type ( Vala.DataType? vtref ) {
 		var tmp = new TypeReference ( this.settings, vtref, this, this.head );
-		this.return_type = tmp;
+		this.type_reference = tmp;
 	}
 }
 
-
+/*
 // ????
 public interface Valadoc.TypeHandler : Basic {
 	public abstract TypeReference type_reference {
@@ -1304,7 +1215,7 @@
 		this.type_reference = tmp;
 	}
 }
-
+*/
 
 public interface Valadoc.ConstantHandler : Basic {
 	protected abstract Gee.ArrayList<Constant> constants {
@@ -1312,7 +1223,7 @@
 		get;
 	}
 
-	protected weak Basic? search_constant_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -1329,7 +1240,7 @@
 	}
 
 	// internal
-	protected weak Basic? search_constant ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_constant ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -1396,7 +1307,7 @@
 		get;
 	}
 
-	protected weak Basic? search_field_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -1413,7 +1324,7 @@
 	}
 
 	// internal
-	protected weak Basic? search_field ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_field ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -1476,28 +1387,28 @@
 	}
 }
 
+// rename to ExceptionListHandler
 public interface Valadoc.ExceptionHandler : Basic {
-	protected abstract Gee.ArrayList<TypeReference> err_domains {
+	protected abstract Gee.ArrayList<DataType> err_domains {
 		protected set;
 		get;
 	}
 
-	public Gee.ReadOnlyCollection<TypeReference> get_error_domains ( ) {
-		return new Gee.ReadOnlyCollection<TypeReference> ( 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 );
-		}
+	public Gee.ReadOnlyCollection<DataType> get_error_domains ( ) {
+		return new Gee.ReadOnlyCollection<DataType> ( this.err_domains );
 	}
 
-	// internal
-	public void set_exception_type_references ( ) {
-		foreach ( TypeReference tref in this.err_domains ) {
-			tref.set_type_references ( );
+	public void add_exception_list ( Gee.Collection<Vala.DataType> vexceptions ) {
+		foreach ( Vala.DataType vtype in vexceptions  ) {
+			if ( vtype is Vala.ErrorType ) {
+				if ( ((Vala.ErrorType)vtype).error_domain == null ) {
+					this.err_domains.add ( glib_error );
+				}
+				else {
+					ErrorDomain type = (ErrorDomain)this.head.search_vala_symbol ( ((Vala.ErrorType)vtype).error_domain );
+					this.err_domains.add ( type );
+				}
+			}
 		}
 	}
 }
@@ -1536,7 +1447,7 @@
 		get;
 	}
 
-	protected weak Basic? search_method_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	protected weak 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;
@@ -1553,7 +1464,7 @@
 	}
 
 	// internal
-	protected weak Basic? search_method ( string[] params, int pos ) {
+	protected weak DocumentedElement? search_method ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -1640,8 +1551,8 @@
 	}
 }
 
-public class Valadoc.Constant : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable  {
-	public TypeReference type_reference {
+public class Valadoc.Constant : DocumentedElement, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable  {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -1651,8 +1562,8 @@
 		private get;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.vconst.name;
 		}
 	}
@@ -1677,12 +1588,12 @@
 
 	// internal
 	public void set_type_references ( ) {
-		((TypeHandler)this).set_type_references ( );
+		((ReturnTypeHandler)this).set_return_type_references ( );
 	}
 
 	// internal
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.CONSTANT );
+		this.parse_comment_helper ( docparser );
 	}
 
 	public void visit ( Doclet doclet, ConstantHandler? parent ) {
@@ -1698,7 +1609,7 @@
 }
 
 
-public class Valadoc.Field : Basic, SymbolAccessibility, TypeHandler, Visitable, Writeable {
+public class Valadoc.Field : DocumentedElement, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable {
 	public Field ( Valadoc.Settings settings, Vala.Field vfield, FieldHandler parent, Tree head ) {
 		this.settings = settings;
 		this.vfield = vfield;
@@ -1706,6 +1617,7 @@
 		this.head = head;
 	}
 
+	// internal
 	public bool is_vfield ( Vala.Field vfield ) {
 		return ( this.vfield == vfield );
 	}
@@ -1714,13 +1626,13 @@
 		return this.vfield.get_cname();
 	}
 
-	public TypeReference type_reference {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.vfield.name;
 		}
 	}
@@ -1744,21 +1656,14 @@
 		}
 	}
 
-	// remove
-	public bool is_global {
-		get {
-			return ( this.parent is Valadoc.Namespace );
-		}
-	}
-
 	// internal
 	public void set_type_references ( ) {
-		((TypeHandler)this).set_type_references ( );
+		((ReturnTypeHandler)this).set_return_type_references ( );
 	}
 
 	// internal
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.FIELD );
+		this.parse_comment_helper ( docparser );
 	}
 
 	public void visit ( Doclet doclet, FieldHandler? parent ) {
@@ -1774,7 +1679,7 @@
 }
 
 public class Valadoc.TypeReference : Basic {
-	public TypeReference ( Valadoc.Settings settings, Vala.DataType vtyperef, Basic parent, Tree head ) {
+	public TypeReference ( Valadoc.Settings settings, Vala.DataType? vtyperef, Basic parent, Tree head ) {
 		this.settings = settings;
 		this.vtyperef = vtyperef;
 		this.parent = parent;
@@ -1796,12 +1701,12 @@
 		}
 	}
 
-	public DataType data_type {
+	public DataType? data_type {
 		private set;
 		get;
 	}
 
-	public Vala.DataType vtyperef {
+	public Vala.DataType? vtyperef {
 		construct set;
 		private get;
 	}
@@ -1825,17 +1730,62 @@
 		}
 	}
 
-	// from vala/valainterfacewriter.vala
-	private bool is_weak_helper (Vala.DataType type) {
+	public bool is_owned {
+		get {
+			Vala.CodeNode parent = this.vtyperef.parent_node;
+
+			// parameter:
+			if ( parent is Vala.FormalParameter ) {
+				if ( ((Vala.FormalParameter)parent).direction != ParameterDirection.IN )
+					return false;
+
+				return ((Vala.FormalParameter)parent).parameter_type.value_owned;
+			}
+			return false;
+		}
+	}
+
+	public bool is_unowned {
+		get {
+			Vala.CodeNode parent = this.vtyperef.parent_node;
+
+			// parameter:
+			if ( parent is Vala.FormalParameter ) {
+				if ( ((Vala.FormalParameter)parent).direction == ParameterDirection.IN )
+					return false;
+
+				return this.is_weak_helper ( ((Vala.FormalParameter)parent).parameter_type );
+			}
+
+			// return type
+			if ( parent is Vala.Method == true )
+				return this.is_weak_helper ( ((Vala.Method)parent).return_type );
+			else if ( parent is Vala.Signal == true )
+				return this.is_weak_helper ( ((Vala.Signal)parent).return_type );
+			else if ( parent is Vala.Delegate == true )
+				return this.is_weak_helper ( ((Vala.Delegate)parent).return_type );
+
+			return false;
+		}
+	}
+
+
+	// from vala/valacodewriter.vala
+	private bool is_weak_helper ( Vala.DataType type ) {
 		if (type.value_owned) {
 			return false;
-		} else if (type is VoidType || type is PointerType) {
+		} else if (type is Vala.VoidType || type is Vala.PointerType) {
 			return false;
-		} else if (type is ValueType) {
+		} else if (type is Vala.ValueType) {
 			if (type.nullable) {
-				return false;
+				// nullable structs are heap allocated
+				return true;
 			}
+
+			// TODO return true for structs with destroy
+			return false;
 		}
+
 		return true;
 	}
 	
@@ -1847,23 +1797,7 @@
 
 	public bool is_weak {
 		get {
-			Vala.CodeNode? node = this.vtyperef.parent_node;
-			if ( node == null )
-				return false;
-
-			if ( node is Vala.Constant || node is Vala.Property )
-				return false;
-
-			if ( node is Vala.FormalParameter ) {
-				var direction = ((Vala.FormalParameter)node).direction;
-
-				if ( direction == Vala.ParameterDirection.OUT || direction == Vala.ParameterDirection.IN )
-					return false;
-
-				return !this.vtyperef.value_owned;
-			}
-
-			return is_weak_helper( this.vtyperef );
+			return ( this.vtyperef.parent_node is Field )? this.is_weak_helper( this.vtyperef ) : false;
 		}
 	}
 
@@ -1933,8 +1867,8 @@
 	}
 
 	// remove
-	public string# type_name {
-		get {
+	public string type_name {
+		owned get {
 			return this.extract_type_name ( this.vtyperef );
 		}
 	}
@@ -1952,10 +1886,12 @@
 
 		if ( vtype is Vala.ErrorType ) {
 			Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtype).error_domain;		
-			if ( verrdom != null )
+			if ( verrdom != null ) {
 				this.data_type = (DataType?)this.head.search_vala_symbol ( verrdom );
-			else
+			}
+			else {
 				this.data_type = glib_error;
+			}
 		}
 		else if (vtype is Vala.DelegateType ) {
 			this.data_type = (DataType?)this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol );
@@ -1974,7 +1910,7 @@
 // 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 class Valadoc.TypeParameter : Basic, ReturnTypeHandler {
 	public TypeParameter ( Valadoc.Settings settings, Vala.TypeParameter vtypeparam, Basic parent, Tree head ) {
 		this.vtypeparam = vtypeparam;
 		this.settings = settings;
@@ -1982,7 +1918,7 @@
 		this.head = head;
 	}
 
-	public TypeReference type_reference {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -1996,14 +1932,15 @@
 		protected get;
 	}
 
-	public string# datatype_name {
-		get {
+	public string? name {
+		owned get {
 			return this.vtypeparam.name;
 		}
 	}
 
 	// internal
 	public void initialisation ( ) {
+		this.vsymbol = this.vtypeparam;
 	}
 
 	// internal
@@ -2012,7 +1949,7 @@
 }
 
 
-public class Valadoc.FormalParameter : Basic, TypeHandler {
+public class Valadoc.FormalParameter : Basic, ReturnTypeHandler {
 	public FormalParameter ( Valadoc.Settings settings, Vala.FormalParameter vformalparam, Basic parent, Tree head ) {
 		this.settings = settings;
 		this.vformalparam = vformalparam;
@@ -2032,12 +1969,20 @@
 		}
 	}
 
+	/*
 	public string? default_value {
 		private set;
 		public get;
 	}
+	*/
 
-	// internal
+	public bool has_default_value {
+		get {
+			return this.vformalparam.default_expression != null;
+		}
+	}
+
+	// internal, FIXME:
 	public void initialisation ( ) {
 		this.vsymbol = this.vformalparam;
 
@@ -2065,7 +2010,7 @@
 		*/
 	}
 
-	public TypeReference type_reference {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -2076,14 +2021,8 @@
 		}
 	}
 
-	public bool is_construct {
-		get {
-			return this.vformalparam.construct_parameter;
-		}
-	}
-
-	public override string?# name {
-		get {
+	public string? name {
+		owned get {
 			return ( this.vformalparam.name == null )? "" : this.vformalparam.name;
 		}
 	}
@@ -2098,7 +2037,7 @@
 		if ( this.vformalparam.ellipsis )
 			return ;
 
-		((TypeHandler)this).set_type_references ( );
+		((ReturnTypeHandler)this).set_return_type_references ( );
 	}
 
 	public void write ( Langlet langlet, void* ptr ) {
@@ -2178,12 +2117,18 @@
 		}
 	}
 
+	public bool is_owned {
+		get {
+			return this.vpropacc.value_type.value_owned;
+		}
+	}
+
 	public void write ( Langlet langlet, void* ptr ) {
 		langlet.write_property_accessor ( this, ptr );
 	}
 }
 
-public class Valadoc.Property : Basic, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable {
+public class Valadoc.Property : DocumentedElement, SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable {
 	public Property ( Valadoc.Settings settings, Vala.Property vproperty, ContainerDataType parent, Tree head ) {
 		this.settings = settings;
 		this.vproperty = vproperty;
@@ -2203,7 +2148,7 @@
 		return this.vproperty.equals ( p.vproperty );
 	}
 
-	public TypeReference return_type {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -2255,8 +2200,8 @@
 		protected get;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.vproperty.name;
 		}
 	}
@@ -2292,7 +2237,7 @@
 			return ;
 		}
 
-		this.parse_comment_helper ( docparser, CommentContext.PROPERTY );
+		this.parse_comment_helper ( docparser );
 	}
 
 	public void visit ( Doclet doclet ) {
@@ -2309,29 +2254,28 @@
 
 
 
-public class Valadoc.Signal : Basic, ParameterListHandler, SymbolAccessibility,
+public class Valadoc.Signal : DocumentedElement, ParameterListHandler, SymbolAccessibility,
 							  ReturnTypeHandler, Visitable, Writeable
 {
 	public Signal ( Valadoc.Settings settings, Vala.Signal vsignal, ContainerDataType parent, Tree head ) {
+		this.param_list = new Gee.ArrayList<FormalParameter> ();
+
 		this.settings = settings;
 		this.vsignal = vsignal;
 		this.parent = parent;
 		this.head = head;
 	}
 
+	// internal
 	public bool is_vsignal ( Vala.Signal vsig ) {
 		return ( this.vsignal == vsig );
 	}
 
-	construct {
-		this.param_list = new Gee.ArrayList<FormalParameter> ();
-	}
-
 	public string? get_cname () {
 		return this.vsignal.get_cname();
 	}
 
-	public TypeReference return_type {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -2365,15 +2309,21 @@
 
 	// internal
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.SIGNAL );
+		this.parse_comment_helper ( docparser );
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.vsignal.name;
 		}
 	}
 
+	public bool is_virtual {
+		get {
+			return this.vsignal.is_virtual;
+		}
+	}
+
 	public void visit ( Doclet doclet ) {
 		if ( !this.is_visitor_accessible ( ) )
 			return ;
@@ -2388,16 +2338,21 @@
 
 
 
-public class Valadoc.Method : Basic, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler,
-								SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable
+public class Valadoc.Method : DocumentedElement, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler,
+                              SymbolAccessibility, ReturnTypeHandler, Visitable, Writeable
 {
 	public Method ( Valadoc.Settings settings, Vala.Method vmethod, MethodHandler parent, Tree head ) {
+		this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
+		this.param_list = new Gee.ArrayList<FormalParameter>();
+		this.err_domains = new Gee.ArrayList<TypeReference>();
+
 		this.settings = settings;
 		this.vmethod = vmethod;
 		this.parent = parent;
 		this.head = head;
 	}
 
+	// intern
 	public bool is_vmethod ( Vala.Method vm ) {
 		return ( this.vmethod == vm );
 	}
@@ -2406,18 +2361,12 @@
 		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 {
+	public Method? base_method {
 		private set;
 		get;
 	}
 
-	public TypeReference return_type {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -2432,14 +2381,14 @@
 		get;
 	}
 
-	public Gee.ArrayList<TypeReference> err_domains {
+	public Gee.ArrayList<DataType> err_domains {
 		protected set;
 		get;
 	}
 
 	// FIXME
-	public string?# comment_str {
-		get {
+	public string? comment_str {
+		owned get {
 			return this.vmethod.source_reference.comment;
 		}
 	}
@@ -2467,8 +2416,7 @@
 			return ;
 		}
 
-		// wrong context!
-		this.parse_comment_helper ( docparser, CommentContext.CLASS );
+		this.parse_comment_helper ( docparser );
 	}
 
 	// internal
@@ -2481,8 +2429,8 @@
 		var vparamlst = this.vmethod.get_parameters ();
 		this.add_parameter_list ( vparamlst );
 
-		var vexceptionlst = this.vmethod.get_error_types ();
-		this.add_error_domains ( vexceptionlst );
+		//var vexceptionlst = this.vmethod.get_error_types ();
+		//this.add_error_domains ( vexceptionlst );
 	}
 
 	public Vala.Method vmethod {
@@ -2523,18 +2471,6 @@
 		}
 	}
 
-	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 );
@@ -2547,13 +2483,13 @@
 		}
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			if ( this.is_constructor ) {
 				if ( this.vmethod.name == "new" )
-					return this.parent_name;
+					return ((DocumentedElement)this.parent).name;
 				else
-					return this.parent_name + "." + this.vmethod.name;
+					return ((DocumentedElement)this.parent).name + "." + this.vmethod.name;
 			}
 			else {
 				return this.vmethod.name;
@@ -2569,9 +2505,11 @@
 		}
 
 		this.set_return_type_references ( );
-
-		this.set_exception_type_references ( );
+//		this.set_exception_type_references ( );
 		this.set_parameter_list_type_references ( );
+
+		var vexceptionlst = this.vmethod.get_error_types ();
+		this.add_exception_list ( vexceptionlst );
 	}
 
 	public void visit ( Doclet doclet, Valadoc.MethodHandler in_type ) {
@@ -2587,7 +2525,7 @@
 }
 
 
-public class Valadoc.EnumValue: Basic, Writeable {
+public class Valadoc.EnumValue: DocumentedElement, Writeable {
 	public EnumValue ( Valadoc.Settings settings, Vala.EnumValue venval, Enum parent, Tree head ) {
 		this.settings = settings;
 		this.venval = venval;
@@ -2603,8 +2541,8 @@
 		this.vsymbol = venval;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.venval.name;
 		}
 	}
@@ -2615,7 +2553,7 @@
 	}
 
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE );
+		this.parse_comment_helper ( docparser );
 	}
 
 	public void write ( Langlet langlet, void* ptr ) {
@@ -2627,7 +2565,7 @@
 	}
 }
 
-public class Valadoc.ErrorCode : Basic, Writeable {
+public class Valadoc.ErrorCode : DocumentedElement, Writeable {
 	public ErrorCode ( Valadoc.Settings settings, Vala.ErrorCode verrcode, ErrorDomain parent, Tree head ) {
 		this.settings = settings;
 		this.verrcode = verrcode;
@@ -2644,8 +2582,8 @@
 		this.vsymbol = verrcode;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.verrcode.name;
 		}
 	}
@@ -2660,7 +2598,7 @@
 	}
 
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.ENUMVALUE );
+		this.parse_comment_helper ( docparser );
 	}
 
 	public void visit ( Doclet doclet ) {
@@ -2668,20 +2606,24 @@
 	}
 }
 
-public abstract class Valadoc.DataType: Basic, SymbolAccessibility, Visitable, Writeable {
-	public override string?# name {
-		get {
+
+
+public abstract class Valadoc.DataType: DocumentedElement, SymbolAccessibility, Visitable, Writeable {
+	public override string? name {
+		owned get {
 			return this.vsymbol.name;
 		}
 	}
 
-	// internal
+	// remove
 	public virtual void set_type_references ( ) {
 	}
 
+	// move to DocumentedElement
 	public virtual void visit ( Doclet doclet ) {
 	}
 
+	// Move to Basic; add a third parameter for "parent"
 	public virtual void write ( Langlet langlet, void* ptr ) {
 	}
 }
@@ -2692,6 +2634,10 @@
 																ReturnTypeHandler, TemplateParameterListHandler,
 																ExceptionHandler {
 	public Delegate ( Valadoc.Settings settings, Vala.Delegate vdelegate, DelegateHandler parent, Tree head ) {
+		this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
+		this.param_list = new Gee.ArrayList<FormalParameter>();
+		this.err_domains = new Gee.ArrayList<TypeReference>();
+
 		this.settings = settings;
 		this.vdelegate = vdelegate;
 		this.parent = parent;
@@ -2702,7 +2648,7 @@
 		return this.vdelegate.get_cname();
 	}
 
-	public TypeReference return_type {
+	public TypeReference? type_reference {
 		protected set;
 		get;
 	}
@@ -2724,7 +2670,7 @@
 		get;
 	}
 
-	protected Gee.ArrayList<TypeReference> err_domains {
+	protected Gee.ArrayList<DataType> err_domains {
 		protected set;
 		get;
 	}
@@ -2733,18 +2679,11 @@
 	public void initialisation ( ) {
 		this.vsymbol = this.vdelegate;
 
-		this.template_param_lst = new Gee.ArrayList<TypeParameter> ();
+		var ret = this.vdelegate.return_type;
+		this.set_ret_type ( ret );
 
 		var vparamlst = this.vdelegate.get_parameters ();
-		this.param_list = new Gee.ArrayList<FormalParameter> ();
 		this.add_parameter_list ( vparamlst );
-
-		var vexceptionlst = this.vdelegate.get_error_types ();
-		this.err_domains = new Gee.ArrayList<TypeReference>();
-		this.add_error_domains ( vexceptionlst );
-
-		var ret = this.vdelegate.return_type;
-		this.set_ret_type ( ret );
 	}
 
 	public Vala.Delegate vdelegate {
@@ -2760,14 +2699,16 @@
 
 	// internal
 	public override void set_type_references ( ) {
-		this.set_template_parameter_list_references ( );
-		this.set_parameter_list_type_references ( );
 		this.set_return_type_references ( );
+		this.set_parameter_list_type_references ( );
+
+		var vexceptionlst = this.vdelegate.get_error_types ();
+		this.add_exception_list ( vexceptionlst );
 	}
 
 	// internal
 	public void parse_comment ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.DELEGATE );
+		this.parse_comment_helper ( docparser );
 	}
 
 	// internal
@@ -2775,14 +2716,13 @@
 		return ( this.vdelegate == vdel );
 	}
 
+	// new parameter: DelegateHandler parent
 	public override void write ( Langlet langlet, void* ptr ) {
 		langlet.write_delegate ( this, ptr );
 	}
 }
 
-public abstract class Valadoc.ContainerDataType : DataType, MethodHandler, Visitable,
-												TemplateParameterListHandler
-{
+public abstract class Valadoc.ContainerDataType : DataType, MethodHandler, TemplateParameterListHandler {
 	protected Gee.ArrayList<DataType> parent_types = new Gee.ArrayList<DataType>();
 
 	construct {
@@ -2801,8 +2741,8 @@
 		get;
 	}
 
-	public string?# comment_str {
-		get {
+	public string? comment_str {
+		owned get {
 			return null;
 		}
 	}
@@ -2817,6 +2757,7 @@
 		return this.parent_types;
 	}
 
+	// remove
 	public bool derived_from_interface ( Interface iface ) {
 		foreach ( DataType dtype in this.parent_types ) {
 			if ( dtype == iface )
@@ -2825,7 +2766,6 @@
 		return false;
 	}
 
-	// rename, remove virtual
 	public virtual void parse_comments ( Valadoc.Parser docparser ) {
 		this.parse_method_comments ( docparser );
 	}
@@ -2835,13 +2775,10 @@
 			return ;
 
 		foreach ( Vala.DataType vtyperef in lst ) {
-			DataType? element = (DataType?)this.head.search_vala_symbol ( vtyperef.data_type );
+			ContainerDataType? element = (ContainerDataType?)this.head.search_vala_symbol ( vtyperef.data_type );
 			this.parent_types.add ( element );
-			if ( element is Class ) {
-				this.parent_class = (Class)element;
-			}
-			else if ( element is Struct ) {
-				this.parent_class = (Struct)element;
+			if ( element is Class || element is Struct ) {
+				this.parent_class = element;
 			}
 		}
 	}
@@ -2916,7 +2853,7 @@
 	}
 
 	// internal
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.Class == false )
@@ -2930,68 +2867,50 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.Field ) {
-			var element = this.search_field_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_field_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			var element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Delegate ) {
-			var element = this.search_delegate_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_delegate_vala ( params, pos );
 		}
 		else if ( velement is Vala.CreationMethod ) {
-			var element = this.search_construction_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_construction_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Signal ) {
-			var element = this.search_signal_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_signal_vala ( params, pos );
 		}
 		else if ( velement is Vala.Property ) {
-			var element = this.search_property_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_property_vala ( params, pos );
 		}
 		else if ( velement is Vala.Struct ) {
-			var element = this.search_struct_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_struct_vala ( params, pos );
 		}
 		else if ( velement is Vala.Class ) {
-			var element = this.search_class_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_class_vala ( params, pos );
 		}
 		else if ( velement is Vala.Enum ) {
-			var element = this.search_enum_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_enum_vala ( params, pos );
 		}
 		else if ( velement is Vala.Constant ) {
-			var element = this.search_constant_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_constant_vala ( params, pos );
 		}
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? 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 );
+		DocumentedElement? element = this.search_field ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -3084,8 +3003,8 @@
 		this.add_constants ( vconstants );
 	}
 
-	public string?# comment_str {
-		get {
+	public string? comment_str {
+		owned get {
 			return this.vclass.source_reference.comment;
 		}
 	}
@@ -3130,7 +3049,7 @@
 					this.documentation = this.parent_class.documentation;
 				}
 				else {
-					this.parse_comment_helper ( docparser, CommentContext.CLASS );
+					this.parse_comment_helper ( docparser );
 				}
 			}
 		}
@@ -3283,7 +3202,7 @@
 		return ( this.verrdom == ver );
 	}
 
-	private weak Basic? search_error_code ( string[] params, int pos ) {
+	private weak DocumentedElement? search_error_code ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -3296,7 +3215,7 @@
 		return null;
 	}
 
-	private weak Basic? search_error_code_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	private weak 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;
@@ -3312,7 +3231,7 @@
 		return null;
 	}
 
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.ErrorDomain == false )
@@ -3326,28 +3245,26 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.ErrorCode ) {
-			var element = this.search_error_code_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_error_code_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			var element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? 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 );
+		DocumentedElement? element = this.search_method ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -3360,7 +3277,7 @@
 
 	// internal
 	public void parse_comments ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.ERRORDOMAIN );
+		this.parse_comment_helper ( docparser );
 		this.parse_method_comments ( docparser );
 
 		foreach ( ErrorCode errcode in this.errcodes ) {
@@ -3426,7 +3343,7 @@
 		return this.venum.get_cname();
 	}
 
-	private weak Basic? search_enum_value_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	private weak 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;
@@ -3442,7 +3359,7 @@
 		return null;
 	}
 
-	private weak Basic? search_enum_value ( string[] params, int pos ) {
+	private weak DocumentedElement? search_enum_value ( string[] params, int pos ) {
 		pos++;
 
 		if ( params[pos+1] != null )
@@ -3455,7 +3372,7 @@
 		return null;
 	}
 
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.Enum == false )
@@ -3469,21 +3386,19 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.EnumValue ) {
-			var element = this.search_enum_value_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_enum_value_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			var element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? search_element ( string[] params, int pos ) {
 		if ( this.name != params[pos] )
 			return null;
 
@@ -3491,7 +3406,7 @@
 			return this;
 
 
-		var element = this.search_method ( params, pos );
+		DocumentedElement? element = this.search_method ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -3523,8 +3438,7 @@
 
 	// internal
 	public void parse_comments ( Valadoc.Parser docparser ) {
-		// CommentContext.ENUM
-		this.parse_comment_helper ( docparser, CommentContext.ENUM );
+		this.parse_comment_helper ( docparser );
 
 		foreach ( EnumValue enval in this.en_values ) {
 			enval.parse_comment ( docparser );
@@ -3610,7 +3524,7 @@
 		get;
 	}
 
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.Struct == false )
@@ -3624,39 +3538,33 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.Field ) {
-			var element = this.search_field_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_field_vala ( params, pos );
 		}
 		else if ( velement is Vala.CreationMethod ) {
-			var element = this.search_construction_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_construction_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			var element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Constant ) {
-			var element = this.search_constant_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_constant_vala ( params, pos );
 		}
 
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? 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 );
+		DocumentedElement? element = this.search_field ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -3692,8 +3600,8 @@
 	}
 
 	// TODO remove
-	public string?# comment_str {
-		get {
+	public string? comment_str {
+		owned get {
 			return this.vstruct.source_reference.comment;
 		}
 	}
@@ -3733,7 +3641,7 @@
 					this.documentation = this.parent_class.documentation;
 				}
 				else {
-					this.parse_comment_helper ( docparser, CommentContext.STRUCT );
+					this.parse_comment_helper ( docparser );
 				}
 			}
 		}
@@ -3809,7 +3717,7 @@
 		protected get;
 	}
 
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.Interface == false )
@@ -3823,58 +3731,44 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.Field ) {
-			var element = this.search_field_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_field_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			var element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Signal ) {
-			var element = this.search_signal_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_signal_vala ( params, pos );
 		}
 		else if ( velement is Vala.Property ) {
-			var element = this.search_property_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_property_vala ( params, pos );
 		}
 		else if ( velement is Vala.Delegate ) {
-			var element = this.search_delegate_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_delegate_vala ( params, pos );
 		}
 		else if ( velement is Vala.Struct ) {
-			var element = this.search_struct_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_struct_vala ( params, pos );
 		}
 		else if ( velement is Vala.Enum ) {
-			var element = this.search_enum_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_enum_vala ( params, pos );
 		}
 		else if ( velement is Vala.Class ) {
-			var element = this.search_class_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_class_vala ( params, pos );
 		}
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? 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 );
+		DocumentedElement? element = this.search_field ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -3949,8 +3843,8 @@
 		this.add_enums ( enums );
 	}
 
-	public string?# comment_str {
-		get {
+	public string? comment_str {
+		owned get {
 			return this.vinterface.source_reference.comment;
 		}
 	}
@@ -3973,7 +3867,7 @@
 
 	// internal
 	public override void parse_comments ( Valadoc.Parser docparser ) {
-		this.parse_comment_helper ( docparser, CommentContext.INTERFACE );
+		this.parse_comment_helper ( docparser );
 		this.parse_delegate_comments ( docparser );
 		this.parse_property_comments ( docparser );
 		this.parse_signal_comments ( docparser );
@@ -4001,7 +3895,7 @@
 	}
 }
 
-public class Valadoc.Namespace : Basic, MethodHandler, FieldHandler, NamespaceHandler, ErrorDomainHandler,
+public class Valadoc.Namespace : DocumentedElement, MethodHandler, FieldHandler, NamespaceHandler, ErrorDomainHandler,
                                  EnumHandler, ClassHandler, StructHandler, Writeable, InterfaceHandler,
                                  DelegateHandler, ConstantHandler
 {
@@ -4060,9 +3954,9 @@
 	}
 
 	// interface
-	private weak Basic? search_namespace ( string[] params, int pos ) {
+	private weak DocumentedElement? search_namespace ( string[] params, int pos ) {
 		foreach ( Namespace ns in this.namespaces ) {
-			Basic element = ns.search_element ( params, pos+1 );
+			DocumentedElement? element = ns.search_element ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
@@ -4070,16 +3964,16 @@
 	}
 
 	//interface
-	private weak Basic? search_namespace_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	private weak DocumentedElement? search_namespace_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Namespace ns in this.namespaces ) {
-			Basic element = ns.search_element_vala ( params, pos+1 );
+			DocumentedElement? element = ns.search_element_vala ( params, pos+1 );
 			if ( element != null )
 				return element;
 		}
 		return null;
 	}
 
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		Vala.Symbol velement = params[pos];
 
 		if ( velement is Vala.Namespace == false )
@@ -4093,61 +3987,43 @@
 
 		velement = params[pos+1];
 
+		DocumentedElement? element = null;
+
 		if ( velement is Vala.Namespace ) {
-			Basic element = this.search_namespace_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_namespace_vala ( params, pos );
 		}
 		else if ( velement is Vala.Class ) {
-			Basic element = this.search_class_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_class_vala ( params, pos );
 		}
 		else if ( velement is Vala.Interface ) {
-			Basic element = this.search_interface_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_interface_vala ( params, pos );
 		}
 		else if ( velement is Vala.Struct ) {
-			Basic element = this.search_struct_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_struct_vala ( params, pos );
 		}
 		else if ( velement is Vala.Enum ) {
-			Basic element = this.search_enum_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_enum_vala ( params, pos );
 		}
 		else if ( velement is Vala.ErrorDomain ) {
-			Basic element = this.search_error_domain_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_error_domain_vala ( params, pos );
 		}
 		else if ( velement is Vala.Method ) {
-			Basic element = this.search_method_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_method_vala ( params, pos );
 		}
 		else if ( velement is Vala.Field ) {
-			Basic element = this.search_field_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_field_vala ( params, pos );
 		}
 		else if ( velement is Vala.DelegateType || velement is Vala.Delegate ) {
-			Basic element = this.search_delegate_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_delegate_vala ( params, pos );
 		}
 		else if ( velement is Vala.Constant ) {
-			Basic element = this.search_constant_vala ( params, pos );
-			if ( element != null )
-				return element;
+			element = this.search_constant_vala ( params, pos );
 		}
-		return null;
+		return element;
 	}
 
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? search_element ( string[] params, int pos ) {
 		if ( this.name != params[pos] )
 			return null;
 
@@ -4155,7 +4031,7 @@
 			return this;
 
 
-		Basic element = this.search_namespace ( params, pos );
+		DocumentedElement? element = this.search_namespace ( params, pos );
 		if ( element != null )
 			return element;
 
@@ -4224,8 +4100,8 @@
 		private get;
 	}
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return this.vnspace.name;
 		}
 	}
@@ -4254,7 +4130,7 @@
 
 	// internal
 	public void parse_comments ( Valadoc.Parser docparser ) {
-		//this.parse_comment_helper ( docparser, CommentContext.NAMESPACE );
+		//this.parse_comment_helper ( docparser );
 
 		this.parse_enum_comments ( docparser );
 		this.parse_field_comments ( docparser );
@@ -4279,7 +4155,7 @@
 }
 
 
-public class Valadoc.Package : Basic, NamespaceHandler {
+public class Valadoc.Package : DocumentedElement, NamespaceHandler {
 	private Gee.ArrayList<Vala.SourceFile> vfiles = new Gee.ArrayList<Vala.SourceFile> ();
 
 	// internal
@@ -4292,12 +4168,7 @@
 		private set;
 		private get;
 	}
-/*
-	public bool is_external_package {
-		 /+ internal +/ set;
-		 get;
-	}
-*/
+
 	public bool is_package {
 		 private set;
 		 get;
@@ -4310,24 +4181,6 @@
 
 	private Gee.ArrayList<Package> _dependencies;
 
-	// internal remove
-	public bool is_dependency ( Package dep ) {
-		if ( dep == this )
-			return false;
-
-		foreach ( Package pkg in this._dependencies ) {
-			if ( pkg == dep ) {
-				return true;
-			}
-
-			bool tmp = pkg.is_dependency ( dep );
-			if ( tmp == true ) {
-				return true;
-			}
-		}
-		return false;
-	}
-
 	public Gee.ReadOnlyCollection<Package> get_full_dependency_list () {
 		Gee.ArrayList<Package> list = new Gee.ArrayList<Package> ();
 
@@ -4379,6 +4232,7 @@
 		this.package_name = name;
 
 		this.vfiles.add ( vfile );
+		this.parent = null;
 	}
 
 	public Package ( Valadoc.Settings settings, Vala.SourceFile vfile, Tree head, bool is_package = false ) {
@@ -4387,23 +4241,16 @@
 
 	private string package_name;
 
-	public override string?# name {
-		get {
+	public override string? name {
+		owned get {
 			return package_name;
 		}
 	}
 
-/*
-	public Vala.SourceFile vfile {
-		construct set;
-		private get;
-	}
-*/
-
 	// internal
-	public override weak Basic? search_element ( string[] params, int pos ) {
+	public override weak DocumentedElement? search_element ( string[] params, int pos ) {
 		foreach ( Namespace ns in this.namespaces ) {
-			Basic element = ns.search_element ( params, pos );
+			DocumentedElement? element = ns.search_element ( params, pos );
 			if ( element != null )
 				return element;
 		}
@@ -4411,9 +4258,9 @@
 	}
 
 	// internal
-	public override weak Basic? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
+	public override weak DocumentedElement? search_element_vala ( Gee.ArrayList<Vala.Symbol> params, int pos ) {
 		foreach ( Namespace ns in this.namespaces ) {
-			Basic element = ns.search_element_vala ( params, pos );
+			DocumentedElement? element = ns.search_element_vala ( params, pos );
 			if ( element != null )
 				return element;
 		}
@@ -4459,16 +4306,19 @@
 
 
 public class Valadoc.Tree : Vala.CodeVisitor {
-	private Gee.ArrayList<Package> files = new Gee.ArrayList<Package>();
+	private Gee.ArrayList<Package> packages = new Gee.ArrayList<Package>();
+
+	public Gee.ReadOnlyCollection<Package> get_package_list () {
+		return new Gee.ReadOnlyCollection<Package> ( this.packages );
+	}
 
 	private Valadoc.Settings settings;
 
 	public Tree (	Valadoc.Settings settings,
 					bool non_null_experimental,
-					bool disable_non_null,
 					bool disable_checking,
-					string basedir,
-					string directory )
+					string? basedir,
+					string? directory )
 	{
 		this.context = new Vala.CodeContext ( );
 		this.settings = settings;
@@ -4484,7 +4334,7 @@
 			this.context.directory = context.basedir;
 		}
 
-		this.context.non_null = !disable_non_null || non_null_experimental;
+//		this.context.non_null = !disable_non_null || non_null_experimental;
 		this.context.non_null_experimental = non_null_experimental;
 		this.context.checking = !disable_checking;
 
@@ -4506,7 +4356,7 @@
 	private void add_dependencies_to_source_package () {
 		if ( this.source_package != null ) {
 			Gee.ArrayList<Package> deplst = new Gee.ArrayList<Package> ();
-			foreach ( Package pkg in this.files ) {
+			foreach ( Package pkg in this.packages ) {
 				if ( pkg != this.source_package ) {
 					deplst.add ( pkg );
 				}
@@ -4532,7 +4382,6 @@
 			vfile = new Vala.SourceFile (this.context, source, false);
 			vfile.add_using_directive (new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null)));
 			this.context.add_source_file ( vfile );
-
 		}
 		else if ( path.has_suffix ( ".vapi" ) ) {
 			vfile = new Vala.SourceFile ( this.context, source, true );
@@ -4544,7 +4393,7 @@
 
 		if ( this.source_package == null ) {
 			this.source_package = new Package.with_name ( this.settings, vfile, this.settings.pkg_name, this );
-			this.files.add ( this.source_package );
+			this.packages.add ( this.source_package );
 		}
 
 		this.source_package.add_file ( vfile );
@@ -4569,7 +4418,7 @@
 
 
 		Package vdpkg = new Package ( this.settings, vfile, this, true ); 
-		this.files.add ( vdpkg );
+		this.packages.add ( vdpkg );
 
 
 		var deps_filename = Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg));
@@ -4606,17 +4455,10 @@
 	private CodeContext context;
 
 	public void visit ( Doclet doclet ) {
-		foreach ( Package file in this.files ) {
-			file.visit ( doclet );
-		}
+		doclet.initialisation ( this.settings, this );
 	}
 
-/*
-	private weak Basic?  search_symbol_in_namespace ( Basic element, string[] params ) {
-		return this.search_symbol_in_symbol ( element.nspace, params );
-	}
-*/
-	private weak Basic? search_symbol_in_type ( Basic element, string[] params, int params_offset = 0 ) {
+	private weak 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;
 
@@ -4626,13 +4468,13 @@
 			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 ( (DocumentedElement)element.parent, nparams, 0 );
 		}
 
-		return this.search_symbol_in_symbol ( element.parent, params, 0 );
+		return this.search_symbol_in_symbol ( (DocumentedElement)element.parent, params, 0 );
 	}
 
-	private weak Basic? search_symbol_in_symbol ( Basic element, string[] params, int params_offset = 0 ) {
+	private weak 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 );
 		}
@@ -4645,7 +4487,7 @@
 		return null;
 	}
 
-	private weak Basic? search_symbol_in_global_namespaces ( Basic? element, string[] params ) {
+	private weak DocumentedElement? search_symbol_in_global_namespaces ( DocumentedElement? element, string[] params ) {
 		int param_size = 0;
 		for ( param_size = 0; params[param_size] != null; param_size++ );
 
@@ -4656,24 +4498,24 @@
 			global_params[i+1] = params[i];
 		}
 
-		foreach ( Package f in this.files ) {
-			Basic element = f.search_element ( global_params, 0 );
+		foreach ( Package pkg in this.packages ) {
+			DocumentedElement? element = pkg.search_element ( global_params, 0 );
 			if ( element != null )
 				return element;
 		}
 		return null;
 	}
 
-	private weak Basic? search_symbol_in_namespaces ( Basic element, string[] params ) {
-		foreach ( Package f in this.files ) {
-			Basic element = f.search_element ( params, 0 );
+	private weak 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;
 		}
 		return null;
 	}
 
-	private weak Basic? search_element ( Basic? element, string[] params ) {
+	private weak DocumentedElement? search_element ( DocumentedElement? element, string[] params ) {
 		if ( element != null ) {
 			if ( params[0] == "this" ) {
 				return search_symbol_in_type ( element, params, 1 );
@@ -4696,7 +4538,7 @@
 		return null;
 	}
 
-	public weak Basic? search_symbol_str ( Valadoc.Basic? element, string symname ) {
+	public weak DocumentedElement? search_symbol_str ( DocumentedElement? element, string symname ) {
 		string[] params = symname.split( ".", -1 );
 		int i = 0; while ( params[i] != null ) i++;
 		params.length = i;
@@ -4835,33 +4677,33 @@
 
 	// internal
 	public Package? find_file ( Vala.SourceFile vfile ) {
-		foreach ( Package f in this.files ) {
-			if ( f.is_vpackage( vfile ) )
-				return f;
+		foreach ( Package pkg in this.packages ) {
+			if ( pkg.is_vpackage( vfile ) )
+				return pkg;
 		}
 		return null;
 	}
 
 	private void set_type_references ( ) {
-		foreach ( Package f in this.files ) {
-			f.set_type_references( );
+		foreach ( Package pkg in this.packages ) {
+			pkg.set_type_references( );
 		}
 	}
 
 	private void inheritance ( ) {
-		foreach ( Package f in this.files ) {
-			f.inheritance( );
+		foreach ( Package pkg in this.packages ) {
+			pkg.inheritance( );
 		}
 	}
 
 	public void parse_comments ( Valadoc.Parser docparser ) {
-		foreach ( Package f in this.files ) {
-			f.parse_comments( docparser );
+		foreach ( Package pkg in this.packages ) {
+			pkg.parse_comments( docparser );
 		}
 	}
 
 	// internal
-	public weak Basic? search_vala_symbol ( Vala.Symbol vnode ) {
+	public weak DocumentedElement? search_vala_symbol ( Vala.Symbol? vnode ) {
 		if ( vnode == null )
 			return null;
 
@@ -4888,66 +4730,8 @@
 		return file.search_element_vala ( params, 0 );
 	}
 
-	/*/ => add_external_package
-	private Gee.ArrayList<Package>? load_dependency_list ( string vapi_path ) {
-		if ( vapi_path.has_suffix ( ".vapi" ) ) {
-			string deps_filename = vapi_path.ndup ( vapi_path.size() - ".vapi".size() ) + ".deps";
-			Gee.ArrayList<Package> list = new Gee.ArrayList<Package> ();
-
-			if (FileUtils.test (deps_filename, FileTest.EXISTS)) {
-				try {
-					string deps_content;
-					ulong deps_len;
-
-					FileUtils.get_contents (deps_filename, out deps_content, out deps_len);
-					foreach (string dep in deps_content.split ("\n")) {
-						if (dep != "") {
-							foreach ( Package pkg in this.files ) {
-								if ( pkg.name == dep ) {
-									list.add ( pkg );
-									continue ;
-								}
-							}
-						}
-					}
-				}
-				catch (FileError e) {
-					Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-				}
-			}
-			return list;
-		}
-		return null;
-	}
-*/
-//	private Gee.ArrayList<weak Vala.SourceFile> vfiles = new Gee.ArrayList<weak Vala.SourceFile> ();
-
-/*
-	private void add_dependencies () {
-		foreach ( weak Vala.SourceFile vfile in this.vfiles ) {
-			Gee.ArrayList<Package>? deps = this.load_dependency_list ( vfile.filename );
-			if ( deps != null ) {
-				Package pkg = this.get_file ( vfile );
-				pkg.set_dependency_list ( deps );
-			}
-		}
-
-		if ( this.source_package != null ) {
-			Gee.ArrayList<Package> list = new Gee.ArrayList<Package> ();
-			foreach ( Package pkg in this.files ) {
-				if ( pkg != this.source_package ) {
-					list.add ( pkg );
-				}
-			}
-			this.source_package.set_dependency_list ( list );
-		}
-
-		this.source_package = null;
-		this.vfiles = null;
-	}
-*/
 	private Package? get_external_package_by_name ( string name ) {
-		foreach ( Package pkg in this.files ) {
+		foreach ( Package pkg in this.packages ) {
 			if ( name == pkg.name ) {
 				return pkg;
 			}
@@ -4955,15 +4739,5 @@
 		return null;
 	}
 
-	/*/ internal, deprecated
-	public Package? get_file ( Vala.SourceFile vfile ) {
-		Package file = this.find_file( vfile );
-		if ( file != null )
-			return file;
-
-		Package tmp = new Package ( this.settings, vfile, this ); 
-		this.files.add ( tmp );
-		return tmp;
-	} */
 }
 

Modified: trunk/src/libvaladoc/parser.vala
==============================================================================
--- trunk/src/libvaladoc/parser.vala	(original)
+++ trunk/src/libvaladoc/parser.vala	Wed Jan 14 00:57:23 2009
@@ -37,12 +37,12 @@
 }
 
 public abstract class InlineTaglet : Taglet {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, string content, out string[] errmsg );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, string content, out string[] errmsg );
 	public abstract string to_string ( );
 }
 
 public abstract class MainTaglet : Taglet {
-	protected string? get_data_type ( Basic me ) {
+	protected string? get_data_type ( DocumentedElement me ) {
 		if ( me is Valadoc.Class )
 			return "class";
 		if ( me is Valadoc.Delegate )
@@ -74,7 +74,7 @@
 	}
 
 	public virtual int order { get { return 0; } }
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.Collection<DocElement> content, out string[] errmsg );
 	public abstract bool write_block_start ( void* res );
 	public abstract bool write_block_end ( void* res );
 }
@@ -84,7 +84,7 @@
 		set; get;
 	}
 
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, string content );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, string content );
 }
 
 public enum ImageDocElementPosition {
@@ -106,32 +106,32 @@
 }
 
 public abstract class ImageDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, string# path, ImageDocElementPosition pos );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, string# path, ImageDocElementPosition pos );
 }
 
 public abstract class LinkDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, string# link, Gee.ArrayList<DocElement>? desc );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, string# link, Gee.ArrayList<DocElement>? desc );
 }
 
 public abstract class SourceCodeDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, string# src, Language lang );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, string# src, Language lang );
 }
 
 public abstract class ListEntryDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, ListType type, Gee.ArrayList<DocElement> content );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, ListType type, Gee.ArrayList<DocElement> content );
 }
 
 public abstract class ListDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, ListType type, Gee.ArrayList<ListEntryDocElement> entries );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, ListType type, Gee.ArrayList<ListEntryDocElement> entries );
 }
 
 public abstract class NotificationDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content );
 }
 
 
 public abstract class HighlightedDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content );
 }
 
 public abstract class ItalicDocElement : HighlightedDocElement {
@@ -144,7 +144,7 @@
 }
 
 public abstract class ContentPositionDocElement : DocElement {
-	public abstract bool parse ( Settings settings, Tree tree, Basic me, Gee.ArrayList<DocElement> content );
+	public abstract bool parse ( Settings settings, Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content );
 }
 
 public abstract class CenterDocElement : ContentPositionDocElement {
@@ -169,7 +169,7 @@
 
 
 public abstract class TableCellDocElement : DocElement {
-	public abstract void parse ( Settings settings, Tree tree, Basic me, TextPosition pos, TextVerticalPosition hpos, int size, int dsize, Gee.ArrayList<DocElement> content );
+	public abstract void parse ( Settings settings, Tree tree, DocumentedElement me, TextPosition pos, TextVerticalPosition hpos, int size, int dsize, Gee.ArrayList<DocElement> content );
 }
 
 public abstract class TableDocElement : DocElement {
@@ -340,7 +340,6 @@
 	private Module docletmodule;
 	private Type doclettype;
 
-
 	public bool load ( string path ) {
 		bool tmp = this.load_doclet ( path );
 		if ( tmp == false )
@@ -349,7 +348,7 @@
 		return this.load_taglets ( path );
 	}
 
-	public bool load_doclet ( string path ) {
+	private bool load_doclet ( string path ) {
 		void* function;
 
 		docletmodule = Module.open ( path + "/libdoclet.so", ModuleFlags.BIND_LAZY);
@@ -368,7 +367,7 @@
 		return true;
 	}
 
-	public bool load_taglets ( string fulldirpath ) {
+	private bool load_taglets ( string fulldirpath ) {
 		try {
 			taglets = new Gee.HashMap<string, Type> ( GLib.str_hash, GLib.str_equal );
 			Gee.ArrayList<Module*> modules = new Gee.ArrayList<weak Module*> ( );
@@ -384,7 +383,6 @@
 
 				Module* module = Module.open ( tagletpath, ModuleFlags.BIND_LAZY);
 				if (module == null) {
-					stderr.printf ( "Can't load plugin.\n" );
 					taglets = null;
 					return false;
 				}
@@ -445,7 +443,6 @@
 			return true;
 		}
 		catch ( FileError err ) {
-			stderr.printf ( "Can't load plugin.\n" );
 			taglets = null;
 			return false;
 		}
@@ -466,7 +463,7 @@
 	private int line;
 	private int pos;
 
-	private weak string filename;
+	private string filename;
 	private weak string str;
 	private bool run;
 
@@ -617,7 +614,7 @@
 		}
 	}
 
-	private void parse_inline_taglet ( Tree tree, Basic me, string content, InlineTaglet taglet, int namelen, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
+	private void parse_inline_taglet ( Tree tree, DocumentedElement me, string content, InlineTaglet taglet, int namelen, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
 		string[] errmsgs;
 
 		bool tmp = taglet.parse ( settings, tree, me, content, out errmsgs );
@@ -626,7 +623,7 @@
 		}
 	}
 
-	private void parse_main_taglet ( Tree tree, Basic me, Gee.ArrayList<DocElement> content, MainTaglet taglet, int namelen, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
+	private void parse_main_taglet ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content, MainTaglet taglet, int namelen, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
 		string[] errmsgs;
 
 		bool tmp = taglet.parse ( settings, tree, me, content, out errmsgs );
@@ -635,7 +632,7 @@
 		}
 	}
 
-	private void append_main_taglet ( Tree tree, DocumentationTree dtree, Basic me, MainTaglet? curtag, int paragraph, string? curtagname, Gee.ArrayList<DocElement> content, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
+	private void append_main_taglet ( Tree tree, DocumentationTree dtree, DocumentedElement me, MainTaglet? curtag, int paragraph, string? curtagname, Gee.ArrayList<DocElement> content, int starttag_linestartpos, int starttag_startpos, int starttag_line, int starttag_pos ) {
 		if ( curtag == null ) {
 			dtree.add_description ( content );
 		}
@@ -645,14 +642,14 @@
 		}
 	}
 
-	private StringTaglet create_string_taglet ( Tree tree, Basic? me, GLib.StringBuilder buf ) {
+	private StringTaglet create_string_taglet ( Tree tree, DocumentedElement? me, GLib.StringBuilder buf ) {
 		StringTaglet strtag = (StringTaglet)GLib.Object.new ( this.modules.strtag );
 		strtag.parse ( settings, tree, me, buf.str );
 		buf.erase ( 0, -1 );
 		return strtag;
 	}
 
-	private void append_and_create_string_taglet ( Gee.ArrayList<DocElement> content, Tree tree, Basic? me, GLib.StringBuilder buf ) {
+	private void append_and_create_string_taglet ( Gee.ArrayList<DocElement> content, Tree tree, DocumentedElement? me, GLib.StringBuilder buf ) {
 		if ( buf.len == 0 )
 			return ;
 
@@ -692,7 +689,7 @@
 		return (int)offset;
 	}
 
-	private void parse_inline_taglets ( Tree tree, Basic me, Gee.ArrayList<DocElement> elements ) {
+	private void parse_inline_taglets ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> elements ) {
 		this.pos++;
 
 		for ( unichar chr = this.str[this.pos]; ; chr = this.str[++this.pos] ) {
@@ -775,7 +772,7 @@
 		return ( str[this.pos] == '\n' );
 	}
 
-	private int parse_list_entry ( Tree tree, Basic me, ListType type, Gee.ArrayList<ListEntryDocElement> entries, GLib.Queue<int> queue, int deep, int prevdeep ) {
+	private int parse_list_entry ( Tree tree, DocumentedElement me, ListType type, Gee.ArrayList<ListEntryDocElement> entries, GLib.Queue<int> queue, int deep, int prevdeep ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 
@@ -908,7 +905,7 @@
 		return -2;
 	}
 
-	private int parse_list ( Tree tree, Basic me, ListType listtype, Gee.ArrayList<DocElement> content, GLib.Queue<int> stack, int deep, int prevdeep ) {
+	private int parse_list ( Tree tree, DocumentedElement me, ListType listtype, Gee.ArrayList<DocElement> content, GLib.Queue<int> stack, int deep, int prevdeep ) {
 		Gee.ArrayList<ListEntryDocElement> entries = new Gee.ArrayList<ListEntryDocElement> ();
 		unichar chr = this.str[this.pos];
 		int ndeep = -1;
@@ -1040,7 +1037,7 @@
 
 	
 
-	private bool parse_row ( Tree tree, Basic me, Gee.ArrayList<Gee.ArrayList<TableCellDocElement>> rows ) {
+	private bool parse_row ( Tree tree, DocumentedElement me, Gee.ArrayList<Gee.ArrayList<TableCellDocElement>> rows ) {
 		Gee.ArrayList<TableCellDocElement> row = new Gee.ArrayList<TableCellDocElement> ();
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
@@ -1126,7 +1123,7 @@
 		return false;
 	}
 
-	private void parse_table ( Tree tree, Basic me, Gee.ArrayList<DocElement> content ) {
+	private void parse_table ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content ) {
 		Gee.ArrayList<Gee.ArrayList<TableCellDocElement>> rows = new Gee.ArrayList<Gee.ArrayList<TableCellDocElement>> ();
 		bool next = true;
 		this.pos++;
@@ -1140,19 +1137,19 @@
 		content.add ( table );
 	}
 
-	private void parse_italic_content ( Tree tree, Basic me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
+	private void parse_italic_content ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
 		this.parse_highlighted_content ( tree, me, this.modules.italictag, '/', content, newline );
 	}
 
-	private void parse_bold_content ( Tree tree, Basic me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
+	private void parse_bold_content ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
 		this.parse_highlighted_content ( tree, me, this.modules.boldtag, '+', content, newline );
 	}
 
-	private void parse_underlined_content ( Tree tree, Basic me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
+	private void parse_underlined_content ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content, bool newline = true  ) {
 		this.parse_highlighted_content ( tree, me, this.modules.underlinedtag, '_', content, newline );
 	}
 
-	private void parse_highlighted_content ( Tree tree, Basic me, GLib.Type tagtype, unichar separator, Gee.ArrayList<DocElement> content2, bool newline = true  ) {
+	private void parse_highlighted_content ( Tree tree, DocumentedElement me, GLib.Type tagtype, unichar separator, Gee.ArrayList<DocElement> content2, bool newline = true  ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 		int starttag_linestartpos = this.linestartpos;
@@ -1267,7 +1264,7 @@
 		this.run = false;
 	}
 
-	private void parse_notification ( Tree tree, Basic me, Gee.ArrayList<DocElement> content2 ) {
+	private void parse_notification ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> content2 ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 		int starttag_linestartpos = this.linestartpos;
@@ -1382,7 +1379,7 @@
 		this.run = false;
 	}
 
-	private void parse_content_position ( Tree tree, Basic me, GLib.Type postagtype, Gee.ArrayList<DocElement> content2 ) {
+	private void parse_content_position ( Tree tree, DocumentedElement me, GLib.Type postagtype, Gee.ArrayList<DocElement> content2 ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 		this.pos = this.pos + 3;
@@ -1496,7 +1493,7 @@
 		this.run = false;
 	}
 
-	private void parse_brief_description ( Tree tree, Basic me, DocumentationTree dtree ) {
+	private void parse_brief_description ( Tree tree, DocumentedElement me, DocumentationTree dtree ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 
@@ -1529,7 +1526,7 @@
 		this.run = false;
 	}
 
-	public DocumentationTree? parse ( Tree tree, Basic me, string str ) {
+	public DocumentationTree? parse ( Tree tree, DocumentedElement me, string str ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ( );
 		DocumentationTree dtree = new DocumentationTree ();
@@ -1715,7 +1712,7 @@
 		return dtree;
 	}
 
-	private void parse_source_code ( Tree tree, Basic me, Gee.ArrayList<DocElement> elements ) {
+	private void parse_source_code ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> elements ) {
 		GLib.StringBuilder buf = new GLib.StringBuilder ();	
 		Language lang = Language.VALA;
 		int startpos = this.pos;
@@ -1793,7 +1790,7 @@
 		return ImageDocElementPosition.NEUTRAL;
 	}
 
-	private void parse_image ( Tree tree, Basic me, Gee.ArrayList<DocElement> elements ) {
+	private void parse_image ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> elements ) {
 		GLib.StringBuilder buf = new GLib.StringBuilder ();
 		ImageDocElementPosition imgpos = ImageDocElementPosition.NEUTRAL;
 		int startpos = this.pos;
@@ -1841,7 +1838,7 @@
 		return false;
 	}
 
-	private Gee.ArrayList<DocElement>? parse_link_text ( Tree tree, Basic me, int startpos ) {
+	private Gee.ArrayList<DocElement>? parse_link_text ( Tree tree, DocumentedElement me, int startpos ) {
 		Gee.ArrayList<DocElement> content = new Gee.ArrayList<DocElement> ();
 		GLib.StringBuilder buf = new GLib.StringBuilder ();
 		int separatorpos = ++this.pos;
@@ -1903,7 +1900,7 @@
 		return null;
 	}
 
-	private void parse_link ( Tree tree, Basic me, Gee.ArrayList<DocElement> elements ) {
+	private void parse_link ( Tree tree, DocumentedElement me, Gee.ArrayList<DocElement> elements ) {
 		GLib.StringBuilder buf = new GLib.StringBuilder ();
 		int startpos = this.pos;
 		this.pos = this.pos+2;

Modified: trunk/src/libvaladoc/settings.vala
==============================================================================
--- trunk/src/libvaladoc/settings.vala	(original)
+++ trunk/src/libvaladoc/settings.vala	Wed Jan 14 00:57:23 2009
@@ -30,6 +30,8 @@
 	public bool with_deps = false;
 	public bool add_inherited = false;
 
+
+	// remove
 	public string get_real_path () {
 		if ( rpath == null ) {
 			string path = realpath ( this.path );

Modified: trunk/src/valadoc/Makefile.am
==============================================================================
--- trunk/src/valadoc/Makefile.am	(original)
+++ trunk/src/valadoc/Makefile.am	Wed Jan 14 00:57:23 2009
@@ -41,7 +41,7 @@
 
 
 valadoc.vala.stamp: $(libvaladoc_VALASOURCES)
-	$(VALAC) -C --pkg gmodule-2.0 --pkg config --vapidir ../vapi --pkg valadoc-1.0 --basedir $(top_srcdir)/src/valadoc/ valadoc.vala --disable-non-null --save-temps $^
+	$(VALAC) -C --pkg gmodule-2.0 --pkg config --vapidir ../vapi --pkg valadoc-1.0 --basedir $(top_srcdir)/src/valadoc/ valadoc.vala --save-temps $^
 	touch $@
 
 EXTRA_DIST = $(valadoc_VALASOURCES)  valadoc.vala.stamp 

Modified: trunk/src/valadoc/valadoc.vala
==============================================================================
--- trunk/src/valadoc/valadoc.vala	(original)
+++ trunk/src/valadoc/valadoc.vala	Wed Jan 14 00:57:23 2009
@@ -44,35 +44,36 @@
 	private static string pluginpath;
 
 	private static bool non_null_experimental = false;
-	private static bool disable_non_null = false;
 	private static bool disable_checking;
 	private static bool force = false;
 
 
+	[CCode (array_length = false, array_null_terminated = true)]
 	[NoArrayLength ()]
 	private static string[] vapi_directories;
+	[CCode (array_length = false, array_null_terminated = true)]
 	[NoArrayLength ()]
-	private static weak string[] tsources;
+	private static string[] tsources;
+	[CCode (array_length = false, array_null_terminated = true)]
 	[NoArrayLength ()]
-	private static weak string[] tpackages;
+	private static string[] tpackages;
 
 	private const GLib.OptionEntry[] options = {
-		{ "vapidir", 0, 0, OptionArg.FILENAME_ARRAY, out vapi_directories,
+		{ "vapidir", 0, 0, OptionArg.FILENAME_ARRAY, ref vapi_directories,
 			"Look for package bindings in DIRECTORY", "DIRECTORY..." },
-		{ "pkg", 0, 0, OptionArg.STRING_ARRAY, out tpackages, "Include binding for PACKAGE", "PACKAGE..." },
-		{ "directory", 'o', 0, OptionArg.FILENAME, out directory, "Output directory", "DIRECTORY" },
+		{ "pkg", 0, 0, OptionArg.STRING_ARRAY, ref tpackages, "Include binding for PACKAGE", "PACKAGE..." },
+		{ "directory", 'o', 0, OptionArg.FILENAME, ref directory, "Output directory", "DIRECTORY" },
 		{ "protected", 0, 0, OptionArg.NONE, ref _protected, "Adds protected elements to documentation", null },
 		{ "private", 0, 0, OptionArg.NONE, ref _private, "Adds private elements to documentation", null },
 		{ "inherit", 0, 0, OptionArg.NONE, ref add_inherited, "Adds inherited elements to a class", null },
 		{ "deps", 0, 0, OptionArg.NONE, ref with_deps, "Adds packages to the documentation", null },
-		{ "disable-non-null", 0, 0, OptionArg.NONE, ref disable_non_null, "Disable non-null types", null },
 		{ "enable-non-null-experimental", 0, 0, OptionArg.NONE, ref non_null_experimental,
-				"Enable experimentalenhancements for non-null types", null },
-		{ "", 0, 0, OptionArg.FILENAME_ARRAY, out tsources, null, "FILE..." },
+			"Enable experimentalenhancements for non-null types", null },
 		{ "doclet", 0, 0, OptionArg.FILENAME, ref pluginpath, "plugin", "DIRECTORY" },
 		{ "package-name", 0, 0, OptionArg.STRING, ref pkg_name, "package name", "DIRECTORY" },
 		{ "package-version", 0, 0, OptionArg.STRING, ref pkg_version, "package version", "DIRECTORY" },
 		{ "force", 0, 0, OptionArg.NONE, ref force, "force", null },
+		{ "", 0, 0, OptionArg.FILENAME_ARRAY, ref tsources, null, "FILE..." },
 		{ null }
 	};
 
@@ -137,7 +138,7 @@
 
 		Valadoc.Parser docparser = new Valadoc.Parser ( settings, reporter, modules );
 
-		Valadoc.Tree doctree = new Valadoc.Tree ( settings, non_null_experimental, disable_non_null, disable_checking, basedir, directory );
+		Valadoc.Tree doctree = new Valadoc.Tree ( settings, non_null_experimental, disable_checking, basedir, directory );
 
 		if (!doctree.add_external_package ( vapi_directories, "glib-2.0" )) {
 			Report.error (null, "glib-2.0 not found in specified Vala API directories" );
@@ -159,14 +160,14 @@
 			this.tpackages = null;
 		}
 
-		if ( this.tsources != null ) {
-			foreach ( string src in this.tsources ) {
+		if ( tsources != null ) {
+			foreach ( string src in tsources ) {
 				if ( !doctree.add_file ( src ) ) {
 					Report.error (null, "%s not found".printf (src));
 					return quit ();
 				}
 			}
-			this.tsources = null;
+			tsources = null;
 		}
 
 		if ( !doctree.create_tree( ) )
@@ -176,8 +177,6 @@
 		if ( reporter.errors > 0 )
 			return 1;
 
-
-		modules.doclet.initialisation ( settings );
 		doctree.visit ( modules.doclet );
 		modules.doclet.cleanups ( );
 

Added: trunk/src/vapi/mysql.vapi
==============================================================================
--- (empty file)
+++ trunk/src/vapi/mysql.vapi	Wed Jan 14 00:57:23 2009
@@ -0,0 +1,108 @@
+/* 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 ();
+}
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]