]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Add CallableType as base for DelegateType, MethodType, SignalType
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 2 Sep 2017 08:53:41 +0000 (10:53 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 2 Sep 2017 18:37:03 +0000 (20:37 +0200)
vala/Makefile.am
vala/valacallabletype.vala [new file with mode: 0644]
vala/valadelegatetype.vala
vala/valamethodtype.vala
vala/valasignaltype.vala

index e6cf9f0a62b2fdfa3476e08181cff6155baf71e0..177290960cdfb24ad4cffddb729ab87a4a422084 100644 (file)
@@ -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 (file)
index 0000000..9ad71ff
--- /dev/null
@@ -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 {
+}
index 221688dd8bc5dbf35ec70a157e26dd1ff8f5a3c6..2238b9814910abc42ae445dac33ab4df267c0eea 100644 (file)
@@ -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; }
index 9a492faebfdccd77f5e812cfc1939920b8043c1b..1cf9a5857a7d15591177cd6b1144420b27921e00 100644 (file)
@@ -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) {
index 237a549d4547ad90dadc839145f3257c8e4eb716..dbfd0435a15319e55f56117561dd565d313840af 100644 (file)
@@ -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;