summaryrefslogtreecommitdiff
path: root/include/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/base.h')
-rw-r--r--include/base.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/base.h b/include/base.h
index 7e33d8d..ed6936d 100644
--- a/include/base.h
+++ b/include/base.h
@@ -168,6 +168,16 @@ public:
*/
virtual Value __call(const char *method, Parameters &params);
+ /**
+ * Call the class as if it was a function
+ *
+ * This method is called when a an object is used with () operators:
+ * $object(). You can override this method to make objects callable.
+ *
+ * @param params The parameters that were passed to the function
+ * @return Value The return value
+ */
+ virtual Value __invoke(Parameters &params);
private:
/**