scilab: support of std::deque
This commit is contained in:
parent
7120e576c8
commit
8701e6f843
5 changed files with 64 additions and 8 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
%include std_common.i
|
||||
%include std_string.i
|
||||
%include std_vector.i
|
||||
%include std_set.i
|
||||
%include std_deque.i
|
||||
%include std_list.i
|
||||
%include std_set.i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue