diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-09 16:11:58 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-10 15:45:33 -0300 |
commit | 88dc53b65f0fa7d6dc918198d7800501861ea3ac (patch) | |
tree | fb31fb31c273816397a7786efc29b10ef67cb40c /headergenerator.h | |
parent | 23ade48975d7755c38219c86a141f0a910c3e00e (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')
-rw-r--r-- | headergenerator.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 |