diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-07-28 03:10:39 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:05 -0300 |
commit | f50a2b5841d63ddaef3195a29bfe3e07de91157a (patch) | |
tree | 8fb7eab0b6e1f06a81dca56265dc5d70a3a85a37 /generator/cppgenerator.h | |
parent | dbdcbdffa21b754faf6bab309126684427df7ac6 (diff) |
Improved writeInvalidPyObjectCheck() method and updated generator to make use of it.
Diffstat (limited to 'generator/cppgenerator.h')
-rw-r--r-- | generator/cppgenerator.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/generator/cppgenerator.h b/generator/cppgenerator.h index 1ce0c9d60..700ea4ff3 100644 --- a/generator/cppgenerator.h +++ b/generator/cppgenerator.h @@ -56,13 +56,12 @@ private: void writeCppSelfDefinition(QTextStream& s, const AbstractMetaClass* metaClass, bool hasStaticOverload = false); void writeErrorSection(QTextStream& s, OverloadData& overloadData); - /** - * Writes the check section for the validity of wrapped C++ objects. - * \param s text stream to write - * \param argName Python argument name - * \param type the TypeEntry passed when the validity check must confirm the type of the Python wrapper to be checked - */ - void writeInvalidCppObjectCheck(QTextStream& s, const QString& pyArgName); + + /// Writes the check section for the validity of wrapped C++ objects. + void writeInvalidPyObjectCheck(QTextStream& s, const QString& pyObj); + void writeInvalidPyObjectCheck(QTextStream& s, const QString& pyObj, int errorCode); + void writeInvalidPyObjectCheck(QTextStream& s, const QString& pyObj, QString returnValue); + void writeTypeCheck(QTextStream& s, const AbstractMetaType* argType, QString argumentName, bool isNumber = false, QString customType = ""); void writeTypeCheck(QTextStream& s, const OverloadData* overloadData, QString argumentName); |