[vala/staging] vala: Add CallableType as base for DelegateType, MethodType, SignalType



commit 95a4c5568a9afd54ab1684468994fc75d76e43ba
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Sep 2 10:53:41 2017 +0200

    vala: Add CallableType as base for DelegateType, MethodType, SignalType

 vala/Makefile.am           |    1 +
 vala/valacallabletype.vala |   29 +++++++++++++++++++++++++++++
 vala/valadelegatetype.vala |    2 +-
 vala/valamethodtype.vala   |    2 +-
 vala/valasignaltype.vala   |    2 +-
 5 files changed, 33 insertions(+), 3 deletions(-)
---
diff --git a/vala/Makefile.am b/vala/Makefile.am
index e6cf9f0..1772909 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -34,6 +34,7 @@ libvala_la_VALASOURCES = \
        valabooleantype.vala \
        valabreakstatement.vala \
        valacallable.vala \
+       valacallabletype.vala \
        valacastexpression.vala \
        valacatchclause.vala \
        valacharacterliteral.vala \
diff --git a/vala/valacallabletype.vala b/vala/valacallabletype.vala
new file mode 100644
index 0000000..9ad71ff
--- /dev/null
+++ b/vala/valacallabletype.vala
@@ -0,0 +1,29 @@
+/* valacallabletype.vala
+ *
+ * Copyright (C) 2017  Rico Tzschichholz
+ *
+ * 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:
+ *     Rico Tzschichholz <ricotz ubuntu com>
+ */
+
+using GLib;
+
+/**
+ * A callable type, i.e. a delegate, method, or signal type.
+ */
+public abstract class Vala.CallableType : DataType {
+}
diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala
index 221688d..2238b98 100644
--- a/vala/valadelegatetype.vala
+++ b/vala/valadelegatetype.vala
@@ -25,7 +25,7 @@ using GLib;
 /**
  * The type of an instance of a delegate.
  */
-public class Vala.DelegateType : DataType {
+public class Vala.DelegateType : CallableType {
        public Delegate delegate_symbol { get; set; }
 
        public bool is_called_once { get; set; }
diff --git a/vala/valamethodtype.vala b/vala/valamethodtype.vala
index 9a492fa..1cf9a58 100644
--- a/vala/valamethodtype.vala
+++ b/vala/valamethodtype.vala
@@ -25,7 +25,7 @@ using GLib;
 /**
  * The type of a method referencea.
  */
-public class Vala.MethodType : DataType {
+public class Vala.MethodType : CallableType {
        public Method method_symbol { get; set; }
 
        public MethodType (Method method_symbol) {
diff --git a/vala/valasignaltype.vala b/vala/valasignaltype.vala
index 237a549..dbfd043 100644
--- a/vala/valasignaltype.vala
+++ b/vala/valasignaltype.vala
@@ -25,7 +25,7 @@ using GLib;
 /**
  * The type of a signal referencea.
  */
-public class Vala.SignalType : DataType {
+public class Vala.SignalType : CallableType {
        public Signal signal_symbol { get; set; }
 
        Method? connect_method;


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