summaryrefslogtreecommitdiff
path: root/libvaladoc
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-11-18 14:35:05 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2018-11-25 10:38:16 +0100
commit96ccd5bdb1a7bb6375eca90c91111b05cc49afe6 (patch)
tree9deebe5eebfa6357ff4d29a92ca4ed7bfe547b7d /libvaladoc
parent362eec6b5a9282973bf39b871dcee12cbb7fa19b (diff)
downloadvala-96ccd5bdb1a7bb6375eca90c91111b05cc49afe6.tar.gz
libvaladoc: Drop Api.Member
Diffstat (limited to 'libvaladoc')
-rw-r--r--libvaladoc/Makefile.am1
-rw-r--r--libvaladoc/api/constant.vala2
-rw-r--r--libvaladoc/api/enumvalue.vala30
-rw-r--r--libvaladoc/api/errorcode.vala30
-rw-r--r--libvaladoc/api/field.vala2
-rw-r--r--libvaladoc/api/formalparameter.vala2
-rw-r--r--libvaladoc/api/member.vala62
-rw-r--r--libvaladoc/api/method.vala2
-rw-r--r--libvaladoc/api/namespace.vala34
-rw-r--r--libvaladoc/api/property.vala2
-rw-r--r--libvaladoc/api/propertyaccessor.vala2
-rw-r--r--libvaladoc/api/signal.vala2
-rw-r--r--libvaladoc/api/symbol.vala30
-rw-r--r--libvaladoc/api/typeparameter.vala2
-rw-r--r--libvaladoc/api/typesymbol.vala30
15 files changed, 41 insertions, 192 deletions
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
index c2f431d9f..640e98c80 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -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 \
diff --git a/libvaladoc/api/constant.vala b/libvaladoc/api/constant.vala
index fde36246f..c6c1613fe 100644
--- a/libvaladoc/api/constant.vala
+++ b/libvaladoc/api/constant.vala
@@ -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;
/**
diff --git a/libvaladoc/api/enumvalue.vala b/libvaladoc/api/enumvalue.vala
index 55702e1df..c38582329 100644
--- a/libvaladoc/api/enumvalue.vala
+++ b/libvaladoc/api/enumvalue.vala
@@ -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,39 +44,12 @@ 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.
*/
public string get_cname () {
diff --git a/libvaladoc/api/errorcode.vala b/libvaladoc/api/errorcode.vala
index 64f169357..6994f87a7 100644
--- a/libvaladoc/api/errorcode.vala
+++ b/libvaladoc/api/errorcode.vala
@@ -27,47 +27,19 @@ 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.
*/
public string get_cname () {
diff --git a/libvaladoc/api/field.vala b/libvaladoc/api/field.vala
index 16264fbc7..f2f086d8d 100644
--- a/libvaladoc/api/field.vala
+++ b/libvaladoc/api/field.vala
@@ -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,
diff --git a/libvaladoc/api/formalparameter.vala b/libvaladoc/api/formalparameter.vala
index 4c3bd9e24..0014f120b 100644
--- a/libvaladoc/api/formalparameter.vala
+++ b/libvaladoc/api/formalparameter.vala
@@ -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
index 86b276604..000000000
--- a/libvaladoc/api/member.vala
+++ /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);
- }
-}
diff --git a/libvaladoc/api/method.vala b/libvaladoc/api/method.vala
index 19d6f6442..a1aaa4870 100644
--- a/libvaladoc/api/method.vala
+++ b/libvaladoc/api/method.vala
@@ -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;
diff --git a/libvaladoc/api/namespace.vala b/libvaladoc/api/namespace.vala
index b925e37bf..04ddbb20c 100644
--- a/libvaladoc/api/namespace.vala
+++ b/libvaladoc/api/namespace.vala
@@ -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}
*/
diff --git a/libvaladoc/api/property.vala b/libvaladoc/api/property.vala
index 9dd03b5da..a5c8df043 100644
--- a/libvaladoc/api/property.vala
+++ b/libvaladoc/api/property.vala
@@ -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;
diff --git a/libvaladoc/api/propertyaccessor.vala b/libvaladoc/api/propertyaccessor.vala
index c603fae00..55bead0d9 100644
--- a/libvaladoc/api/propertyaccessor.vala
+++ b/libvaladoc/api/propertyaccessor.vala
@@ -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;
diff --git a/libvaladoc/api/signal.vala b/libvaladoc/api/signal.vala
index e89836fcc..511be05bc 100644
--- a/libvaladoc/api/signal.vala
+++ b/libvaladoc/api/signal.vala
@@ -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;
diff --git a/libvaladoc/api/symbol.vala b/libvaladoc/api/symbol.vala
index c68270e0f..7acc29bc5 100644
--- a/libvaladoc/api/symbol.vala
+++ b/libvaladoc/api/symbol.vala
@@ -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);
+ }
}
diff --git a/libvaladoc/api/typeparameter.vala b/libvaladoc/api/typeparameter.vala
index c2b773e7b..410cb7912 100644
--- a/libvaladoc/api/typeparameter.vala
+++ b/libvaladoc/api/typeparameter.vala
@@ -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);
}
/**
diff --git a/libvaladoc/api/typesymbol.vala b/libvaladoc/api/typesymbol.vala
index ce377585d..e58a56525 100644
--- a/libvaladoc/api/typesymbol.vala
+++ b/libvaladoc/api/typesymbol.vala
@@ -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);
- }
}