[valadoc] Api: Finally remove the unused stuff



commit 58de8b153df5d5a4b0b4889eaf752158b989df76
Author: Didier "Ptitjes <ptitjes free fr>
Date:   Tue Oct 20 03:05:06 2009 +0200

    Api: Finally remove the unused stuff

 src/libvaladoc/api/constant.vala            |   15 +-----
 src/libvaladoc/api/delegate.vala            |   20 ++-----
 src/libvaladoc/api/enum.vala                |    5 +--
 src/libvaladoc/api/enumvalue.vala           |   12 +---
 src/libvaladoc/api/errorcode.vala           |   10 +---
 src/libvaladoc/api/errordomain.vala         |    5 +--
 src/libvaladoc/api/field.vala               |   21 +++-----
 src/libvaladoc/api/formalparameter.vala     |   27 ++++------
 src/libvaladoc/api/interface.vala           |   14 ++----
 src/libvaladoc/api/item.vala                |    6 +--
 src/libvaladoc/api/method.vala              |   66 ++++++++++-------------
 src/libvaladoc/api/namespace.vala           |   15 ++----
 src/libvaladoc/api/node.vala                |    1 -
 src/libvaladoc/api/package.vala             |    4 --
 src/libvaladoc/api/property.vala            |   74 +++++++++-----------------
 src/libvaladoc/api/signal.vala              |   20 ++-----
 src/libvaladoc/api/struct.vala              |   12 +---
 src/libvaladoc/api/symbol.vala              |    2 -
 src/libvaladoc/api/symbolaccessibility.vala |    1 -
 src/libvaladoc/api/tree.vala                |   19 ++-----
 20 files changed, 111 insertions(+), 238 deletions(-)
---
diff --git a/src/libvaladoc/api/constant.vala b/src/libvaladoc/api/constant.vala
index 6de083c..7c0449f 100644
--- a/src/libvaladoc/api/constant.vala
+++ b/src/libvaladoc/api/constant.vala
@@ -21,26 +21,15 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Constant : Member {
-	private Vala.Constant vconst;
-
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
-
-	public bool is_vconstant (Vala.Constant vconst) {
-		return (this.vconst == vconst);
-	}
+	public TypeReference type_reference { private set; get; }
 
 	public Constant (Vala.Constant symbol, Node parent) {
 		base (symbol, parent);
-		this.vconst = symbol;
-
 		type_reference = new TypeReference (symbol.type_reference, this);
 	}
 
 	public string get_cname () {
-		return this.vconst.get_cname ();
+		return ((Vala.Constant) symbol).get_cname ();
 	}
 
 	protected override void resolve_type_references (Tree root) {
diff --git a/src/libvaladoc/api/delegate.vala b/src/libvaladoc/api/delegate.vala
index cf88e73..e252952 100644
--- a/src/libvaladoc/api/delegate.vala
+++ b/src/libvaladoc/api/delegate.vala
@@ -21,24 +21,16 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Delegate : TypeSymbol {
-	private Vala.Delegate vdelegate;
-
 	public Delegate (Vala.Delegate symbol, Node parent) {
 		base (symbol, parent);
-
-		this.vdelegate = symbol;
-
-		type_reference = new TypeReference (symbol.return_type, this);
+		return_type = new TypeReference (symbol.return_type, this);
 	}
 
 	public string? get_cname () {
-		return this.vdelegate.get_cname ();
+		return ((Vala.Delegate) symbol).get_cname ();
 	}
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? return_type { private set; get; }
 
 	public override NodeType node_type { get { return NodeType.DELEGATE; } }
 
@@ -48,12 +40,12 @@ public class Valadoc.Api.Delegate : TypeSymbol {
 
 	public bool is_static {
 		get {
-			return this.vdelegate.has_target;
+			return ((Vala.Delegate) symbol).has_target;
 		}
 	}
 
 	protected override void resolve_type_references (Tree root) {
-		type_reference.resolve_type_references (root);
+		return_type.resolve_type_references (root);
 
 		base.resolve_type_references (root);
 	}
@@ -66,7 +58,7 @@ public class Valadoc.Api.Delegate : TypeSymbol {
 			signature.append_keyword ("static");
 		}
 
-		signature.append_content (type_reference.signature);
+		signature.append_content (return_type.signature);
 		signature.append_symbol (this);
 
 		var type_parameters = get_children_by_type (NodeType.TYPE_PARAMETER);
diff --git a/src/libvaladoc/api/enum.vala b/src/libvaladoc/api/enum.vala
index 3f5bae7..bd3bf55 100644
--- a/src/libvaladoc/api/enum.vala
+++ b/src/libvaladoc/api/enum.vala
@@ -23,11 +23,10 @@ using Valadoc.Content;
 public class Valadoc.Api.Enum : TypeSymbol {
 	public Enum (Vala.Enum symbol, Node parent) {
 		base (symbol, parent);
-		this.venum = symbol;
 	}
 
 	public string? get_cname () {
-		return this.venum.get_cname();
+		return ((Vala.Enum) symbol).get_cname ();
 	}
 
 	public override NodeType node_type { get { return NodeType.ENUM; } }
@@ -36,8 +35,6 @@ public class Valadoc.Api.Enum : TypeSymbol {
 		visitor.visit_enum (this);
 	}
 
-	private Vala.Enum venum;
-
 	protected override Inline build_signature () {
 		return new SignatureBuilder ()
 			.append_keyword (get_accessibility_modifier ())
diff --git a/src/libvaladoc/api/enumvalue.vala b/src/libvaladoc/api/enumvalue.vala
index ba4c807..e68c43a 100644
--- a/src/libvaladoc/api/enumvalue.vala
+++ b/src/libvaladoc/api/enumvalue.vala
@@ -21,11 +21,8 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.EnumValue: Symbol {
-	private Vala.EnumValue venval;
-
 	public EnumValue (Vala.EnumValue symbol, Node parent) {
 		base (symbol, parent);
-		this.venval = symbol;
 	}
 
 	protected override void process_comments (Settings settings, DocumentationParser parser) {
@@ -38,11 +35,7 @@ public class Valadoc.Api.EnumValue: Symbol {
 	}
 
 	public string get_cname () {
-		return this.venval.get_cname ();
-	}
-
-	public bool is_venumvalue (Vala.EnumValue venval) {
-		return this.venval == venval;
+		return ((Vala.EnumValue) symbol).get_cname ();
 	}
 
 	public override NodeType node_type { get { return NodeType.ENUM_VALUE; } }
@@ -55,7 +48,8 @@ public class Valadoc.Api.EnumValue: Symbol {
 		return new SignatureBuilder ()
 			.append_symbol (this)
 			.append ("=")
-			.append (this.venval.value.to_string ())
+			.append (((Vala.EnumValue) symbol).value.to_string ())
 			.get ();
 	}
 }
+
diff --git a/src/libvaladoc/api/errorcode.vala b/src/libvaladoc/api/errorcode.vala
index e113d0a..5c24408 100644
--- a/src/libvaladoc/api/errorcode.vala
+++ b/src/libvaladoc/api/errorcode.vala
@@ -21,19 +21,12 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.ErrorCode : TypeSymbol {
-	private Vala.ErrorCode verrcode;
-
 	public ErrorCode (Vala.ErrorCode symbol, Node parent) {
 		base (symbol, parent);
-		this.verrcode = symbol;
 	}
 
 	public string get_cname () {
-		return this.verrcode.get_cname ();
-	}
-
-	public bool is_verrorcode (Vala.ErrorCode verrcode) {
-		return this.verrcode == verrcode;
+		return ((Vala.ErrorCode) symbol).get_cname ();
 	}
 
 	public override NodeType node_type { get { return NodeType.ERROR_CODE; } }
@@ -48,3 +41,4 @@ public class Valadoc.Api.ErrorCode : TypeSymbol {
 			.get ();
 	}
 }
+
diff --git a/src/libvaladoc/api/errordomain.vala b/src/libvaladoc/api/errordomain.vala
index d8c5e76..b87818e 100644
--- a/src/libvaladoc/api/errordomain.vala
+++ b/src/libvaladoc/api/errordomain.vala
@@ -22,15 +22,12 @@ using Valadoc.Content;
 
 
 public class Valadoc.Api.ErrorDomain : TypeSymbol {
-	private Vala.ErrorDomain verrdom;
-
 	public ErrorDomain (Vala.ErrorDomain symbol, Node parent) {
 		base (symbol, parent);
-		this.verrdom = symbol;
 	}
 
 	public string? get_cname () {
-		return this.verrdom.get_cname();
+		return ((Vala.ErrorDomain) symbol).get_cname();
 	}
 
 	public override NodeType node_type { get { return NodeType.ERROR_DOMAIN; } }
diff --git a/src/libvaladoc/api/field.vala b/src/libvaladoc/api/field.vala
index b640666..7e7b934 100644
--- a/src/libvaladoc/api/field.vala
+++ b/src/libvaladoc/api/field.vala
@@ -21,23 +21,16 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Field : Member {
-	private Vala.Field vfield;
-
 	public Field (Vala.Field symbol, Node parent) {
 		base (symbol, parent);
-		this.vfield = symbol;
-
-		type_reference = new TypeReference (symbol.field_type, this);
+		field_type = new TypeReference (symbol.field_type, this);
 	}
 
 	public string? get_cname () {
-		return this.vfield.get_cname();
+		return ((Vala.Field) symbol).get_cname();
 	}
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? field_type { private set; get; }
 
 	public bool is_static {
 		get {
@@ -45,18 +38,18 @@ public class Valadoc.Api.Field : Member {
 				return false;
 			}
 
-			return this.vfield.binding == MemberBinding.STATIC;
+			return ((Vala.Field) symbol).binding == MemberBinding.STATIC;
 		}
 	}
 
 	public bool is_volatile {
 		get {
-			return this.vfield.is_volatile;
+			return ((Vala.Field) symbol).is_volatile;
 		}
 	}
 
 	protected override void resolve_type_references (Tree root) {
-		type_reference.resolve_type_references (root);
+		field_type.resolve_type_references (root);
 
 		base.resolve_type_references (root);
 	}
@@ -72,7 +65,7 @@ public class Valadoc.Api.Field : Member {
 			signature.append_keyword ("volatile");
 		}
 
-		signature.append_content (type_reference.signature);
+		signature.append_content (field_type.signature);
 		signature.append_symbol (this);
 		return signature.get ();
 	}
diff --git a/src/libvaladoc/api/formalparameter.vala b/src/libvaladoc/api/formalparameter.vala
index 840b745..94f04ed 100644
--- a/src/libvaladoc/api/formalparameter.vala
+++ b/src/libvaladoc/api/formalparameter.vala
@@ -21,41 +21,34 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.FormalParameter : Symbol {
-	private Vala.FormalParameter vformalparam;
-
 	public FormalParameter (Vala.FormalParameter symbol, Node parent) {
 		base (symbol, parent);
-		this.vformalparam = symbol;
-
-		type_reference = new TypeReference (symbol.parameter_type, this);
+		parameter_type = new TypeReference (symbol.parameter_type, this);
 	}
 
 	public bool is_out {
 		get {
-			return this.vformalparam.direction == Vala.ParameterDirection.OUT;
+			return ((Vala.FormalParameter) symbol).direction == Vala.ParameterDirection.OUT;
 		}
 	}
 
 	public bool is_ref {
 		get {
-			return this.vformalparam.direction == Vala.ParameterDirection.REF;
+			return ((Vala.FormalParameter) symbol).direction == Vala.ParameterDirection.REF;
 		}
 	}
 
 	public bool has_default_value {
 		get {
-			return this.vformalparam.default_expression != null;
+			return ((Vala.FormalParameter) symbol).default_expression != null;
 		}
 	}
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? parameter_type { private set; get; }
 
 	public bool ellipsis {
 		get {
-			return this.vformalparam.ellipsis;
+			return ((Vala.FormalParameter) symbol).ellipsis;
 		}
 	}
 
@@ -66,11 +59,11 @@ public class Valadoc.Api.FormalParameter : Symbol {
 	}
 
 	protected override void resolve_type_references (Tree root) {
-		if (this.vformalparam.ellipsis) {
+		if (ellipsis) {
 			return;
 		}
 
-		type_reference.resolve_type_references (root);
+		parameter_type.resolve_type_references (root);
 
 		base.resolve_type_references (root);
 	}
@@ -87,12 +80,12 @@ public class Valadoc.Api.FormalParameter : Symbol {
 				signature.append_keyword ("ref");
 			}
 
-			signature.append_content (type_reference.signature);
+			signature.append_content (parameter_type.signature);
 			signature.append (name);
 
 			if (has_default_value) {
 				signature.append ("=");
-				signature.append (this.vformalparam.default_expression.to_string ());
+				signature.append (((Vala.FormalParameter) symbol).default_expression.to_string ());
 			}
 		}
 
diff --git a/src/libvaladoc/api/interface.vala b/src/libvaladoc/api/interface.vala
index de71803..8b49984 100644
--- a/src/libvaladoc/api/interface.vala
+++ b/src/libvaladoc/api/interface.vala
@@ -23,7 +23,6 @@ using Valadoc.Content;
 public class Valadoc.Api.Interface : TypeSymbol {
 	public Interface (Vala.Interface symbol, Node parent) {
 		base (symbol, parent);
-		this.vinterface = symbol;
 	}
 
 	private ArrayList<TypeReference> interfaces = new ArrayList<TypeReference> ();
@@ -33,15 +32,10 @@ public class Valadoc.Api.Interface : TypeSymbol {
 	}
 
 	public string? get_cname () {
-		return this.vinterface.get_cname ();
+		return ((Vala.Interface) symbol).get_cname ();
 	}
 
-	protected TypeReference? base_type {
-		private set;
-		get;
-	}
-
-	private Vala.Interface vinterface;
+	protected TypeReference? base_type { private set; get; }
 
 	public override NodeType node_type { get { return NodeType.INTERFACE; } }
 
@@ -67,8 +61,8 @@ public class Valadoc.Api.Interface : TypeSymbol {
 	}
 
 	protected override void resolve_type_references (Tree root) {
-		var lst = this.vinterface.get_prerequisites ();
-		this.set_prerequisites (root, lst);
+		var prerequisites = ((Vala.Interface) symbol).get_prerequisites ();
+		this.set_prerequisites (root, prerequisites);
 
 		base.resolve_type_references (root);
 	}
diff --git a/src/libvaladoc/api/item.vala b/src/libvaladoc/api/item.vala
index ed5aa61..63e6a56 100644
--- a/src/libvaladoc/api/item.vala
+++ b/src/libvaladoc/api/item.vala
@@ -24,10 +24,7 @@ using Gee;
 public abstract class Valadoc.Api.Item : Object {
 	private Inline _signature;
 
-	public Item parent {
-		protected set;
-		get;
-	}
+	public Item parent { protected set; get; }
 
 	protected virtual void resolve_type_references (Tree root) {
 	}
@@ -46,3 +43,4 @@ public abstract class Valadoc.Api.Item : Object {
 
 	protected abstract Inline build_signature ();
 }
+
diff --git a/src/libvaladoc/api/method.vala b/src/libvaladoc/api/method.vala
index 93f9a83..eb7ed59 100644
--- a/src/libvaladoc/api/method.vala
+++ b/src/libvaladoc/api/method.vala
@@ -21,104 +21,96 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Method : Member {
-	private Vala.Method vmethod;
-
 	public Method (Vala.Method symbol, Node parent) {
 		base (symbol, parent);
-		this.vmethod = symbol;
-
-		type_reference = new TypeReference (symbol.return_type, this);
+		return_type = new TypeReference (symbol.return_type, this);
 	}
 
 	public string? get_cname () {
-		return this.vmethod.get_cname ();
+		return ((Vala.Method) symbol).get_cname ();
 	}
 
-	public Method? base_method {
-		private set;
-		get;
-	}
+	public Method? base_method { private set; get; }
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? return_type { private set; get; }
 
 	public bool is_yields {
 		get {
-			return this.vmethod.coroutine;
+			return ((Vala.Method) symbol).coroutine;
 		}
 	}
 
 	public bool is_abstract {
 		get {
-			return this.vmethod.is_abstract;
+			return ((Vala.Method) symbol).is_abstract;
 		}
 	}
 
 	public bool is_virtual {
 		get {
-			return this.vmethod.is_virtual;
+			return ((Vala.Method) symbol).is_virtual;
 		}
 	}
 
 	public bool is_override {
 		get {
-			return this.vmethod.overrides;
+			return ((Vala.Method) symbol).overrides;
 		}
 	}
 
 	public bool is_static {
 		get {
-			if (this.parent is Namespace || this.is_constructor) {
+			if (this.parent is Namespace || is_constructor) {
 				return false;
 			}
-			return this.vmethod.binding == MemberBinding.STATIC;
+			return ((Vala.Method) symbol).binding == MemberBinding.STATIC;
 		}
 	}
 
 	public bool is_constructor {
 		get {
-			return ( this.vmethod is Vala.CreationMethod );
+			return symbol is Vala.CreationMethod;
 		}
 	}
 
 	public bool is_inline {
 		get {
-			return this.vmethod.is_inline;
+			return ((Vala.Method) symbol).is_inline;
 		}
 	}
 
 	public override string? name {
 		owned get {
 			if (this.is_constructor) {
-				if (this.vmethod.name == ".new") {
-					return ((Node)this.parent).name;
+				if (symbol.name == ".new") {
+					return ((Node) parent).name;
 				} else {
-					return ((Node)this.parent).name + "." + this.vmethod.name;
+					return ((Node) parent).name + "." + symbol.name;
 				}
 			}
 			else {
-				return this.vmethod.name;
+				return symbol.name;
 			}
 		}
 	}
 
 	protected override void resolve_type_references (Tree root) {
-		Vala.Method? vm = null;
-		if (vmethod.base_method != null) {
-			vm = vmethod.base_method;
-		} else if (vmethod.base_interface_method != null) {
-			vm = vmethod.base_interface_method;
+		Vala.Method vala_method = symbol as Vala.Method;
+		Vala.Method? base_vala_method = null;
+		if (vala_method.base_method != null) {
+			base_vala_method = vala_method.base_method;
+		} else if (vala_method.base_interface_method != null) {
+			base_vala_method = vala_method.base_interface_method;
 		}
-		if (vm == vmethod && vmethod.base_interface_method != null) {
-			vm = vmethod.base_interface_method;
+		if (base_vala_method == vala_method
+		    && vala_method.base_interface_method != null) {
+			base_vala_method = vala_method.base_interface_method;
 		}
-		if (vm != null) {
-			this.base_method = (Method?) root.search_vala_symbol (vm);
+		if (base_vala_method != null) {
+			this.base_method = (Method?) root.search_vala_symbol (base_vala_method);
 		}
 
-		type_reference.resolve_type_references (root);
+		return_type.resolve_type_references (root);
 
 		base.resolve_type_references (root);
 	}
@@ -143,7 +135,7 @@ public class Valadoc.Api.Method : Member {
 			signature.append_keyword ("async");
 		}
 
-		signature.append_content (type_reference.signature);
+		signature.append_content (return_type.signature);
 		signature.append_symbol (this);
 
 		var type_parameters = get_children_by_type (NodeType.TYPE_PARAMETER, false);
diff --git a/src/libvaladoc/api/namespace.vala b/src/libvaladoc/api/namespace.vala
index 15ed345..6736bbf 100644
--- a/src/libvaladoc/api/namespace.vala
+++ b/src/libvaladoc/api/namespace.vala
@@ -26,12 +26,10 @@ public class Valadoc.Api.Namespace : Symbol {
 	public Namespace (Vala.Namespace symbol, Api.Node parent) {
 		base (symbol, parent);
 
-		this.vnspace = symbol;
-
-		if (vnspace.source_reference != null) {
-			foreach (Vala.Comment c in vnspace.get_comments()) {
-				if (this.package.is_vpackage (c.source_reference.file)) {
-					this.source_comment = c;
+		if (symbol.source_reference != null) {
+			foreach (Vala.Comment c in symbol.get_comments()) {
+				if (package.is_package_for_file (c.source_reference.file)) {
+					source_comment = c;
 					break;
 				}
 			}
@@ -59,10 +57,5 @@ public class Valadoc.Api.Namespace : Symbol {
 	public override void accept (Visitor visitor) {
 		visitor.visit_namespace (this);
 	}
-
-	public Vala.Namespace vnspace {
-		private get;
-		set;
-	}
 }
 
diff --git a/src/libvaladoc/api/node.vala b/src/libvaladoc/api/node.vala
index b1c8752..13466b7 100644
--- a/src/libvaladoc/api/node.vala
+++ b/src/libvaladoc/api/node.vala
@@ -175,7 +175,6 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
 	private Namespace? _nspace = null;
 	private Package? _package = null;
 	private string _full_name = null;
-	private int _line = -1;
 
 	public Namespace? nspace {
 		get {
diff --git a/src/libvaladoc/api/package.vala b/src/libvaladoc/api/package.vala
index a7a780c..f86efab 100644
--- a/src/libvaladoc/api/package.vala
+++ b/src/libvaladoc/api/package.vala
@@ -86,10 +86,6 @@ public class Valadoc.Api.Package : Node {
 		}
 	}
 
-	internal bool is_vpackage (Vala.SourceFile vfile) {
-		return this.vfiles.contains (vfile);
-	}
-
 	internal bool is_package_for_file (Vala.SourceFile source_file) {
 		return this.vfiles.contains (source_file);
 	}
diff --git a/src/libvaladoc/api/property.vala b/src/libvaladoc/api/property.vala
index 68af7df..ffd149c 100644
--- a/src/libvaladoc/api/property.vala
+++ b/src/libvaladoc/api/property.vala
@@ -21,89 +21,67 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Property : Member {
-	private Vala.Property vproperty;
-
 	public Property (Vala.Property symbol, Node parent) {
 		base (symbol, parent);
 
-		this.vproperty = symbol;
-
-		type_reference = new TypeReference (symbol.property_type, this);
+		property_type = new TypeReference (symbol.property_type, this);
 
-		if (this.vproperty.get_accessor != null) {
-			this.getter = new PropertyAccessor (this.vproperty.get_accessor, this);
+		if (symbol.get_accessor != null) {
+			this.getter = new PropertyAccessor (symbol.get_accessor, this);
 		}
 
-		if (this.vproperty.set_accessor != null) {
-			this.setter = new PropertyAccessor (this.vproperty.set_accessor, this);
+		if (symbol.set_accessor != null) {
+			this.setter = new PropertyAccessor (symbol.set_accessor, this);
 		}
 	}
 
-	public bool is_vproperty (Vala.Property vprop) {
-		return (this.vproperty == vprop);
-	}
-
 	public string? get_cname () {
-		return this.vproperty.nick;
-	}
-
-	public bool equals (Property p) {
-		return this.vproperty.equals (p.vproperty);
+		return ((Vala.Property) symbol).nick;
 	}
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? property_type { private set; get;}
 
 	public bool is_virtual {
 		get {
-			return this.vproperty.is_virtual;
+			return ((Vala.Property) symbol).is_virtual;
 		}
 	}
 
 	public bool is_abstract {
 		get {
-			return this.vproperty.is_abstract;
+			return ((Vala.Property) symbol).is_abstract;
 		}
 	}
 
 	public bool is_override {
 		get {
-			return this.vproperty.overrides;
+			return ((Vala.Property) symbol).overrides;
 		}
 	}
 
-	public PropertyAccessor setter {
-		private set;
-		get;
-	}
+	public PropertyAccessor setter { private set; get; }
 
-	public PropertyAccessor getter {
-		private set;
-		get;
-	}
+	public PropertyAccessor getter { private set; get; }
 
-	public Property base_property {
-		private set;
-		get;
-	}
+	public Property base_property { private set; get; }
 
 	protected override void resolve_type_references (Tree root) {
-		Vala.Property? vp = null;
-		if (vproperty.base_property != null) {
-			vp = vproperty.base_property;
-		} else if (vproperty.base_interface_property != null) {
-			vp = vproperty.base_interface_property;
+		Vala.Property vala_property = symbol as Vala.Property;
+		Vala.Property? base_vala_property = null;
+		if (vala_property.base_property != null) {
+			base_vala_property = vala_property.base_property;
+		} else if (vala_property.base_interface_property != null) {
+			base_vala_property = vala_property.base_interface_property;
 		}
-		if (vp == vproperty && vproperty.base_interface_property != null) {
-			vp = vproperty.base_interface_property;
+		if (base_vala_property == vala_property
+		    && vala_property.base_interface_property != null) {
+			base_vala_property = vala_property.base_interface_property;
 		}
-		if (vp != null) {
-			this.base_property = (Property?) root.search_vala_symbol (vp);
+		if (base_vala_property != null) {
+			base_property = (Property?) root.search_vala_symbol (base_vala_property);
 		}
 
-		type_reference.resolve_type_references (root);
+		property_type.resolve_type_references (root);
 	}
 
 	protected override Inline build_signature () {
@@ -118,7 +96,7 @@ public class Valadoc.Api.Property : Member {
 			signature.append_keyword ("virtual");
 		}
 
-		signature.append_content (type_reference.signature);
+		signature.append_content (property_type.signature);
 		signature.append_symbol (this);
 		signature.append ("{");
 
diff --git a/src/libvaladoc/api/signal.vala b/src/libvaladoc/api/signal.vala
index b8161a9..c45eb48 100644
--- a/src/libvaladoc/api/signal.vala
+++ b/src/libvaladoc/api/signal.vala
@@ -21,34 +21,26 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Signal : Member {
-	private Vala.Signal vsignal;
-
 	public Signal (Vala.Signal symbol, Node parent) {
 		base (symbol, parent);
-
-		this.vsignal = symbol;
-
-		type_reference = new TypeReference (symbol.return_type, this);
+		return_type = new TypeReference (symbol.return_type, this);
 	}
 
 	public string? get_cname () {
-		return this.vsignal.get_cname();
+		return ((Vala.Signal) symbol).get_cname();
 	}
 
-	public TypeReference? type_reference {
-		protected set;
-		get;
-	}
+	public TypeReference? return_type { protected set; get; }
 
 	protected override void resolve_type_references (Tree root) {
-		type_reference.resolve_type_references (root);
+		return_type.resolve_type_references (root);
 
 		base.resolve_type_references (root);
 	}
 
 	public bool is_virtual {
 		get {
-			return this.vsignal.is_virtual;
+			return ((Vala.Signal) symbol).is_virtual;
 		}
 	}
 
@@ -60,7 +52,7 @@ public class Valadoc.Api.Signal : Member {
 			signature.append_keyword ("virtual");
 		}
 
-		signature.append_content (type_reference.signature);
+		signature.append_content (return_type.signature);
 		signature.append_symbol (this);
 		signature.append ("(");
 
diff --git a/src/libvaladoc/api/struct.vala b/src/libvaladoc/api/struct.vala
index de40591..e82b884 100644
--- a/src/libvaladoc/api/struct.vala
+++ b/src/libvaladoc/api/struct.vala
@@ -21,20 +21,14 @@ using Gee;
 using Valadoc.Content;
 
 public class Valadoc.Api.Struct : TypeSymbol {
-	private Vala.Struct vstruct;
-
 	public Struct (Vala.Struct symbol, Node parent) {
 		base (symbol, parent);
-		this.vstruct = symbol;
 	}
 
-	protected TypeReference? base_type {
-		protected set;
-		get;
-	}
+	protected TypeReference? base_type { private set; get; }
 
 	public string? get_cname () {
-		return this.vstruct.get_cname();
+		return ((Vala.Struct) symbol).get_cname();
 	}
 
 	public override NodeType node_type { get { return NodeType.STRUCT; } }
@@ -44,7 +38,7 @@ public class Valadoc.Api.Struct : TypeSymbol {
 	}
 
 	private void set_parent_references (Tree root) {
-		Vala.ValueType? basetype = this.vstruct.base_type as Vala.ValueType;
+		Vala.ValueType? basetype = ((Vala.Struct) symbol).base_type as Vala.ValueType;
 		if (basetype == null) {
 			return ;
 		}
diff --git a/src/libvaladoc/api/symbol.vala b/src/libvaladoc/api/symbol.vala
index 011e625..b3a3f87 100644
--- a/src/libvaladoc/api/symbol.vala
+++ b/src/libvaladoc/api/symbol.vala
@@ -26,8 +26,6 @@ using Gee;
 public abstract class Valadoc.Api.Symbol : Node, SymbolAccessibility {
 
 	protected Vala.Symbol symbol { private set; get; }
-	// TODO Drop DocumentedElement
-	/* protected Vala.Comment vcomment { private set; get; } */
 
 	public override string? name {
 		owned get {
diff --git a/src/libvaladoc/api/symbolaccessibility.vala b/src/libvaladoc/api/symbolaccessibility.vala
index 206aaa9..6a441b9 100644
--- a/src/libvaladoc/api/symbolaccessibility.vala
+++ b/src/libvaladoc/api/symbolaccessibility.vala
@@ -19,7 +19,6 @@
 
 using Gee;
 
-
 public interface Valadoc.Api.SymbolAccessibility {
 
 	public abstract bool is_public { get; }
diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala
index bc4ec7e..e80829e 100644
--- a/src/libvaladoc/api/tree.vala
+++ b/src/libvaladoc/api/tree.vala
@@ -159,11 +159,11 @@ public class Valadoc.Api.Tree {
 			}
 
 			/* default packages */
-			if (!this.add_package ("glib-2.0")) {
+			if (!this.add_package ("glib-2.0")) { //
 				Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
 			}
 
-			if (!this.add_package ("gobject-2.0")) {
+			if (!this.add_package ("gobject-2.0")) { //
 				Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
 			}
 		}
@@ -308,9 +308,9 @@ public class Valadoc.Api.Tree {
 		return true;
 	}
 
-	internal Package? find_file (Vala.SourceFile vfile) {
+	private Package? find_package_for_file (Vala.SourceFile vfile) {
 		foreach (Package pkg in this.packages) {
-			if (pkg.is_vpackage(vfile))
+			if (pkg.is_package_for_file (vfile))
 				return pkg;
 		}
 		return null;
@@ -337,7 +337,7 @@ public class Valadoc.Api.Tree {
 
 	internal Symbol? search_vala_symbol (Vala.Symbol symbol) {
 		Vala.SourceFile source_file = symbol.source_reference.file;
-		Package package = this.find_file (source_file);
+		Package package = find_package_for_file (source_file);
 		return search_vala_symbol_in (symbol, package);
 	}
 
@@ -370,14 +370,5 @@ public class Valadoc.Api.Tree {
 		}
 		return (Symbol) node;
 	}
-
-	private Package? get_external_package_by_name (string name) {
-		foreach (Package pkg in this.packages) {
-			if (name == pkg.name) {
-				return pkg;
-			}
-		}
-		return null;
-	}
 }
 



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