diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-09-16 16:38:11 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-25 11:03:57 +0100 |
commit | 77c480431bc87350b592a5c1c836be6e9bb9e63c (patch) | |
tree | 3a4329d37915372affbd4f471a5ba16f1754178e /libvaladoc | |
parent | 96ccd5bdb1a7bb6375eca90c91111b05cc49afe6 (diff) | |
download | vala-77c480431bc87350b592a5c1c836be6e9bb9e63c.tar.gz |
libvaladoc: Drop MethodBindingType
Diffstat (limited to 'libvaladoc')
-rw-r--r-- | libvaladoc/Makefile.am | 1 | ||||
-rw-r--r-- | libvaladoc/api/method.vala | 15 | ||||
-rw-r--r-- | libvaladoc/api/methodbindingtype.vala | 55 |
3 files changed, 6 insertions, 65 deletions
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am index 640e98c80..29386d473 100644 --- a/libvaladoc/Makefile.am +++ b/libvaladoc/Makefile.am @@ -72,7 +72,6 @@ libvaladoc_la_VALASOURCES = \ api/interface.vala \ api/item.vala \ api/method.vala \ - api/methodbindingtype.vala \ api/namespace.vala \ api/node.vala \ api/nodetype.vala \ diff --git a/libvaladoc/api/method.vala b/libvaladoc/api/method.vala index a1aaa4870..11d2372b5 100644 --- a/libvaladoc/api/method.vala +++ b/libvaladoc/api/method.vala @@ -32,8 +32,6 @@ public class Valadoc.Api.Method : Symbol, Callable { private string? dbus_name; private string? cname; - private MethodBindingType binding_type; - /** * {@inheritDoc} */ @@ -45,7 +43,7 @@ public class Valadoc.Api.Method : Symbol, Callable { public Method (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility, SourceComment? comment, string? cname, string? dbus_name, string? dbus_result_name, - string? finish_function_cname, MethodBindingType binding_type, bool is_yields, + string? finish_function_cname, bool is_yields, bool is_dbus_visible, bool is_constructor, Vala.Method data) { base (parent, file, name, accessibility, comment, data); @@ -55,7 +53,6 @@ public class Valadoc.Api.Method : Symbol, Callable { this.dbus_name = dbus_name; this.cname = cname; - this.binding_type = binding_type; this.is_dbus_visible = is_dbus_visible; this.is_constructor = is_constructor; this.is_yields = is_yields; @@ -115,7 +112,7 @@ public class Valadoc.Api.Method : Symbol, Callable { */ public bool is_abstract { get { - return binding_type == MethodBindingType.ABSTRACT; + return ((Vala.Method) data).is_abstract; } } @@ -124,7 +121,7 @@ public class Valadoc.Api.Method : Symbol, Callable { */ public bool is_virtual { get { - return binding_type == MethodBindingType.VIRTUAL; + return ((Vala.Method) data).is_virtual; } } @@ -133,7 +130,7 @@ public class Valadoc.Api.Method : Symbol, Callable { */ public bool is_override { get { - return binding_type == MethodBindingType.OVERRIDE; + return ((Vala.Method) data).overrides; } } @@ -142,7 +139,7 @@ public class Valadoc.Api.Method : Symbol, Callable { */ public bool is_static { get { - return !is_constructor && binding_type == MethodBindingType.STATIC + return !is_constructor && ((Vala.Method) data).binding == Vala.MemberBinding.STATIC && parent is Namespace == false; } } @@ -160,7 +157,7 @@ public class Valadoc.Api.Method : Symbol, Callable { */ public bool is_inline { get { - return binding_type == MethodBindingType.INLINE; + return ((Vala.Method) data).is_inline; } } diff --git a/libvaladoc/api/methodbindingtype.vala b/libvaladoc/api/methodbindingtype.vala deleted file mode 100644 index 0e1df797e..000000000 --- a/libvaladoc/api/methodbindingtype.vala +++ /dev/null @@ -1,55 +0,0 @@ -/* methodbindingtype.vala - * - * 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: - * Brosch Florian <flo.brosch@gmail.com> - */ - - -public enum Valadoc.MethodBindingType { - UNMODIFIED, - OVERRIDE, - ABSTRACT, - VIRTUAL, - INLINE, - STATIC; - - public unowned string to_string () { - switch (this) { - case OVERRIDE: - return "override"; - - case ABSTRACT: - return "abstract"; - - case VIRTUAL: - return "virtual"; - - case INLINE: - return "inline"; - - case STATIC: - return "static"; - - case UNMODIFIED: - return ""; - } - - assert_not_reached (); - } -} |