summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-09-02 10:53:41 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2017-09-02 20:37:03 +0200
commit95a4c5568a9afd54ab1684468994fc75d76e43ba (patch)
tree1040b7e290e5ed128d0b3ad43560fd6d703cca4a
parentf778ba49312c6a026cab6fee9babd8c73aaa532d (diff)
downloadvala-95a4c5568a9afd54ab1684468994fc75d76e43ba.tar.gz
vala: Add CallableType as base for DelegateType, MethodType, SignalType
-rw-r--r--vala/Makefile.am1
-rw-r--r--vala/valacallabletype.vala29
-rw-r--r--vala/valadelegatetype.vala2
-rw-r--r--vala/valamethodtype.vala2
-rw-r--r--vala/valasignaltype.vala2
5 files changed, 33 insertions, 3 deletions
diff --git a/vala/Makefile.am b/vala/Makefile.am
index e6cf9f0a6..177290960 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 000000000..9ad71ff42
--- /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 221688dd8..2238b9814 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 9a492faeb..1cf9a5857 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 237a549d4..dbfd0435a 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;