summaryrefslogtreecommitdiffstats
path: root/libshiboken/typeresolver.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 18:05:33 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 18:05:33 -0200
commit4954a2e8c95df27168b65519a8b61ce30b8ab0d6 (patch)
tree64c45ae087ee4b8ec158d9f65cba93d27c6a47f2 /libshiboken/typeresolver.h
parentaebf1341686e1a694a5ad9b24e384ee494683af8 (diff)
downloadshiboken-4954a2e8c95df27168b65519a8b61ce30b8ab0d6.tar.gz
shiboken-4954a2e8c95df27168b65519a8b61ce30b8ab0d6.tar.xz
shiboken-4954a2e8c95df27168b65519a8b61ce30b8ab0d6.zip
Removed useless stuff from TypeResolver.
Diffstat (limited to 'libshiboken/typeresolver.h')
-rw-r--r--libshiboken/typeresolver.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/libshiboken/typeresolver.h b/libshiboken/typeresolver.h
index d53d313f..cdd379bc 100644
--- a/libshiboken/typeresolver.h
+++ b/libshiboken/typeresolver.h
@@ -66,40 +66,38 @@ public:
typedef PyObject* (*CppToPythonFunc)(void*);
typedef void (*PythonToCppFunc)(PyObject*, void**);
- typedef void (*DeleteObjectFunc)(void*);
~TypeResolver();
template<typename T>
static TypeResolver* createValueTypeResolver(const char* typeName)
{
- return new TypeResolver(typeName, &Shiboken::Converter<T>::toPython, &pythonToValueType<T>, SbkType<T>(), &callCppDestructor<T>);
+ return createTypeResolver(typeName, &Shiboken::Converter<T>::toPython, &pythonToValueType<T>, SbkType<T>());
}
template<typename T>
static TypeResolver* createObjectTypeResolver(const char* typeName)
{
- return new TypeResolver(typeName, &objectTypeToPython<T>, &pythonToObjectType<T>, SbkType<T>());
+ return createTypeResolver(typeName, &objectTypeToPython<T>, &pythonToObjectType<T>, SbkType<T>());
}
static Type getType(const char* name);
static TypeResolver* get(const char* typeName);
- const char* typeName() const;
PyObject* toPython(void* cppObj);
void toCpp(PyObject* pyObj, void** place);
- void deleteObject(void* object);
PyTypeObject* pythonType();
private:
struct TypeResolverPrivate;
TypeResolverPrivate* m_d;
+ TypeResolver();
// disable object copy
TypeResolver(const TypeResolver&);
TypeResolver& operator=(const TypeResolver&);
- TypeResolver(const char* typeName, CppToPythonFunc cppToPy, PythonToCppFunc pyToCpp, PyTypeObject* pyType, DeleteObjectFunc deleter = 0);
+ static TypeResolver* createTypeResolver(const char* typeName, CppToPythonFunc cppToPy, PythonToCppFunc pyToCpp, PyTypeObject* pyType);
};
}