diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-11 16:03:55 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-11 16:03:55 +0100 |
commit | 849c1c4cd7901213e54af954646a80137ad95619 (patch) | |
tree | 5e1c47c3337b15d866da00426a5e548564f55b45 /include/base.h | |
parent | 75321da61984251d6f5ab97f57efb2050f4dadf2 (diff) |
implemented __invoke method
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 10 |
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 ¶ms); + /** + * 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 ¶ms); private: /** |