path: root/sources/shiboken2/generator/shiboken2/overloaddata.h
diff options
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/overloaddata.h')
1 files changed, 31 insertions, 31 deletions
diff --git a/sources/shiboken2/generator/shiboken2/overloaddata.h b/sources/shiboken2/generator/shiboken2/overloaddata.h
index 4759ca9c..4fd4199e 100644
--- a/sources/shiboken2/generator/shiboken2/overloaddata.h
+++ b/sources/shiboken2/generator/shiboken2/overloaddata.h
@@ -38,21 +38,21 @@ QT_FORWARD_DECLARE_CLASS(QDebug)
class ShibokenGenerator;
class OverloadData;
-typedef QVector<OverloadData *> OverloadDataList;
+using OverloadDataList = QVector<OverloadData *>;
class OverloadData
- typedef QVector<const AbstractMetaFunction *> MetaFunctionList;
+ using MetaFunctionList = QVector<const AbstractMetaFunction *>;
- OverloadData(const AbstractMetaFunctionList& overloads, const ShibokenGenerator* generator);
+ OverloadData(const AbstractMetaFunctionList &overloads, const ShibokenGenerator *generator);
int minArgs() const { return m_headOverloadData->m_minArgs; }
int maxArgs() const { return m_headOverloadData->m_maxArgs; }
int argPos() const { return m_argPos; }
- const AbstractMetaType* argType() const { return m_argType; }
+ const AbstractMetaType *argType() const { return m_argType; }
/// Returns a string list containing all the possible return types (including void) for the current OverloadData.
QStringList returnTypes() const;
@@ -70,49 +70,49 @@ public:
bool hasStaticFunction() const;
/// Returns true if any of the overloads passed as argument is static.
- static bool hasStaticFunction(const AbstractMetaFunctionList& overloads);
+ static bool hasStaticFunction(const AbstractMetaFunctionList &overloads);
/// Returns true if any of the overloads for the current OverloadData is not static.
bool hasInstanceFunction() const;
/// Returns true if any of the overloads passed as argument is not static.
- static bool hasInstanceFunction(const AbstractMetaFunctionList& overloads);
+ static bool hasInstanceFunction(const AbstractMetaFunctionList &overloads);
/// Returns true if among the overloads for the current OverloadData there are static and non-static methods altogether.
bool hasStaticAndInstanceFunctions() const;
/// Returns true if among the overloads passed as argument there are static and non-static methods altogether.
- static bool hasStaticAndInstanceFunctions(const AbstractMetaFunctionList& overloads);
+ static bool hasStaticAndInstanceFunctions(const AbstractMetaFunctionList &overloads);
- const AbstractMetaFunction* referenceFunction() const;
- const AbstractMetaArgument* argument(const AbstractMetaFunction* func) const;
+ const AbstractMetaFunction *referenceFunction() const;
+ const AbstractMetaArgument *argument(const AbstractMetaFunction *func) const;
OverloadDataList overloadDataOnPosition(int argPos) const;
bool isHeadOverloadData() const { return this == m_headOverloadData; }
/// Returns the root OverloadData object that represents all the overloads.
- OverloadData* headOverloadData() const { return m_headOverloadData; }
+ OverloadData *headOverloadData() const { return m_headOverloadData; }
/// Returns the function that has a default value at the current OverloadData argument position, otherwise returns null.
- const AbstractMetaFunction* getFunctionWithDefaultValue() const;
+ const AbstractMetaFunction *getFunctionWithDefaultValue() const;
bool nextArgumentHasDefaultValue() const;
/// Returns the nearest occurrence, including this instance, of an argument with a default value.
- OverloadData* findNextArgWithDefault();
- bool isFinalOccurrence(const AbstractMetaFunction* func) const;
+ OverloadData *findNextArgWithDefault();
+ bool isFinalOccurrence(const AbstractMetaFunction *func) const;
/// Returns the list of overloads removing repeated constant functions (ex.: "foo()" and "foo()const", the second is removed).
MetaFunctionList overloadsWithoutRepetition() const;
- const MetaFunctionList& overloads() const { return m_overloads; }
+ const MetaFunctionList &overloads() const { return m_overloads; }
OverloadDataList nextOverloadData() const { return m_nextOverloadData; }
- OverloadData* previousOverloadData() const { return m_previousOverloadData; }
+ OverloadData *previousOverloadData() const { return m_previousOverloadData; }
QVector<int> invalidArgumentLengths() const;
- static int numberOfRemovedArguments(const AbstractMetaFunction* func, int finalArgPos = -1);
- static QPair<int, int> getMinMaxArguments(const AbstractMetaFunctionList& overloads);
+ static int numberOfRemovedArguments(const AbstractMetaFunction *func, int finalArgPos = -1);
+ static QPair<int, int> getMinMaxArguments(const AbstractMetaFunctionList &overloads);
/// Returns true if all overloads have no more than one argument.
- static bool isSingleArgument(const AbstractMetaFunctionList& overloads);
+ static bool isSingleArgument(const AbstractMetaFunctionList &overloads);
void dumpGraph(const QString &filename) const;
QString dumpGraph() const;
@@ -121,39 +121,39 @@ public:
QString argumentTypeReplaced() const;
bool hasArgumentWithDefaultValue() const;
- static bool hasArgumentWithDefaultValue(const AbstractMetaFunctionList& overloads);
- static bool hasArgumentWithDefaultValue(const AbstractMetaFunction* func);
+ 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);
+ static AbstractMetaArgumentList getArgumentsWithDefaultValues(const AbstractMetaFunction *func);
void formatDebug(QDebug &) const;
- OverloadData(OverloadData* headOverloadData, const AbstractMetaFunction* func,
- const AbstractMetaType* argType, int argPos);
+ OverloadData(OverloadData *headOverloadData, const AbstractMetaFunction *func,
+ const AbstractMetaType *argType, int argPos);
- void addOverload(const AbstractMetaFunction* func);
- OverloadData* addOverloadData(const AbstractMetaFunction* func, const AbstractMetaArgument* arg);
+ void addOverload(const AbstractMetaFunction *func);
+ OverloadData *addOverloadData(const AbstractMetaFunction *func, const AbstractMetaArgument *arg);
void sortNextOverloads();
- int functionNumber(const AbstractMetaFunction* func) const;
- OverloadDataList overloadDataOnPosition(OverloadData* overloadData, int argPos) const;
+ int functionNumber(const AbstractMetaFunction *func) const;
+ OverloadDataList overloadDataOnPosition(OverloadData *overloadData, int argPos) const;
int m_minArgs;
int m_maxArgs;
int m_argPos;
- const AbstractMetaType* m_argType;
+ const AbstractMetaType *m_argType;
QString m_argTypeReplaced;
MetaFunctionList m_overloads;
- OverloadData* m_headOverloadData;
+ OverloadData *m_headOverloadData;
OverloadDataList m_nextOverloadData;
- OverloadData* m_previousOverloadData;
- const ShibokenGenerator* m_generator;
+ OverloadData *m_previousOverloadData;
+ const ShibokenGenerator *m_generator;