From c72fff236dd65c7142242b3faf93750e64dd6ba1 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 12 Jan 2015 23:51:08 +0100 Subject: Implemented and tested "Any" Argument type --- src/core/common/Argument.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/core/common/Argument.hpp') diff --git a/src/core/common/Argument.hpp b/src/core/common/Argument.hpp index cb08fc3..7227ddb 100644 --- a/src/core/common/Argument.hpp +++ b/src/core/common/Argument.hpp @@ -118,6 +118,26 @@ public: */ const bool hasDefault; + /** + * Named constructor for an argument with any type. + * + * @param name is the name of the argument as used for error messages and in + * case the arguments are given as a map. + * @return a new Argument instance. + */ + static Argument Any(std::string name); + + /** + * Named constructor for an argument with any type. + * + * @param name is the name of the argument as used for error messages and in + * case the arguments are given as a map. + * @param defaultValue is the default value to be used in case this argument + * is not supplied. + * @return a new Argument instance. + */ + static Argument Any(std::string name, Variant defaultValue); + /** * Named constructor for a boolean argument with no default value. * -- cgit v1.2.3