From 88dc53b65f0fa7d6dc918198d7800501861ea3ac Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 9 Dec 2009 16:11:58 -0300 Subject: Converter::copyCppObject method was replaced by a template function. Added the template function T* SbkCopyCppObject(const T& cppobj); whose task is simply to copy a C++ object. If the binding has a C++ class wrapper for it, the function is specialized to use the copy constructor of the C++ wrapper class. This replaces the Converter::copyCppObject method. Also moved implementation of Converter::toPython from the generator to ConverterBase in the conversions header, for it makes use of the SbkCopyCppObject. Reviewed by Lauro Neto --- headergenerator.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'headergenerator.h') diff --git a/headergenerator.h b/headergenerator.h index 7b337e1ae..ad1e3bd97 100644 --- a/headergenerator.h +++ b/headergenerator.h @@ -44,8 +44,9 @@ private: void writeTypeCheckMacro(QTextStream& s, const TypeEntry* type); void writeExportMacros(QTextStream& s); void writeTypeConverterDecl(QTextStream& s, const TypeEntry* type); - void writePyTypeFunction(QTextStream& s, const AbstractMetaEnum* cppEnum); - void writePyTypeFunction(QTextStream& s, const AbstractMetaClass* cppClass); + void writeSbkTypeFunction(QTextStream& s, const AbstractMetaEnum* cppEnum); + void writeSbkTypeFunction(QTextStream& s, const AbstractMetaClass* cppClass); + void writeSbkCopyCppObjectFunction(QTextStream& s, const AbstractMetaClass* metaClass); }; #endif // HEADERGENERATOR_H -- cgit v1.2.3