summaryrefslogtreecommitdiff
path: root/bindings/swig/package/stringmgr.i
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/swig/package/stringmgr.i')
-rw-r--r--bindings/swig/package/stringmgr.i26
1 files changed, 26 insertions, 0 deletions
diff --git a/bindings/swig/package/stringmgr.i b/bindings/swig/package/stringmgr.i
new file mode 100644
index 0000000..ba216b1
--- /dev/null
+++ b/bindings/swig/package/stringmgr.i
@@ -0,0 +1,26 @@
+
+%{
+#include "stringmgr.h"
+class PyStringMgr : public sword::StringMgr
+{
+ public:
+ char *upperUTF8(char *text, unsigned int max = 0) const
+ {
+ sword::SWBuf buf=(const char*)text;
+ getUpper(&buf);
+ strncpy(text, buf.c_str(), (max) ? max : strlen(text));
+ return text;
+ }
+
+ virtual void getUpper(sword::SWBuf* test) const = 0;
+};
+%}
+
+%include "stringmgr.h"
+class PyStringMgr : public sword::StringMgr
+{
+ public:
+ char *upperUTF8(char *text, unsigned int max = 0) const;
+ virtual void getUpper(sword::SWBuf* test) const = 0;
+};
+