diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/argument.h | 10 | ||||
-rw-r--r-- | include/arguments.h | 39 | ||||
-rw-r--r-- | include/value.h | 5 |
3 files changed, 51 insertions, 3 deletions
diff --git a/include/argument.h b/include/argument.h index 862b677..5c0c23f 100644 --- a/include/argument.h +++ b/include/argument.h @@ -35,11 +35,19 @@ public: /** * Constructor if the argument can be anything + * Note that only arrayType and callableType are supported type-hints * @param name Name of the argument - * @param type Type hint + * @param type Type hint (arrayType or callableType) * @param ref Is this a pass-by-reference argument? */ Argument(const std::string &name, Type type = nullType, bool ref = false); + + /** + * Constructor if the argument can be anything + * @param name Name of the argument + * @param ref Is this a pass-by-reference argument? + */ + Argument(const std::string &name, bool ref = false); /** * Copy constructor diff --git a/include/arguments.h b/include/arguments.h new file mode 100644 index 0000000..65476c3 --- /dev/null +++ b/include/arguments.h @@ -0,0 +1,39 @@ +/** + * Arguments.h + * + * When a function is invoked, it is passed a vector of arguments. This + * arguments class, that overrides from vector, takes care of that. + * + * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> + * @copyright 2013 Copernica BV + */ + +/** + * Set up namespace + */ +namespace PhpCpp { + +/** + * Class definition + */ +class Arguments : public std::vector<Value> +{ +public: + /** + * Constructor + * @param argc The number of arguments + */ + Arguments(int argc); + + /** + * Destructor + */ + virtual ~Arguments() {} + +}; + +/** + * End of namespace + */ +} + diff --git a/include/value.h b/include/value.h index fe370dc..157a456 100644 --- a/include/value.h +++ b/include/value.h @@ -65,9 +65,10 @@ public: /** * Wrap object around zval - * @param zval + * @param zval Zval to wrap + * @param ref Force this to be a reference */ - Value(struct _zval_struct *zval); + Value(struct _zval_struct *zval, bool ref = false); /** * Copy constructor |