]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Api: Finally remove the unused stuff
authorDidier "Ptitjes <ptitjes@free.fr>
Tue, 20 Oct 2009 01:05:06 +0000 (03:05 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Tue, 20 Oct 2009 01:05:06 +0000 (03:05 +0200)
20 files changed:
src/libvaladoc/api/constant.vala
src/libvaladoc/api/delegate.vala
src/libvaladoc/api/enum.vala
src/libvaladoc/api/enumvalue.vala
src/libvaladoc/api/errorcode.vala
src/libvaladoc/api/errordomain.vala
src/libvaladoc/api/field.vala
src/libvaladoc/api/formalparameter.vala
src/libvaladoc/api/interface.vala
src/libvaladoc/api/item.vala
src/libvaladoc/api/method.vala
src/libvaladoc/api/namespace.vala
src/libvaladoc/api/node.vala
src/libvaladoc/api/package.vala
src/libvaladoc/api/property.vala
src/libvaladoc/api/signal.vala
src/libvaladoc/api/struct.vala
src/libvaladoc/api/symbol.vala
src/libvaladoc/api/symbolaccessibility.vala
src/libvaladoc/api/tree.vala

index 6de083c6bbe6b20dee71e290073827eddf7b7e7f..7c0449f5cd24018907c534e0c3423714e75c3bfa 100644 (file)
@@ -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) {
index cf88e7353a84647c7d7f43c3d8544e2123b15364..e25295267362ef782cd365c51d214b0a7fea18ad 100644 (file)
@@ -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);
index 3f5bae776bf6de093ff0a684954c691af216aae6..bd3bf55680c3a37073f07330a235eb4e7a6dcc19 100644 (file)
@@ -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 ())
index ba4c80714803fb1ca49714ef28ec25b7328674d7..e68c43aa234583b5d71a8e8d6b65108fdce47b6e 100644 (file)
@@ -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 ();
        }
 }
+
index e113d0a6a6cf5552913e7fff47649132a3dad64d..5c2440895913c68ad0026c8c68d1455f2890f1e9 100644 (file)
@@ -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 ();
        }
 }
+
index d8c5e76925b7bf67539e1052daa85d7734fcc3ff..b87818eab0d882c1ae82fc66fe22e8ce8c3cb6ba 100644 (file)
@@ -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; } }
index b64066685b2408ca4ed0dfc28a2a541ae3c5ca2b..7e7b93410655f032a3c3039afc499c10fdf0e592 100644 (file)
@@ -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 ();
        }
index 840b7456c16dac6f9da67245fc26c62e596e5081..94f04ed3075dd32bfcb6303041c6cedf861aa5fd 100644 (file)
@@ -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 ());
                        }
                }
 
index de718031f1dd709d99d9d145508331ff29132caf..8b49984b2eed3d21076ddc4d381c7afb11005c97 100644 (file)
@@ -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);
        }
index ed5aa61c8cc48b7169e784318657eb0ba797df65..63e6a5695502b1d1bcbc65f117ebae4d01cab268 100644 (file)
@@ -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 ();
 }
+
index 93f9a83c06d55a94dfc46fce0ac1ccb5953d389b..eb7ed59dd987513c68d29746bdef9d0fb95763d9 100644 (file)
@@ -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);
index 15ed3450fefe11906724588091f31aa25150a882..6736bbfa00d034f043dc20f22d140063b55d44b9 100644 (file)
@@ -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;
-       }
 }
 
index b1c875213155b30cf6f291b957a90df76954f2a7..13466b7bea4bcc915f7998ff68a946c46eeaa423 100644 (file)
@@ -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 {
index a7a780cbb8622bff2a646b2cd84b54bc81fa3c8e..f86efab4d2601b3f9fca97c00360c08d93624cc7 100644 (file)
@@ -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);
        }
index 68af7dfb748edc72261cddf650bf474bafe44953..ffd149c47e62cb2eac9c8e8d34f81bf22d9fd1bb 100644 (file)
@@ -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 ("{");
 
index b8161a96738ba605d957a22dbec2983bbd198b81..c45eb48ad30e445c0b89ef108eb0d912083ca208 100644 (file)
@@ -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 ("(");
 
index de4059172ba0565237938927a84c73de01e7c03e..e82b884a425f8d0748e9b5b3420bfa1ee6cd607f 100644 (file)
@@ -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 ;
                }
index 011e6254c63d634dd9ebdea4a977669753ccae2d..b3a3f87e618c535bc696c44b52a1ccf98a1112cd 100644 (file)
@@ -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 {
index 206aaa95c9003fc6f61c2429f9839d319938495e..6a441b90c1751cbcb0aaae7ffd2da8222558db6c 100644 (file)
@@ -19,7 +19,6 @@
 
 using Gee;
 
-
 public interface Valadoc.Api.SymbolAccessibility {
 
        public abstract bool is_public { get; }
index bc4ec7e4f0a2cbc4697ce393b5fbe15438c3338c..e80829e8f10bf25a525a8fd81c4ab893fd295641 100644 (file)
@@ -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;
-       }
 }