summaryrefslogtreecommitdiff
path: root/vala/valacallable.vala
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2011-01-10 10:31:19 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2016-10-11 11:06:50 +0200
commitc68490abe583e68766c20ed41dbd0fb875a8dcdf (patch)
tree54bc6fe2704057493a241330a509f1998703fb9b /vala/valacallable.vala
parent99aeafe607b29dcdc35b405641c4124595b4c7e6 (diff)
downloadvala-c68490abe583e68766c20ed41dbd0fb875a8dcdf.tar.gz
vala: Add common Callable interface for Method, Delegate and Signal.
https://bugzilla.gnome.org/show_bug.cgi?id=639124
Diffstat (limited to 'vala/valacallable.vala')
-rw-r--r--vala/valacallable.vala45
1 files changed, 45 insertions, 0 deletions
diff --git a/vala/valacallable.vala b/vala/valacallable.vala
new file mode 100644
index 000000000..5b29aa9ff
--- /dev/null
+++ b/vala/valacallable.vala
@@ -0,0 +1,45 @@
+/* valacallable.vala
+ *
+ * Copyright (C) 2011 Luca Bruno
+ *
+ * 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:
+ * Luca Bruno <lucabru@src.gnome.org>
+ */
+
+using GLib;
+
+/**
+ * Interface for all callable types.
+ */
+public interface Vala.Callable : CodeNode {
+ /**
+ * The return type of this callable.
+ */
+ public abstract DataType return_type { get; set; }
+
+ /**
+ * Appends parameter to this callable.
+ *
+ * @param param a formal parameter
+ */
+ public abstract void add_parameter (Parameter param);
+
+ /**
+ * Returns the parameter list.
+ */
+ public abstract List<Parameter> get_parameters ();
+}