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 /cppgenerator.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 'cppgenerator.h')
-rw-r--r-- | cppgenerator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cppgenerator.h b/cppgenerator.h index 2dfeaa5f0..7857974a7 100644 --- a/cppgenerator.h +++ b/cppgenerator.h @@ -65,6 +65,8 @@ private: void writeTypeConverterImpl(QTextStream& s, const TypeEntry* type); + void writeSbkCopyCppObjectFunction(QTextStream& s, const AbstractMetaClass* metaClass); + /** * Writes Python to C++ conversions for arguments on Python wrappers. * If implicit conversions, and thus new object allocation, are needed, |