]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Drop Api.Member
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 18 Nov 2018 13:35:05 +0000 (14:35 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 09:38:16 +0000 (10:38 +0100)
15 files changed:
libvaladoc/Makefile.am
libvaladoc/api/constant.vala
libvaladoc/api/enumvalue.vala
libvaladoc/api/errorcode.vala
libvaladoc/api/field.vala
libvaladoc/api/formalparameter.vala
libvaladoc/api/member.vala [deleted file]
libvaladoc/api/method.vala
libvaladoc/api/namespace.vala
libvaladoc/api/property.vala
libvaladoc/api/propertyaccessor.vala
libvaladoc/api/signal.vala
libvaladoc/api/symbol.vala
libvaladoc/api/typeparameter.vala
libvaladoc/api/typesymbol.vala

index c2f431d9ff9999eedc42b904dd6aa6934032f43c..640e98c8019ee8d315d9d6f09b65d144714074bd 100644 (file)
@@ -71,7 +71,6 @@ libvaladoc_la_VALASOURCES = \
        api/formalparameter.vala \
        api/interface.vala \
        api/item.vala \
-       api/member.vala \
        api/method.vala \
        api/methodbindingtype.vala \
        api/namespace.vala \
index fde36246f0e0714b21266baf39bb92d3226986fc..c6c1613fe88d34dc4c9e2a752026a68be5207bc9 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc.Content;
 /**
  * Represents a type member with a constant value.
  */
-public class Valadoc.Api.Constant : Member {
+public class Valadoc.Api.Constant : Symbol {
        private string? cname;
 
        /**
index 55702e1df7b77eb8196300af2873cf75687eac48..c3858232985d54ca94f75dc8278eda7aa772a0dc 100644 (file)
@@ -27,7 +27,6 @@ using Valadoc.Content;
  * Represents an enum member.
  */
 public class Valadoc.Api.EnumValue: Symbol {
-       private SourceComment? source_comment;
        private string? cname;
 
        public Content.Run default_value {
@@ -45,38 +44,11 @@ public class Valadoc.Api.EnumValue: Symbol {
        }
 
        public EnumValue (Enum parent, SourceFile file, string name, SourceComment? comment, string? cname, Vala.EnumValue data) {
-               base (parent, file, name, parent.accessibility, data);
+               base (parent, file, name, parent.accessibility, comment, data);
 
-               this.source_comment = comment;
                this.cname = cname;
        }
 
-       /**
-        * {@inheritDoc}
-        */
-       internal override void parse_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       return ;
-               }
-
-               if (source_comment != null) {
-                       documentation = parser.parse (this, source_comment);
-               }
-
-               base.parse_comments (settings, parser);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void check_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       parser.check (this, documentation);
-               }
-
-               base.check_comments (settings, parser);
-       }
-
        /**
         * Returns the name of this enum value as it is used in C.
         */
index 64f1693570e616eebc64737729c0c7013074a7c4..6994f87a7668f7e2a0fea4c40eea9c33a2dfe8d7 100644 (file)
@@ -27,46 +27,18 @@ using Valadoc.Content;
  * Represents an errordomain member in the source code.
  */
 public class Valadoc.Api.ErrorCode : Symbol {
-       private SourceComment? source_comment;
        private string? dbus_name;
        private string? cname;
 
        public ErrorCode (ErrorDomain parent, SourceFile file, string name, SourceComment? comment,
                                          string? cname, string? dbus_name, Vala.ErrorCode data)
        {
-               base (parent, file, name, parent.accessibility, data);
+               base (parent, file, name, parent.accessibility, comment, data);
 
-               this.source_comment = comment;
                this.dbus_name = dbus_name;
                this.cname = cname;
        }
 
-       /**
-        * {@inheritDoc}
-        */
-       internal override void parse_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       return ;
-               }
-
-               if (source_comment != null) {
-                       documentation = parser.parse (this, source_comment);
-               }
-
-               base.parse_comments (settings, parser);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void check_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       parser.check (this, documentation);
-               }
-
-               base.check_comments (settings, parser);
-       }
-
        /**
         * Returns the name of this class as it is used in C.
         */
index 16264fbc77fb3084576e2b41f9ba01cbb75ee370..f2f086d8d7db208d784b5b7b1f3d292d86811ff4 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc.Content;
 /**
  * Represents a field.
  */
-public class Valadoc.Api.Field : Member {
+public class Valadoc.Api.Field : Symbol {
        private string? cname;
 
        public Field (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
index 4c3bd9e241899399a253a26adf7063e8cfd8947f..0014f120beb37f5c92bbedf98f764e06f851b4da 100644 (file)
@@ -59,7 +59,7 @@ public class Valadoc.Api.FormalParameter : Symbol {
        private Vala.ParameterDirection type;
 
        public FormalParameter (Node parent, SourceFile file, string? name, Vala.SymbolAccessibility accessibility, Vala.ParameterDirection type, bool ellipsis, Vala.Parameter data) {
-               base (parent, file, name, accessibility, data);
+               base (parent, file, name, accessibility, null, data);
                assert ((name == null && ellipsis) || (name != null && !ellipsis));
 
                this.ellipsis = ellipsis;
diff --git a/libvaladoc/api/member.vala b/libvaladoc/api/member.vala
deleted file mode 100644 (file)
index 86b2766..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* member.vala
- *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
- * Copyright (C) 2011      Florian Brosch
- *
- * 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:
- *     Didier 'Ptitjes Villevalois <ptitjes@free.fr>
- */
-
-
-public abstract class Valadoc.Api.Member : Symbol {
-       private SourceComment? source_comment;
-
-       public Member (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
-                                  SourceComment? comment, Vala.Symbol data)
-       {
-               base (parent, file, name, accessibility, data);
-
-               this.source_comment = comment;
-       }
-
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void parse_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       return ;
-               }
-
-               if (source_comment != null) {
-                       documentation = parser.parse (this, source_comment);
-               }
-
-               base.parse_comments (settings, parser);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void check_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       parser.check (this, documentation);
-               }
-
-               base.check_comments (settings, parser);
-       }
-}
index 19d6f64429322b97ae9a7e5decfcd4de353c79ab..a1aaa4870f9c0e5e5c2e43b57675f90602f957df 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc.Content;
 /**
  * Represents a function or a method.
  */
-public class Valadoc.Api.Method : Member, Callable {
+public class Valadoc.Api.Method : Symbol, Callable {
        private string? finish_function_cname;
        private string? dbus_result_name;
        private string? dbus_name;
index b925e37bfeb0f309905aca72c92ae6d994090bf4..04ddbb20cf10e922221dc015492ddc3e3f89d5a6 100644 (file)
@@ -27,42 +27,10 @@ using Valadoc.Content;
  * Represents a namespace declaration.
  */
 public class Valadoc.Api.Namespace : Symbol {
-       private SourceComment? source_comment;
-
        public Namespace (Api.Node parent, SourceFile file, string? name, SourceComment? comment, Vala.Namespace data) {
-               base (parent, file, name, Vala.SymbolAccessibility.PUBLIC, data);
-
-               this.source_comment = comment;
+               base (parent, file, name, Vala.SymbolAccessibility.PUBLIC, comment, data);
        }
 
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void parse_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       return ;
-               }
-
-               if (source_comment != null) {
-                       documentation = parser.parse (this, source_comment);
-               }
-
-               base.parse_comments (settings, parser);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void check_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       parser.check (this, documentation);
-               }
-
-               base.check_comments (settings, parser);
-       }
-
-
        /**
         * {@inheritDoc}
         */
index 9dd03b5da6b5def75f8fafd69f7a573151e324f1..a5c8df043bd15fcfb7653647dee695501ba9eae9 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc.Content;
 /**
  * Represents a property declaration.
  */
-public class Valadoc.Api.Property : Member {
+public class Valadoc.Api.Property : Symbol {
        private PropertyBindingType binding_type;
        private string? dbus_name;
        private string? cname;
index c603fae0056db6d8133f15909397cd1cba5e6da3..55bead0d9dea842f34c33e4beddb2706a70bda79 100644 (file)
@@ -34,7 +34,7 @@ public class Valadoc.Api.PropertyAccessor : Symbol {
        public PropertyAccessor (Property parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
                                                         string? cname, PropertyAccessorType type, Ownership ownership, Vala.PropertyAccessor data)
        {
-               base (parent, file, name, accessibility, data);
+               base (parent, file, name, accessibility, null, data);
 
                this.ownership = ownership;
                this.cname = cname;
index e89836fcc92944a865414f66075d3f37ddd7e433..511be05bc0759ae6aba85faec340228322675e3a 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc.Content;
 /**
  * Represents an signal.
  */
-public class Valadoc.Api.Signal : Member, Callable {
+public class Valadoc.Api.Signal : Symbol, Callable {
        private string? default_impl_cname;
        private string? dbus_name;
        private string? cname;
index c68270e0fa1bb4b9620dd8f932c72ac57de4ce6c..7acc29bc55c2af15b8db273ccce0ee2d5027ec06 100644 (file)
@@ -27,6 +27,7 @@
  */
 public abstract class Valadoc.Api.Symbol : Node {
        private Vala.ArrayList<Attribute> attributes;
+       private SourceComment? source_comment;
 
        public bool is_deprecated {
                default = false;
@@ -35,11 +36,12 @@ public abstract class Valadoc.Api.Symbol : Node {
        }
 
        public Symbol (Node parent, SourceFile file, string? name, Vala.SymbolAccessibility accessibility,
-                                  Vala.Symbol data)
+                                  SourceComment? comment, Vala.Symbol data)
        {
                base (parent, file, name, data);
 
                this.accessibility = accessibility;
+               this.source_comment = comment;
        }
 
        public void add_attribute (Attribute att) {
@@ -153,5 +155,31 @@ public abstract class Valadoc.Api.Symbol : Node {
                        return accessibility == Vala.SymbolAccessibility.PRIVATE;
                }
        }
+
+       /**
+        * {@inheritDoc}
+        */
+       internal override void parse_comments (Settings settings, DocumentationParser parser) {
+               if (documentation != null) {
+                       return ;
+               }
+
+               if (source_comment != null) {
+                       documentation = parser.parse (this, source_comment);
+               }
+
+               base.parse_comments (settings, parser);
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       internal override void check_comments (Settings settings, DocumentationParser parser) {
+               if (documentation != null) {
+                       parser.check (this, documentation);
+               }
+
+               base.check_comments (settings, parser);
+       }
 }
 
index c2b773e7be0dfdbf6239dd393f7963c6b907f2ca..410cb79122ac6acf5322ffc79a1b5bb1e283d0d8 100644 (file)
@@ -29,7 +29,7 @@ using Valadoc.Content;
 public class Valadoc.Api.TypeParameter : Symbol {
 
        public TypeParameter (Node parent, SourceFile file, string name, Vala.TypeParameter data) {
-               base (parent, file, name, Vala.SymbolAccessibility.PUBLIC, data);
+               base (parent, file, name, Vala.SymbolAccessibility.PUBLIC, null, data);
        }
 
        /**
index ce377585d816d1cfaeba0d26d1f36b2cdfcb6a2e..e58a56525bfdd33f32f749711757930bb2d848c9 100644 (file)
@@ -26,7 +26,6 @@
  * Represents a runtime data type.
  */
 public abstract class Valadoc.Api.TypeSymbol : Symbol {
-       private SourceComment? source_comment;
        private string? type_macro_name;
        private string? is_type_macro_name;
        private string? type_cast_macro_name;
@@ -37,7 +36,7 @@ public abstract class Valadoc.Api.TypeSymbol : Symbol {
                                           string? type_cast_macro_name, string? type_function_name, bool is_basic_type,
                                           Vala.TypeSymbol data)
        {
-               base (parent, file, name, accessibility, data);
+               base (parent, file, name, accessibility, comment, data);
 
                this.type_cast_macro_name = type_cast_macro_name;
                this.is_type_macro_name = is_type_macro_name;
@@ -45,7 +44,6 @@ public abstract class Valadoc.Api.TypeSymbol : Symbol {
                this.type_macro_name = type_macro_name;
 
                this.is_basic_type = is_basic_type;
-               this.source_comment = comment;
        }
 
        /**
@@ -83,30 +81,4 @@ public abstract class Valadoc.Api.TypeSymbol : Symbol {
        public string get_type_function_name () {
                return type_function_name;
        }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void parse_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       return ;
-               }
-
-               if (source_comment != null) {
-                       documentation = parser.parse (this, source_comment);
-               }
-
-               base.parse_comments (settings, parser);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       internal override void check_comments (Settings settings, DocumentationParser parser) {
-               if (documentation != null) {
-                       parser.check (this, documentation);
-               }
-
-               base.check_comments (settings, parser);
-       }
 }