diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2015-12-12 14:05:05 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2015-12-12 14:05:46 +0000 |
commit | 6b4e57245dcea7fb975aad8563bdbf5d9a786ce8 (patch) | |
tree | 484335f5668659f96b384dedecc2c0829123fca4 /Lib/std | |
parent | 625a405b8e42f944fdc1a87e36725f03b8817a85 (diff) | |
download | swig-6b4e57245dcea7fb975aad8563bdbf5d9a786ce8.tar.gz |
Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
Diffstat (limited to 'Lib/std')
-rw-r--r-- | Lib/std/_std_deque.i | 10 | ||||
-rw-r--r-- | Lib/std/std_array.i | 8 | ||||
-rw-r--r-- | Lib/std/std_basic_string.i | 12 | ||||
-rw-r--r-- | Lib/std/std_common.i | 28 | ||||
-rw-r--r-- | Lib/std/std_container.i | 12 | ||||
-rw-r--r-- | Lib/std/std_deque.i | 22 | ||||
-rw-r--r-- | Lib/std/std_list.i | 24 | ||||
-rw-r--r-- | Lib/std/std_map.i | 14 | ||||
-rw-r--r-- | Lib/std/std_multimap.i | 16 | ||||
-rw-r--r-- | Lib/std/std_multiset.i | 12 | ||||
-rw-r--r-- | Lib/std/std_pair.i | 42 | ||||
-rw-r--r-- | Lib/std/std_queue.i | 22 | ||||
-rw-r--r-- | Lib/std/std_set.i | 12 | ||||
-rw-r--r-- | Lib/std/std_stack.i | 22 | ||||
-rw-r--r-- | Lib/std/std_unordered_map.i | 16 | ||||
-rw-r--r-- | Lib/std/std_unordered_multimap.i | 16 | ||||
-rw-r--r-- | Lib/std/std_unordered_multiset.i | 12 | ||||
-rw-r--r-- | Lib/std/std_unordered_set.i | 14 | ||||
-rw-r--r-- | Lib/std/std_vector.i | 28 |
19 files changed, 171 insertions, 171 deletions
diff --git a/Lib/std/_std_deque.i b/Lib/std/_std_deque.i index 7dd3552db..e860e947f 100644 --- a/Lib/std/_std_deque.i +++ b/Lib/std/_std_deque.i @@ -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; diff --git a/Lib/std/std_array.i b/Lib/std/std_array.i index a308eccad..aadc3b80c 100644 --- a/Lib/std/std_array.i +++ b/Lib/std/std_array.i @@ -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); diff --git a/Lib/std/std_basic_string.i b/Lib/std/std_basic_string.i index 1aa5721c9..fb7afc1e6 100644 --- a/Lib/std/std_basic_string.i +++ b/Lib/std/std_basic_string.i @@ -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; } diff --git a/Lib/std/std_common.i b/Lib/std/std_common.i index 6e93e29f6..b79eaff3a 100644 --- a/Lib/std/std_common.i +++ b/Lib/std/std_common.i @@ -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; } diff --git a/Lib/std/std_container.i b/Lib/std/std_container.i index fc46aed0c..5fa085afa 100644 --- a/Lib/std/std_container.i +++ b/Lib/std/std_container.i @@ -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 diff --git a/Lib/std/std_deque.i b/Lib/std/std_deque.i index a99763b79..29560caed 100644 --- a/Lib/std/std_deque.i +++ b/Lib/std/std_deque.i @@ -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 >); }; } diff --git a/Lib/std/std_list.i b/Lib/std/std_list.i index e08935170..1aaec0aa9 100644 --- a/Lib/std/std_list.i +++ b/Lib/std/std_list.i @@ -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(); } } diff --git a/Lib/std/std_map.i b/Lib/std/std_map.i index d1f6b3a16..8043f924c 100644 --- a/Lib/std/std_map.i +++ b/Lib/std/std_map.i @@ -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); diff --git a/Lib/std/std_multimap.i b/Lib/std/std_multimap.i index 39f674da5..7aa949907 100644 --- a/Lib/std/std_multimap.i +++ b/Lib/std/std_multimap.i @@ -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); diff --git a/Lib/std/std_multiset.i b/Lib/std/std_multiset.i index b63fb92b9..1aa7ccce8 100644 --- a/Lib/std/std_multiset.i +++ b/Lib/std/std_multiset.i @@ -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); diff --git a/Lib/std/std_pair.i b/Lib/std/std_pair.i index 2743430e9..001cd6738 100644 --- a/Lib/std/std_pair.i +++ b/Lib/std/std_pair.i @@ -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 }; diff --git a/Lib/std/std_queue.i b/Lib/std/std_queue.i index 42273eee6..7452a4b60 100644 --- a/Lib/std/std_queue.i +++ b/Lib/std/std_queue.i @@ -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 >); }; } diff --git a/Lib/std/std_set.i b/Lib/std/std_set.i index f96ddd9f1..107a23c71 100644 --- a/Lib/std/std_set.i +++ b/Lib/std/std_set.i @@ -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); diff --git a/Lib/std/std_stack.i b/Lib/std/std_stack.i index fb900a57c..48dae0585 100644 --- a/Lib/std/std_stack.i +++ b/Lib/std/std_stack.i @@ -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 >); }; } diff --git a/Lib/std/std_unordered_map.i b/Lib/std/std_unordered_map.i index 8c276172a..1cb714821 100644 --- a/Lib/std/std_unordered_map.i +++ b/Lib/std/std_unordered_map.i @@ -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); diff --git a/Lib/std/std_unordered_multimap.i b/Lib/std/std_unordered_multimap.i index 74efb2896..46b56d88a 100644 --- a/Lib/std/std_unordered_multimap.i +++ b/Lib/std/std_unordered_multimap.i @@ -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); diff --git a/Lib/std/std_unordered_multiset.i b/Lib/std/std_unordered_multiset.i index 56b971011..725ca2fe7 100644 --- a/Lib/std/std_unordered_multiset.i +++ b/Lib/std/std_unordered_multiset.i @@ -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); diff --git a/Lib/std/std_unordered_set.i b/Lib/std/std_unordered_set.i index ed8888eb4..98e792040 100644 --- a/Lib/std/std_unordered_set.i +++ b/Lib/std/std_unordered_set.i @@ -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); diff --git a/Lib/std/std_vector.i b/Lib/std/std_vector.i index baecf8507..fae759a36 100644 --- a/Lib/std/std_vector.i +++ b/Lib/std/std_vector.i @@ -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); |