diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-09-02 10:53:41 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-09-02 20:37:03 +0200 |
commit | 95a4c5568a9afd54ab1684468994fc75d76e43ba (patch) | |
tree | 1040b7e290e5ed128d0b3ad43560fd6d703cca4a | |
parent | f778ba49312c6a026cab6fee9babd8c73aaa532d (diff) | |
download | vala-95a4c5568a9afd54ab1684468994fc75d76e43ba.tar.gz |
vala: Add CallableType as base for DelegateType, MethodType, SignalType
-rw-r--r-- | vala/Makefile.am | 1 | ||||
-rw-r--r-- | vala/valacallabletype.vala | 29 | ||||
-rw-r--r-- | vala/valadelegatetype.vala | 2 | ||||
-rw-r--r-- | vala/valamethodtype.vala | 2 | ||||
-rw-r--r-- | vala/valasignaltype.vala | 2 |
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; |