aboutsummaryrefslogtreecommitdiffstats
path: root/overloaddata.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-06-15 18:05:27 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-06-17 17:44:56 -0300
commita46578e6edbdc6427439830c94f0e29cf6c6a2f1 (patch)
treea09602c7b7c4fd311c329753656c29cdd6e61038 /overloaddata.h
parent98350997b78efbdbe35a56a0700ac16541229c22 (diff)
Added methods to check if overloads contain any argument with default values.
The hasArgumentWithDefaultValue methods from OverloadData returns true if any argument in the overloads or in the single function passed has a default value assigned to it. A non-static version of this method uses the overloads described by the OverloadData object. Also added the method getArgumentsWithDefaultValues(func) to return a list of the function's arguments that have default values.
Diffstat (limited to 'overloaddata.h')
-rw-r--r--overloaddata.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/overloaddata.h b/overloaddata.h
index 734ef790b..3e5d0cc6c 100644
--- a/overloaddata.h
+++ b/overloaddata.h
@@ -111,6 +111,13 @@ public:
bool hasArgumentTypeReplace() const;
QString argumentTypeReplaced() const;
+ bool hasArgumentWithDefaultValue() const;
+ static bool hasArgumentWithDefaultValue(const AbstractMetaFunctionList& overloads);
+ static bool hasArgumentWithDefaultValue(const AbstractMetaFunction* func);
+
+ /// Returns a list of function arguments which have default values and were not removed.
+ static AbstractMetaArgumentList getArgumentsWithDefaultValues(const AbstractMetaFunction* func);
+
private:
OverloadData(OverloadData* headOverloadData, const AbstractMetaFunction* func,
const AbstractMetaType* argType, int argPos);