summaryrefslogtreecommitdiff
path: root/Lib/scilab/std_deque.i
diff options
context:
space:
mode:
authorSimon Marchetto <simon.marchetto@scilab-enterprises.com>2014-03-11 18:34:14 +0100
committerSimon Marchetto <simon.marchetto@scilab-enterprises.com>2014-03-11 18:34:14 +0100
commit8701e6f843a673b4ae97f749cbb89ba1010fbc55 (patch)
treeea76b4d9beba631f5538c18b624ba20c029c6f24 /Lib/scilab/std_deque.i
parent7120e576c8ad222977bf81499e70d79b239d6ce0 (diff)
downloadswig-8701e6f843a673b4ae97f749cbb89ba1010fbc55.tar.gz
scilab: support of std::deque
Diffstat (limited to 'Lib/scilab/std_deque.i')
-rw-r--r--Lib/scilab/std_deque.i32
1 files changed, 31 insertions, 1 deletions
diff --git a/Lib/scilab/std_deque.i b/Lib/scilab/std_deque.i
index cb98f6c2f..d300ef4e9 100644
--- a/Lib/scilab/std_deque.i
+++ b/Lib/scilab/std_deque.i
@@ -1 +1,31 @@
-%include <std/_std_deque.i>
+/*
+ *
+ * C++ type : STL deque
+ * Scilab type : matrix (for vectors of primitive types) or list (for sets of all other types : pointers...)
+ *
+*/
+
+%fragment("StdDequeTraits","header",fragment="StdSequenceTraits")
+%{
+ namespace swig {
+ template <class T>
+ struct traits_asptr<std::deque<T> > {
+ static int asptr(const SwigSciObject &obj, std::deque<T> **deq) {
+ return traits_asptr_stdseq<std::deque<T> >::asptr(obj, deq);
+ }
+ };
+
+ template <class T>
+ struct traits_from<std::deque<T> > {
+ static SwigSciObject from(const std::deque<T>& deq) {
+ return traits_from_stdseq<std::deque<T> >::from(deq);
+ }
+ };
+ }
+%}
+
+
+#define %swig_deque_methods(Type...) %swig_sequence_methods(Type)
+#define %swig_deque_methods_val(Type...) %swig_sequence_methods_val(Type);
+
+%include <std/std_deque.i>