Fix STL wrappers to not generate <: digraphs.

For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
This commit is contained in:
William S Fulton 2015-12-12 14:05:05 +00:00
commit 6b4e57245d
33 changed files with 339 additions and 303 deletions

View file

@ -35,11 +35,11 @@
deque();
deque(unsigned int size, const T& value=T());
deque(const deque<T> &);
deque(const deque< T > &);
~deque();
void assign(unsigned int n, const T& value);
void swap(deque<T> &x);
void swap(deque< T > &x);
unsigned int size() const;
unsigned int max_size() const;
void resize(unsigned int n, T c = T());
@ -78,17 +78,17 @@
throw std::out_of_range("deque index out of range");
}
}
std::deque<T> getslice(int i, int j) {
std::deque< T > getslice(int i, int j) {
int size = int(self->size());
if (i<0) i = size+i;
if (j<0) j = size+j;
if (i<0) i = 0;
if (j>size) j = size;
std::deque<T > tmp(j-i);
std::deque< T > tmp(j-i);
std::copy(self->begin()+i,self->begin()+j,tmp.begin());
return tmp;
}
void setslice(int i, int j, const std::deque<T>& v) {
void setslice(int i, int j, const std::deque< T >& v) {
int size = int(self->size());
if (i<0) i = size+i;
if (j<0) j = size+j;

View file

@ -59,11 +59,11 @@ namespace std {
%traits_swigtype(_Tp);
%traits_enum(_Tp);
%fragment(SWIG_Traits_frag(std::array<_Tp, _Nm >), "header",
%fragment(SWIG_Traits_frag(std::array< _Tp, _Nm >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdArrayTraits") {
namespace swig {
template <> struct traits<std::array<_Tp, _Nm > > {
template <> struct traits<std::array< _Tp, _Nm > > {
typedef pointer_category category;
static const char* type_name() {
return "std::array<" #_Tp "," #_Nm " >";
@ -72,11 +72,11 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_STDARRAY, std::array<_Tp, _Nm >);
%typemap_traits_ptr(SWIG_TYPECHECK_STDARRAY, std::array< _Tp, _Nm >);
#ifdef %swig_array_methods
// Add swig/language extra methods
%swig_array_methods(std::array<_Tp, _Nm >);
%swig_array_methods(std::array< _Tp, _Nm >);
#endif
%std_array_methods(array);

View file

@ -200,7 +200,7 @@ namespace std {
#ifdef %swig_basic_string
// Add swig/language extra methods
%swig_basic_string(std::basic_string<_CharT, _Traits, _Alloc >);
%swig_basic_string(std::basic_string< _CharT, _Traits, _Alloc >);
#endif
#ifdef SWIG_EXPORT_ITERATOR_METHODS
@ -238,19 +238,19 @@ namespace std {
%newobject __radd__;
%extend {
std::basic_string<_CharT,_Traits,_Alloc >* __add__(const basic_string& v) {
std::basic_string<_CharT,_Traits,_Alloc >* res = new std::basic_string<_CharT,_Traits,_Alloc >(*self);
std::basic_string< _CharT,_Traits,_Alloc >* __add__(const basic_string& v) {
std::basic_string< _CharT,_Traits,_Alloc >* res = new std::basic_string< _CharT,_Traits,_Alloc >(*self);
*res += v;
return res;
}
std::basic_string<_CharT,_Traits,_Alloc >* __radd__(const basic_string& v) {
std::basic_string<_CharT,_Traits,_Alloc >* res = new std::basic_string<_CharT,_Traits,_Alloc >(v);
std::basic_string< _CharT,_Traits,_Alloc >* __radd__(const basic_string& v) {
std::basic_string< _CharT,_Traits,_Alloc >* res = new std::basic_string< _CharT,_Traits,_Alloc >(v);
*res += *self;
return res;
}
std::basic_string<_CharT,_Traits,_Alloc > __str__() {
std::basic_string< _CharT,_Traits,_Alloc > __str__() {
return *self;
}

View file

@ -72,7 +72,7 @@ namespace std {
%}
%fragment("StdTraitsCommon","header",fragment="<string>") %{
namespace swig {
namespace swig {
template <class Type>
struct noconst_traits {
typedef Type noconst_type;
@ -86,7 +86,7 @@ namespace swig {
/*
type categories
*/
struct pointer_category { };
struct pointer_category { };
struct value_category { };
/*
@ -99,12 +99,12 @@ namespace swig {
return traits<typename noconst_traits<Type >::noconst_type >::type_name();
}
template <class Type>
template <class Type>
struct traits_info {
static swig_type_info *type_query(std::string name) {
name += " *";
return SWIG_TypeQuery(name.c_str());
}
}
static swig_type_info *type_info() {
static swig_type_info *info = type_query(type_name<Type>());
return info;
@ -125,22 +125,22 @@ namespace swig {
std::string ptrname = name;
ptrname += " *";
return ptrname;
}
}
static const char* type_name() {
static std::string name = make_ptr_name(swig::type_name<Type>());
return name.c_str();
}
};
template <class Type, class Category>
template <class Type, class Category>
struct traits_as { };
template <class Type, class Category>
template <class Type, class Category>
struct traits_check { };
}
%}
/*
Generate the traits for a swigtype
*/
@ -148,7 +148,7 @@ namespace swig {
%define %traits_swigtype(Type...)
%fragment(SWIG_Traits_frag(Type),"header",fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef pointer_category category;
static const char* type_name() { return #Type; }
};
@ -164,7 +164,7 @@ namespace swig {
%define %typemap_traits(Code,Type...)
%typemaps_asvalfrom(%arg(Code),
%arg(swig::asval<Type >),
%arg(swig::asval< Type >),
%arg(swig::from),
%arg(SWIG_Traits_frag(Type)),
%arg(SWIG_Traits_frag(Type)),
@ -194,10 +194,10 @@ namespace swig {
bool operator == (const Type& v) {
return *self == v;
}
bool operator != (const Type& v) {
return *self != v;
}
}
}
%enddef
@ -211,7 +211,7 @@ namespace swig {
bool operator > (const Type& v) {
return *self > v;
}
bool operator < (const Type& v) {
return *self < v;
}

View file

@ -133,10 +133,10 @@
// Ignore member methods for Type with no default constructor
//
%define %std_nodefconst_type(Type...)
%feature("ignore") std::vector<Type >::vector(size_type size);
%feature("ignore") std::vector<Type >::resize(size_type size);
%feature("ignore") std::deque<Type >::deque(size_type size);
%feature("ignore") std::deque<Type >::resize(size_type size);
%feature("ignore") std::list<Type >::list(size_type size);
%feature("ignore") std::list<Type >::resize(size_type size);
%feature("ignore") std::vector< Type >::vector(size_type size);
%feature("ignore") std::vector< Type >::resize(size_type size);
%feature("ignore") std::deque< Type >::deque(size_type size);
%feature("ignore") std::deque< Type >::resize(size_type size);
%feature("ignore") std::list< Type >::list(size_type size);
%feature("ignore") std::list< Type >::resize(size_type size);
%enddef

View file

@ -49,7 +49,7 @@
namespace std {
template<class _Tp, class _Alloc = allocator<_Tp> >
template<class _Tp, class _Alloc = allocator< _Tp > >
class deque {
public:
typedef size_t size_type;
@ -63,11 +63,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::deque<_Tp, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::deque< _Tp, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdDequeTraits") {
namespace swig {
template <> struct traits<std::deque<_Tp, _Alloc > > {
template <> struct traits<std::deque< _Tp, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::deque<" #_Tp " >";
@ -76,18 +76,18 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque<_Tp, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque< _Tp, _Alloc >);
#ifdef %swig_deque_methods
// Add swig/language extra methods
%swig_deque_methods(std::deque<_Tp, _Alloc >);
%swig_deque_methods(std::deque< _Tp, _Alloc >);
#endif
%std_deque_methods(deque);
};
template<class _Tp, class _Alloc >
class deque<_Tp*, _Alloc > {
class deque< _Tp*, _Alloc > {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
@ -100,11 +100,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::deque<_Tp*, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::deque< _Tp*, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdDequeTraits") {
namespace swig {
template <> struct traits<std::deque<_Tp*, _Alloc > > {
template <> struct traits<std::deque< _Tp*, _Alloc > > {
typedef value_category category;
static const char* type_name() {
return "std::deque<" #_Tp " * >";
@ -113,14 +113,14 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque<_Tp*, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque< _Tp*, _Alloc >);
#ifdef %swig_deque_methods_val
// Add swig/language extra methods
%swig_deque_methods_val(std::deque<_Tp*, _Alloc >);
%swig_deque_methods_val(std::deque< _Tp*, _Alloc >);
#endif
%std_deque_methods_val(std::deque<_Tp*, _Alloc >);
%std_deque_methods_val(std::deque< _Tp*, _Alloc >);
};
}

View file

@ -61,7 +61,7 @@
namespace std {
template<class _Tp, class _Alloc = allocator<_Tp> >
template<class _Tp, class _Alloc = allocator< _Tp > >
class list {
public:
typedef size_t size_type;
@ -75,11 +75,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::list<_Tp, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::list< _Tp, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdListTraits") {
namespace swig {
template <> struct traits<std::list<_Tp, _Alloc > > {
template <> struct traits<std::list< _Tp, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::list<" #_Tp ", " #_Alloc " >";
@ -88,18 +88,18 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_LIST, std::list<_Tp, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_LIST, std::list< _Tp, _Alloc >);
#ifdef %swig_list_methods
// Add swig/language extra methods
%swig_list_methods(std::list<_Tp, _Alloc >);
%swig_list_methods(std::list< _Tp, _Alloc >);
#endif
%std_list_methods(list);
};
template<class _Tp, class _Alloc >
class list<_Tp*, _Alloc> {
class list< _Tp*, _Alloc> {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
@ -112,11 +112,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::list<_Tp*, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::list< _Tp*, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdListTraits") {
namespace swig {
template <> struct traits<std::list<_Tp*, _Alloc > > {
template <> struct traits<std::list< _Tp*, _Alloc > > {
typedef value_category category;
static const char* type_name() {
return "std::list<" #_Tp " *," #_Alloc " >";
@ -125,11 +125,11 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_LIST, std::list<_Tp*, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_LIST, std::list< _Tp*, _Alloc >);
#ifdef %swig_list_methods_val
// Add swig/language extra methods
%swig_list_methods_val(std::list<_Tp*, _Alloc >);
%swig_list_methods_val(std::list< _Tp*, _Alloc >);
#endif
%std_list_methods_val(list);
@ -138,9 +138,9 @@ namespace std {
}
%define %std_extequal_list(...)
%extend std::list<__VA_ARGS__ > {
%extend std::list< __VA_ARGS__ > {
void remove(const value_type& x) { self->remove(x); }
void merge(std::list<__VA_ARGS__ >& x){ self->merge(x); }
void merge(std::list< __VA_ARGS__ >& x){ self->merge(x); }
void unique() { self->unique(); }
void sort() { self->sort(); }
}

View file

@ -66,14 +66,14 @@
namespace std {
template<class _Key, class _Tp, class _Compare = std::less<_Key >,
class _Alloc = allocator<std::pair<const _Key, _Tp > > >
class _Alloc = allocator<std::pair< const _Key, _Tp > > >
class map {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Key key_type;
typedef _Tp mapped_type;
typedef std::pair<const _Key, _Tp> value_type;
typedef std::pair< const _Key, _Tp > value_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
@ -98,11 +98,11 @@ namespace std {
}
}
%fragment(SWIG_Traits_frag(std::map<_Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
%fragment(SWIG_Traits_frag(std::map< _Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair< _Key, _Tp >),
fragment="StdMapTraits") {
namespace swig {
template <> struct traits<std::map<_Key, _Tp, _Compare, _Alloc > > {
template <> struct traits<std::map< _Key, _Tp, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::map<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
@ -111,13 +111,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::map<_Key, _Tp, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::map< _Key, _Tp, _Compare, _Alloc >);
map( const _Compare& );
#ifdef %swig_map_methods
// Add swig/language extra methods
%swig_map_methods(std::map<_Key, _Tp, _Compare, _Alloc >);
%swig_map_methods(std::map< _Key, _Tp, _Compare, _Alloc >);
#endif
%std_map_methods(map);

View file

@ -41,15 +41,15 @@
namespace std {
template<class _Key, class _Tp, class _Compare = std::less<_Key >,
class _Alloc = allocator<std::pair<const _Key, _Tp > > >
template<class _Key, class _Tp, class _Compare = std::less< _Key >,
class _Alloc = allocator<std::pair< const _Key, _Tp > > >
class multimap {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Key key_type;
typedef _Tp mapped_type;
typedef std::pair<const _Key, _Tp> value_type;
typedef std::pair< const _Key, _Tp > value_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
@ -74,11 +74,11 @@ namespace std {
}
}
%fragment(SWIG_Traits_frag(std::multimap<_Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
%fragment(SWIG_Traits_frag(std::multimap< _Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair< _Key, _Tp >),
fragment="StdMultimapTraits") {
namespace swig {
template <> struct traits<std::multimap<_Key, _Tp, _Compare, _Alloc > > {
template <> struct traits<std::multimap< _Key, _Tp, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::multimap<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
@ -87,13 +87,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::multimap<_Key, _Tp, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::multimap< _Key, _Tp, _Compare, _Alloc >);
multimap( const _Compare& );
#ifdef %swig_multimap_methods
// Add swig/language extra methods
%swig_multimap_methods(std::multimap<_Key, _Tp, _Compare, _Alloc >);
%swig_multimap_methods(std::multimap< _Key, _Tp, _Compare, _Alloc >);
#endif
%std_multimap_methods(multimap);

View file

@ -40,8 +40,8 @@ namespace std {
//multiset
template <class _Key, class _Compare = std::less<_Key>,
class _Alloc = allocator<_Key> >
template <class _Key, class _Compare = std::less< _Key >,
class _Alloc = allocator< _Key > >
class multiset {
public:
typedef size_t size_type;
@ -56,11 +56,11 @@ namespace std {
%traits_swigtype(_Key);
%fragment(SWIG_Traits_frag(std::multiset<_Key, _Compare, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::multiset< _Key, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Key),
fragment="StdMultisetTraits") {
namespace swig {
template <> struct traits<std::multiset<_Key, _Compare, _Alloc > > {
template <> struct traits<std::multiset< _Key, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::multiset<" #_Key "," #_Compare "," #_Alloc " >";
@ -69,13 +69,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::multiset<_Key, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::multiset< _Key, _Compare, _Alloc >);
multiset( const _Compare& );
#ifdef %swig_multiset_methods
// Add swig/language extra methods
%swig_multiset_methods(std::multiset<_Key, _Compare, _Alloc >);
%swig_multiset_methods(std::multiset< _Key, _Compare, _Alloc >);
#endif
%std_multiset_methods(multiset);

View file

@ -13,12 +13,12 @@ namespace std {
%traits_swigtype(T);
%traits_swigtype(U);
%fragment(SWIG_Traits_frag(std::pair<T,U >), "header",
%fragment(SWIG_Traits_frag(std::pair< T, U >), "header",
fragment=SWIG_Traits_frag(T),
fragment=SWIG_Traits_frag(U),
fragment="StdPairTraits") {
namespace swig {
template <> struct traits<std::pair<T,U > > {
template <> struct traits<std::pair< T, U > > {
typedef pointer_category category;
static const char* type_name() {
return "std::pair<" #T "," #U " >";
@ -28,23 +28,23 @@ namespace std {
}
#ifndef SWIG_STD_PAIR_ASVAL
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair< T, U >);
#else
%typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
%typemap_traits(SWIG_TYPECHECK_PAIR, std::pair< T, U >);
#endif
pair();
pair(T first, U second);
pair(const pair& p);
template <class U1, class U2> pair(const pair<U1, U2> &p);
template <class U1, class U2> pair(const pair< U1, U2 > &p);
T first;
U second;
#ifdef %swig_pair_methods
// Add swig/language extra methods
%swig_pair_methods(std::pair<T,U >)
%swig_pair_methods(std::pair< T, U >)
#endif
};
@ -52,19 +52,19 @@ namespace std {
// The following specializations should disappear or get
// simplified when a 'const SWIGTYPE*&' can be defined
// ***
template <class T, class U > struct pair<T, U*> {
template <class T, class U > struct pair< T, U* > {
typedef T first_type;
typedef U* second_type;
%traits_swigtype(T);
%traits_swigtype(U);
%fragment(SWIG_Traits_frag(std::pair<T,U* >), "header",
%fragment(SWIG_Traits_frag(std::pair< T, U* >), "header",
fragment=SWIG_Traits_frag(T),
fragment=SWIG_Traits_frag(U),
fragment="StdPairTraits") {
namespace swig {
template <> struct traits<std::pair<T,U* > > {
template <> struct traits<std::pair< T, U* > > {
typedef pointer_category category;
static const char* type_name() {
return "std::pair<" #T "," #U " * >";
@ -73,7 +73,7 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U* >);
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair< T, U* >);
pair();
pair(T __a, U* __b);
@ -84,23 +84,23 @@ namespace std {
#ifdef %swig_pair_methods
// Add swig/language extra methods
%swig_pair_methods(std::pair<T,U*>)
%swig_pair_methods(std::pair< T, U* >)
#endif
};
template <class T, class U > struct pair<T*, U> {
template <class T, class U > struct pair< T*, U > {
typedef T* first_type;
typedef U second_type;
%traits_swigtype(T);
%traits_swigtype(U);
%fragment(SWIG_Traits_frag(std::pair<T*,U >), "header",
%fragment(SWIG_Traits_frag(std::pair< T*, U >), "header",
fragment=SWIG_Traits_frag(T),
fragment=SWIG_Traits_frag(U),
fragment="StdPairTraits") {
namespace swig {
template <> struct traits<std::pair<T*,U > > {
template <> struct traits<std::pair< T*, U > > {
typedef pointer_category category;
static const char* type_name() {
return "std::pair<" #T " *," #U " >";
@ -109,7 +109,7 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T*,U >);
%typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair< T*, U >);
pair();
pair(T* __a, U __b);
@ -120,23 +120,23 @@ namespace std {
#ifdef %swig_pair_methods
// Add swig/language extra methods
%swig_pair_methods(std::pair<T*,U >)
%swig_pair_methods(std::pair< T*, U >)
#endif
};
template <class T, class U > struct pair<T*, U*> {
template <class T, class U > struct pair< T*, U* > {
typedef T* first_type;
typedef U* second_type;
%traits_swigtype(T);
%traits_swigtype(U);
%fragment(SWIG_Traits_frag(std::pair<T*,U* >), "header",
%fragment(SWIG_Traits_frag(std::pair< T*, U* >), "header",
fragment=SWIG_Traits_frag(T),
fragment=SWIG_Traits_frag(U),
fragment="StdPairTraits") {
namespace swig {
template <> struct traits<std::pair<T*,U* > > {
template <> struct traits<std::pair< T*, U* > > {
typedef pointer_category category;
static const char* type_name() {
return "std::pair<" #T " *," #U " * >";
@ -145,7 +145,7 @@ namespace std {
}
}
%typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T*,U* >);
%typemap_traits(SWIG_TYPECHECK_PAIR, std::pair< T*, U* >);
pair();
pair(T* __a, U* __b);
@ -156,7 +156,7 @@ namespace std {
#ifdef %swig_pair_methods
// Add swig/language extra methods
%swig_pair_methods(std::pair<T*,U*>)
%swig_pair_methods(std::pair< T*, U* >)
#endif
};

View file

@ -57,7 +57,7 @@
namespace std {
template<class _Tp, class _Sequence = std::deque<_Tp> >
template<class _Tp, class _Sequence = std::deque< _Tp > >
class queue {
public:
typedef size_t size_type;
@ -68,11 +68,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::queue<_Tp, _Sequence >), "header",
%fragment(SWIG_Traits_frag(std::queue< _Tp, _Sequence >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdQueueTraits") {
namespace swig {
template <> struct traits<std::queue<_Tp, _Sequence > > {
template <> struct traits<std::queue< _Tp, _Sequence > > {
typedef pointer_category category;
static const char* type_name() {
return "std::queue<" #_Tp "," #_Sequence " >";
@ -81,18 +81,18 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_QUEUE, std::queue<_Tp, _Sequence >);
%typemap_traits_ptr(SWIG_TYPECHECK_QUEUE, std::queue< _Tp, _Sequence >);
#ifdef %swig_queue_methods
// Add swig/language extra methods
%swig_queue_methods(std::queue<_Tp, _Sequence >);
%swig_queue_methods(std::queue< _Tp, _Sequence >);
#endif
%std_queue_methods(queue);
};
template<class _Tp, class _Sequence >
class queue<_Tp*, _Sequence > {
class queue< _Tp*, _Sequence > {
public:
typedef size_t size_type;
typedef _Tp value_type;
@ -102,11 +102,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::queue<_Tp*, _Sequence >), "header",
%fragment(SWIG_Traits_frag(std::queue< _Tp*, _Sequence >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdQueueTraits") {
namespace swig {
template <> struct traits<std::queue<_Tp*, _Sequence > > {
template <> struct traits<std::queue< _Tp*, _Sequence > > {
typedef value_category category;
static const char* type_name() {
return "std::queue<" #_Tp "," #_Sequence " * >";
@ -115,14 +115,14 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_QUEUE, std::queue<_Tp*, _Sequence >);
%typemap_traits_ptr(SWIG_TYPECHECK_QUEUE, std::queue< _Tp*, _Sequence >);
#ifdef %swig_queue_methods_val
// Add swig/language extra methods
%swig_queue_methods_val(std::queue<_Tp*, _Sequence >);
%swig_queue_methods_val(std::queue< _Tp*, _Sequence >);
#endif
%std_queue_methods_val(std::queue<_Tp*, _Sequence >);
%std_queue_methods_val(std::queue< _Tp*, _Sequence >);
};
}

View file

@ -79,8 +79,8 @@
namespace std {
template <class _Key, class _Compare = std::less<_Key>,
class _Alloc = allocator<_Key> >
template <class _Key, class _Compare = std::less< _Key >,
class _Alloc = allocator< _Key > >
class set {
public:
typedef size_t size_type;
@ -95,11 +95,11 @@ namespace std {
%traits_swigtype(_Key);
%fragment(SWIG_Traits_frag(std::set<_Key, _Compare, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::set< _Key, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Key),
fragment="StdSetTraits") {
namespace swig {
template <> struct traits<std::set<_Key, _Compare, _Alloc > > {
template <> struct traits<std::set< _Key, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::set<" #_Key "," #_Compare "," #_Alloc " >";
@ -108,13 +108,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_SET, std::set<_Key, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_SET, std::set< _Key, _Compare, _Alloc >);
set( const _Compare& );
#ifdef %swig_set_methods
// Add swig/language extra methods
%swig_set_methods(std::set<_Key, _Compare, _Alloc >);
%swig_set_methods(std::set< _Key, _Compare, _Alloc >);
#endif
%std_set_methods(set);

View file

@ -56,7 +56,7 @@
namespace std {
template<class _Tp, class _Sequence = std::deque<_Tp> >
template<class _Tp, class _Sequence = std::deque< _Tp > >
class stack {
public:
typedef size_t size_type;
@ -67,11 +67,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::stack<_Tp, _Sequence >), "header",
%fragment(SWIG_Traits_frag(std::stack< _Tp, _Sequence >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdStackTraits") {
namespace swig {
template <> struct traits<std::stack<_Tp, _Sequence > > {
template <> struct traits<std::stack< _Tp, _Sequence > > {
typedef pointer_category category;
static const char* type_name() {
return "std::stack<" #_Tp "," #_Sequence " >";
@ -80,18 +80,18 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_STACK, std::stack<_Tp, _Sequence >);
%typemap_traits_ptr(SWIG_TYPECHECK_STACK, std::stack< _Tp, _Sequence >);
#ifdef %swig_stack_methods
// Add swig/language extra methods
%swig_stack_methods(std::stack<_Tp, _Sequence >);
%swig_stack_methods(std::stack< _Tp, _Sequence >);
#endif
%std_stack_methods(stack);
};
template<class _Tp, class _Sequence >
class stack<_Tp*, _Sequence > {
class stack< _Tp*, _Sequence > {
public:
typedef size_t size_type;
typedef _Sequence::value_type value_type;
@ -101,11 +101,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::stack<_Tp*, _Sequence >), "header",
%fragment(SWIG_Traits_frag(std::stack< _Tp*, _Sequence >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdStackTraits") {
namespace swig {
template <> struct traits<std::stack<_Tp*, _Sequence > > {
template <> struct traits<std::stack< _Tp*, _Sequence > > {
typedef value_category category;
static const char* type_name() {
return "std::stack<" #_Tp "," #_Sequence " * >";
@ -114,14 +114,14 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_STACK, std::stack<_Tp*, _Sequence >);
%typemap_traits_ptr(SWIG_TYPECHECK_STACK, std::stack< _Tp*, _Sequence >);
#ifdef %swig_stack_methods_val
// Add swig/language extra methods
%swig_stack_methods_val(std::stack<_Tp*, _Sequence >);
%swig_stack_methods_val(std::stack< _Tp*, _Sequence >);
#endif
%std_stack_methods_val(std::stack<_Tp*, _Sequence >);
%std_stack_methods_val(std::stack< _Tp*, _Sequence >);
};
}

View file

@ -68,15 +68,15 @@
namespace std {
template<class _Key, class _Tp, class _Compare = std::less<_Key >,
class _Alloc = allocator<std::pair<const _Key, _Tp > > >
template<class _Key, class _Tp, class _Compare = std::less< _Key >,
class _Alloc = allocator<std::pair< const _Key, _Tp > > >
class unordered_map {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Key key_type;
typedef _Tp mapped_type;
typedef std::pair<const _Key, _Tp> value_type;
typedef std::pair< const _Key, _Tp > value_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
@ -101,11 +101,11 @@ namespace std {
}
}
%fragment(SWIG_Traits_frag(std::unordered_map<_Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
%fragment(SWIG_Traits_frag(std::unordered_map< _Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair< _Key, _Tp >),
fragment="StdMapTraits") {
namespace swig {
template <> struct traits<std::unordered_map<_Key, _Tp, _Compare, _Alloc > > {
template <> struct traits<std::unordered_map< _Key, _Tp, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::unordered_map<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
@ -114,13 +114,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::unordered_map<_Key, _Tp, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::unordered_map< _Key, _Tp, _Compare, _Alloc >);
unordered_map( const _Compare& );
#ifdef %swig_unordered_map_methods
// Add swig/language extra methods
%swig_unordered_map_methods(std::unordered_map<_Key, _Tp, _Compare, _Alloc >);
%swig_unordered_map_methods(std::unordered_map< _Key, _Tp, _Compare, _Alloc >);
#endif
%std_unordered_map_methods(unordered_map);

View file

@ -44,15 +44,15 @@
namespace std {
template<class _Key, class _Tp, class _Compare = std::less<_Key >,
class _Alloc = allocator<std::pair<const _Key, _Tp > > >
template<class _Key, class _Tp, class _Compare = std::less< _Key >,
class _Alloc = allocator<std::pair< const _Key, _Tp > > >
class unordered_multimap {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Key key_type;
typedef _Tp mapped_type;
typedef std::pair<const _Key, _Tp> value_type;
typedef std::pair< const _Key, _Tp > value_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
@ -63,11 +63,11 @@ namespace std {
%traits_swigtype(_Key);
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::unordered_multimap<_Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
%fragment(SWIG_Traits_frag(std::unordered_multimap< _Key, _Tp, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(std::pair< _Key, _Tp >),
fragment="StdMultimapTraits") {
namespace swig {
template <> struct traits<std::unordered_multimap<_Key, _Tp, _Compare, _Alloc > > {
template <> struct traits<std::unordered_multimap< _Key, _Tp, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::unordered_multimap<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
@ -76,13 +76,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::unordered_multimap<_Key, _Tp, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::unordered_multimap< _Key, _Tp, _Compare, _Alloc >);
unordered_multimap( const _Compare& );
#ifdef %swig_unordered_multimap_methods
// Add swig/language extra methods
%swig_unordered_multimap_methods(std::unordered_multimap<_Key, _Tp, _Compare, _Alloc >);
%swig_unordered_multimap_methods(std::unordered_multimap< _Key, _Tp, _Compare, _Alloc >);
#endif
%std_unordered_multimap_methods(unordered_multimap);

View file

@ -43,8 +43,8 @@ namespace std {
//unordered_multiset
template <class _Key, class _Compare = std::less<_Key>,
class _Alloc = allocator<_Key> >
template <class _Key, class _Compare = std::less< _Key >,
class _Alloc = allocator< _Key > >
class unordered_multiset {
public:
typedef size_t size_type;
@ -59,11 +59,11 @@ namespace std {
%traits_swigtype(_Key);
%fragment(SWIG_Traits_frag(std::unordered_multiset<_Key, _Compare, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::unordered_multiset< _Key, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Key),
fragment="StdMultisetTraits") {
namespace swig {
template <> struct traits<std::unordered_multiset<_Key, _Compare, _Alloc > > {
template <> struct traits<std::unordered_multiset< _Key, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::unordered_multiset<" #_Key "," #_Compare "," #_Alloc " >";
@ -72,13 +72,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::unordered_multiset<_Key, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::unordered_multiset< _Key, _Compare, _Alloc >);
unordered_multiset( const _Compare& );
#ifdef %swig_unordered_multiset_methods
// Add swig/language extra methods
%swig_unordered_multiset_methods(std::unordered_multiset<_Key, _Compare, _Alloc >);
%swig_unordered_multiset_methods(std::unordered_multiset< _Key, _Compare, _Alloc >);
#endif
%std_unordered_multiset_methods(unordered_multiset);

View file

@ -77,9 +77,9 @@
namespace std {
template <class _Key, class _Hash = std::hash<_Key>,
class _Compare = std::equal_to<_Key>,
class _Alloc = allocator<_Key> >
template <class _Key, class _Hash = std::hash< _Key >,
class _Compare = std::equal_to< _Key >,
class _Alloc = allocator< _Key > >
class unordered_set {
public:
typedef size_t size_type;
@ -95,11 +95,11 @@ namespace std {
%traits_swigtype(_Key);
%fragment(SWIG_Traits_frag(std::unordered_set<_Key, _Hash, _Compare, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::unordered_set< _Key, _Hash, _Compare, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Key),
fragment="StdUnorderedSetTraits") {
namespace swig {
template <> struct traits<std::unordered_set<_Key, _Hash, _Compare, _Alloc > > {
template <> struct traits<std::unordered_set< _Key, _Hash, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::unordered_set<" #_Key "," #_Hash "," #_Compare "," #_Alloc " >";
@ -108,13 +108,13 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_SET, std::unordered_set<_Key, _Hash, _Compare, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_SET, std::unordered_set< _Key, _Hash, _Compare, _Alloc >);
unordered_set( const _Compare& );
#ifdef %swig_unordered_set_methods
// Add swig/language extra methods
%swig_unordered_set_methods(std::unordered_set<_Key, _Hash, _Compare, _Alloc >);
%swig_unordered_set_methods(std::unordered_set< _Key, _Hash, _Compare, _Alloc >);
#endif
%std_unordered_set_methods(unordered_set);

View file

@ -71,11 +71,11 @@ namespace std {
%traits_swigtype(_Tp);
%traits_enum(_Tp);
%fragment(SWIG_Traits_frag(std::vector<_Tp, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::vector< _Tp, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdVectorTraits") {
namespace swig {
template <> struct traits<std::vector<_Tp, _Alloc > > {
template <> struct traits<std::vector< _Tp, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::vector<" #_Tp "," #_Alloc " >";
@ -84,11 +84,11 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp, _Alloc >);
#ifdef %swig_vector_methods
// Add swig/language extra methods
%swig_vector_methods(std::vector<_Tp, _Alloc >);
%swig_vector_methods(std::vector< _Tp, _Alloc >);
#endif
%std_vector_methods(vector);
@ -99,7 +99,7 @@ namespace std {
// a 'const SWIGTYPE*&' can be defined
// ***
template<class _Tp, class _Alloc >
class vector<_Tp*, _Alloc > {
class vector< _Tp*, _Alloc > {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
@ -112,11 +112,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::vector<_Tp*, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::vector< _Tp*, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdVectorTraits") {
namespace swig {
template <> struct traits<std::vector<_Tp*, _Alloc > > {
template <> struct traits<std::vector< _Tp*, _Alloc > > {
typedef value_category category;
static const char* type_name() {
return "std::vector<" #_Tp " *," #_Alloc " >";
@ -125,11 +125,11 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp*, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp*, _Alloc >);
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
%swig_vector_methods_val(std::vector<_Tp*, _Alloc >);
%swig_vector_methods_val(std::vector< _Tp*, _Alloc >);
#endif
%std_vector_methods_val(vector);
@ -139,7 +139,7 @@ namespace std {
// const pointer specialization
// ***
template<class _Tp, class _Alloc >
class vector<_Tp const *, _Alloc > {
class vector< _Tp const *, _Alloc > {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
@ -152,11 +152,11 @@ namespace std {
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::vector<_Tp const*, _Alloc >), "header",
%fragment(SWIG_Traits_frag(std::vector< _Tp const*, _Alloc >), "header",
fragment=SWIG_Traits_frag(_Tp),
fragment="StdVectorTraits") {
namespace swig {
template <> struct traits<std::vector<_Tp const*, _Alloc > > {
template <> struct traits<std::vector< _Tp const*, _Alloc > > {
typedef value_category category;
static const char* type_name() {
return "std::vector<" #_Tp " const*," #_Alloc " >";
@ -165,11 +165,11 @@ namespace std {
}
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp const*, _Alloc >);
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp const*, _Alloc >);
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
%swig_vector_methods_val(std::vector<_Tp const*, _Alloc >);
%swig_vector_methods_val(std::vector< _Tp const*, _Alloc >);
#endif
%std_vector_methods_val(vector);