summaryrefslogtreecommitdiffstats
path: root/libshiboken/sbkconverter.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-24 21:58:56 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:28:06 -0300
commit11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb (patch)
treee35318b54abda283ffaae54b69f3cc2f0853a69f /libshiboken/sbkconverter.h
parentcda2c514084ef0ac688e3770cc63c6449da892d5 (diff)
downloadshiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.tar.gz
shiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.tar.xz
shiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.zip
New conversions for containers.
Diffstat (limited to 'libshiboken/sbkconverter.h')
-rw-r--r--libshiboken/sbkconverter.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libshiboken/sbkconverter.h b/libshiboken/sbkconverter.h
index 1fddf5a9..ba8dc8f2 100644
--- a/libshiboken/sbkconverter.h
+++ b/libshiboken/sbkconverter.h
@@ -221,6 +221,28 @@ LIBSHIBOKEN_API SbkConverter* getConverter(const char* typeName);
/// Returns the converter for a primitive type.
LIBSHIBOKEN_API SbkConverter* primitiveTypeConverter(int index);
+/// Returns true if a Python sequence is comprised of objects of the given \p type.
+LIBSHIBOKEN_API bool checkSequenceTypes(PyTypeObject* type, PyObject* pyIn);
+
+/// Returns true if a Python sequence is comprised of objects of a type convertible to the one represented by the given \p converter.
+LIBSHIBOKEN_API bool convertibleSequenceTypes(SbkConverter* converter, PyObject* pyIn);
+
+/// Returns true if a Python sequence is comprised of objects of a type convertible to \p type.
+LIBSHIBOKEN_API bool convertibleSequenceTypes(SbkObjectType* type, PyObject* pyIn);
+
+/// Returns true if a Python sequence can be converted to a C++ pair.
+LIBSHIBOKEN_API bool checkPairTypes(PyTypeObject* firstType, PyTypeObject* secondType, PyObject* pyIn);
+
+/// Returns true if a Python sequence can be converted to a C++ pair.
+LIBSHIBOKEN_API bool convertiblePairTypes(SbkConverter* firstConverter, bool firstCheckExact, SbkConverter* secondConverter, bool secondCheckExact, PyObject* pyIn);
+
+/// Returns true if a Python dictionary can be converted to a C++ hash or map.
+LIBSHIBOKEN_API bool checkDictTypes(PyTypeObject* keyType, PyTypeObject* valueType, PyObject* pyIn);
+
+/// Returns true if a Python dictionary can be converted to a C++ hash or map.
+LIBSHIBOKEN_API bool convertibleDictTypes(SbkConverter* keyConverter, bool keyCheckExact, SbkConverter* valueConverter, bool valueCheckExact, PyObject* pyIn);
+
+
#define SBK_PY_LONG_LONG_IDX 0
#define SBK_BOOL_IDX 1
#define SBK_CHAR_IDX 2