path: root/headergenerator.h
diff options
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-12-09 16:11:58 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-12-10 15:45:33 -0300
commit88dc53b65f0fa7d6dc918198d7800501861ea3ac (patch)
treefb31fb31c273816397a7786efc29b10ef67cb40c /headergenerator.h
parent23ade48975d7755c38219c86a141f0a910c3e00e (diff)
Converter<T>::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<T>::copyCppObject method. Also moved implementation of Converter<T>::toPython from the generator to ConverterBase<T> in the conversions header, for it makes use of the SbkCopyCppObject. Reviewed by Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'headergenerator.h')
1 files changed, 3 insertions, 2 deletions
diff --git a/headergenerator.h b/headergenerator.h
index 7b337e1a..ad1e3bd9 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);