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
parent 625a405b8e
commit 6b4e57245d
33 changed files with 339 additions and 303 deletions

View File

@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.8 (in progress)
===========================
2015-12-12: wsfulton
Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
2015-11-25: wsfulton
[Ruby] STL ranges and slices fixes.

View File

@ -60,3 +60,20 @@ int product3(const std::pair<int, int> *p) {
%}
// Test that the digraph <::aa::Holder> is not generated for stl containers
%include <std_pair.i>
%inline %{
namespace aa {
struct Holder {
Holder(int n = 0) : number(n) {}
int number;
};
}
%}
%template(PairTest) std::pair< ::aa::Holder, int >;
%inline %{
std::pair< ::aa::Holder, int > pair1(std::pair< ::aa::Holder, int > x) { return x; }
%}

View File

@ -108,3 +108,25 @@ const std::vector<const Struct *> & vecstructconstptr(const std::vector<const St
std::vector< swig::LANGUAGE_OBJ > LanguageVector;
}
#endif
// Test that the digraph <::aa::Holder> is not generated
%include <std_vector.i>
%inline %{
namespace aa {
struct Holder {
Holder(int n = 0) : number(n) {}
int number;
};
}
%}
#if !defined(SWIGOCTAVE)
// To fix: something different in Octave is preventing this from working
%template(VectorTest) std::vector< ::aa::Holder >;
%inline %{
std::vector< ::aa::Holder > vec1(std::vector< ::aa::Holder > x) { return x; }
%}
#endif

View File

@ -43,9 +43,9 @@ namespace std {
template<class K, class T> class map {
%typemap(in) map<K,T> (std::map<K,T>* m) {
if (scm_is_null($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
} else if (scm_is_pair($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
SCM alist = $input;
while (!scm_is_null(alist)) {
K* k;
@ -77,10 +77,10 @@ namespace std {
const map<K,T>* (std::map<K,T> temp,
std::map<K,T>* m) {
if (scm_is_null($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
SCM alist = $input;
while (!scm_is_null(alist)) {
@ -109,8 +109,7 @@ namespace std {
}
%typemap(out) map<K,T> {
SCM alist = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=$i.rbegin();
i!=$i.rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=$i.rbegin(); i!=$i.rend(); ++i) {
K* key = new K(i->first);
T* val = new T(i->second);
SCM k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
@ -156,7 +155,7 @@ namespace std {
}
} else {
/* wrapped map? */
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -201,7 +200,7 @@ namespace std {
}
} else {
/* wrapped map? */
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -222,14 +221,14 @@ namespace std {
typedef K key_type;
typedef T mapped_type;
map();
map(const map<K,T> &);
map(const map< K, T> &);
unsigned int size() const;
bool empty() const;
void clear();
%extend {
const T& __getitem__(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
return i->second;
else
@ -239,20 +238,19 @@ namespace std {
(*self)[key] = x;
}
void __delitem__(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
self->erase(i);
else
throw std::out_of_range("key not found");
}
bool has_key(const K& key) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
return i != self->end();
}
SCM keys() {
SCM result = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=self->rbegin();
i!=self->rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=self->rbegin(); i!=self->rend(); ++i) {
K* key = new K(i->first);
SCM k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
result = scm_cons(k,result);
@ -270,9 +268,9 @@ namespace std {
template<class T> class map<K,T> {
%typemap(in) map<K,T> (std::map<K,T>* m) {
if (scm_is_null($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
} else if (scm_is_pair($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
SCM alist = $input;
while (!scm_is_null(alist)) {
T* x;
@ -305,10 +303,10 @@ namespace std {
const map<K,T>* (std::map<K,T> temp,
std::map<K,T>* m) {
if (scm_is_null($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
SCM alist = $input;
while (!scm_is_null(alist)) {
@ -338,8 +336,7 @@ namespace std {
}
%typemap(out) map<K,T> {
SCM alist = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=$1.rbegin();
i!=$1.rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=$1.rbegin(); i!=$1.rend(); ++i) {
T* val = new T(i->second);
SCM k = CONVERT_TO(i->first);
SCM x = SWIG_NewPointerObj(val,$descriptor(T *), 1);
@ -382,7 +379,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -425,7 +422,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -442,14 +439,14 @@ namespace std {
%rename("has-key?") has_key;
public:
map();
map(const map<K,T> &);
map(const map< K, T > &);
unsigned int size() const;
bool empty() const;
void clear();
%extend {
T& __getitem__(K key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
return i->second;
else
@ -459,20 +456,19 @@ namespace std {
(*self)[key] = x;
}
void __delitem__(K key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
self->erase(i);
else
throw std::out_of_range("key not found");
}
bool has_key(K key) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
return i != self->end();
}
SCM keys() {
SCM result = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=self->rbegin();
i!=self->rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=self->rbegin(); i!=self->rend(); ++i) {
SCM k = CONVERT_TO(i->first);
result = scm_cons(k,result);
}
@ -486,9 +482,9 @@ namespace std {
template<class K> class map<K,T> {
%typemap(in) map<K,T> (std::map<K,T>* m) {
if (scm_is_null($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
} else if (scm_is_pair($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
SCM alist = $input;
while (!scm_is_null(alist)) {
K* k;
@ -520,10 +516,10 @@ namespace std {
const map<K,T>* (std::map<K,T> temp,
std::map<K,T>* m) {
if (scm_is_null($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
SCM alist = $input;
while (!scm_is_null(alist)) {
@ -552,8 +548,7 @@ namespace std {
}
%typemap(out) map<K,T> {
SCM alist = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=$1.rbegin();
i!=$1.rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=$1.rbegin(); i!=$1.rend(); ++i) {
K* key = new K(i->first);
SCM k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
SCM x = CONVERT_TO(i->second);
@ -595,7 +590,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -637,7 +632,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -654,14 +649,14 @@ namespace std {
%rename("has-key?") has_key;
public:
map();
map(const map<K,T> &);
map(const map< K, T > &);
unsigned int size() const;
bool empty() const;
void clear();
%extend {
T __getitem__(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
return i->second;
else
@ -671,20 +666,19 @@ namespace std {
(*self)[key] = x;
}
void __delitem__(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
self->erase(i);
else
throw std::out_of_range("key not found");
}
bool has_key(const K& key) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
return i != self->end();
}
SCM keys() {
SCM result = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=self->rbegin();
i!=self->rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=self->rbegin(); i!=self->rend(); ++i) {
K* key = new K(i->first);
SCM k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
result = scm_cons(k,result);
@ -700,9 +694,9 @@ namespace std {
template<> class map<K,T> {
%typemap(in) map<K,T> (std::map<K,T>* m) {
if (scm_is_null($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
} else if (scm_is_pair($input)) {
$1 = std::map<K,T >();
$1 = std::map< K, T >();
SCM alist = $input;
while (!scm_is_null(alist)) {
SCM entry, key, val;
@ -736,10 +730,10 @@ namespace std {
const map<K,T>* (std::map<K,T> temp,
std::map<K,T>* m) {
if (scm_is_null($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
temp = std::map<K,T >();
temp = std::map< K, T >();
$1 = &temp;
SCM alist = $input;
while (!scm_is_null(alist)) {
@ -769,8 +763,7 @@ namespace std {
}
%typemap(out) map<K,T> {
SCM alist = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=$1.rbegin();
i!=$1.rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=$1.rbegin(); i!=$1.rend(); ++i) {
SCM k = CONVERT_K_TO(i->first);
SCM x = CONVERT_T_TO(i->second);
SCM entry = scm_cons(k,x);
@ -809,7 +802,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -849,7 +842,7 @@ namespace std {
}
} else {
// wrapped map?
std::map<K,T >* m;
std::map< K, T >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -866,14 +859,14 @@ namespace std {
%rename("has-key?") has_key;
public:
map();
map(const map<K,T> &);
map(const map< K, T> &);
unsigned int size() const;
bool empty() const;
void clear();
%extend {
T __getitem__(K key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
return i->second;
else
@ -883,20 +876,19 @@ namespace std {
(*self)[key] = x;
}
void __delitem__(K key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
self->erase(i);
else
throw std::out_of_range("key not found");
}
bool has_key(K key) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
return i != self->end();
}
SCM keys() {
SCM result = SCM_EOL;
for (std::map<K,T >::reverse_iterator i=self->rbegin();
i!=self->rend(); ++i) {
for (std::map< K, T >::reverse_iterator i=self->rbegin(); i!=self->rend(); ++i) {
SCM k = CONVERT_K_TO(i->first);
result = scm_cons(k,result);
}

View File

@ -79,7 +79,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -105,7 +105,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -183,7 +183,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -207,7 +207,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -283,7 +283,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -307,7 +307,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;
@ -377,7 +377,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$&1_descriptor, 0) == 0)
$1 = 1;
@ -398,7 +398,7 @@ namespace std {
}
} else {
/* wrapped pair? */
std::pair<T,U >* m;
std::pair< T, U >* m;
if (SWIG_ConvertPtr($input,(void **) &m,
$1_descriptor, 0) == 0)
$1 = 1;

View File

@ -44,17 +44,17 @@ namespace std {
%typemap(in) vector<T> {
if (scm_is_vector($input)) {
unsigned long size = scm_c_vector_length($input);
$1 = std::vector<T >(size);
$1 = std::vector< T >(size);
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref($input,scm_from_ulong(i));
(($1_type &)$1)[i] =
*((T*) SWIG_MustGetPtr(o,$descriptor(T *),$argnum, 0));
}
} else if (scm_is_null($input)) {
$1 = std::vector<T >();
$1 = std::vector< T >();
} else if (scm_is_pair($input)) {
SCM head, tail;
$1 = std::vector<T >();
$1 = std::vector< T >();
tail = $input;
while (!scm_is_null(tail)) {
head = SCM_CAR(tail);
@ -72,7 +72,7 @@ namespace std {
const vector<T>* (std::vector<T> temp) {
if (scm_is_vector($input)) {
unsigned long size = scm_c_vector_length($input);
temp = std::vector<T >(size);
temp = std::vector< T >(size);
$1 = &temp;
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref($input,scm_from_ulong(i));
@ -81,10 +81,10 @@ namespace std {
$argnum, 0));
}
} else if (scm_is_null($input)) {
temp = std::vector<T >();
temp = std::vector< T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
temp = std::vector<T >();
temp = std::vector< T >();
$1 = &temp;
SCM head, tail;
tail = $input;
@ -138,7 +138,7 @@ namespace std {
$1 = 0;
} else {
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$&1_descriptor, 0) != -1)
$1 = 1;
@ -178,7 +178,7 @@ namespace std {
$1 = 0;
} else {
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor, 0) != -1)
$1 = 1;
@ -232,7 +232,7 @@ namespace std {
%typemap(in) vector<T> {
if (scm_is_vector($input)) {
unsigned long size = scm_c_vector_length($input);
$1 = std::vector<T >(size);
$1 = std::vector< T >(size);
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref($input,scm_from_ulong(i));
if (CHECK(o))
@ -245,7 +245,7 @@ namespace std {
} else if (scm_is_pair($input)) {
SCM v = scm_vector($input);
unsigned long size = scm_c_vector_length(v);
$1 = std::vector<T >(size);
$1 = std::vector< T >(size);
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref(v,scm_from_ulong(i));
if (CHECK(o))
@ -262,7 +262,7 @@ namespace std {
const vector<T>* (std::vector<T> temp) {
if (scm_is_vector($input)) {
unsigned long size = scm_c_vector_length($input);
temp = std::vector<T >(size);
temp = std::vector< T >(size);
$1 = &temp;
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref($input,scm_from_ulong(i));
@ -272,12 +272,12 @@ namespace std {
scm_wrong_type_arg(FUNC_NAME, $argnum, $input);
}
} else if (scm_is_null($input)) {
temp = std::vector<T >();
temp = std::vector< T >();
$1 = &temp;
} else if (scm_is_pair($input)) {
SCM v = scm_vector($input);
unsigned long size = scm_c_vector_length(v);
temp = std::vector<T >(size);
temp = std::vector< T >(size);
$1 = &temp;
for (unsigned long i=0; i<size; i++) {
SCM o = scm_vector_ref(v,scm_from_ulong(i));
@ -318,7 +318,7 @@ namespace std {
$1 = CHECK(head) ? 1 : 0;
} else {
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
$1 = (SWIG_ConvertPtr($input,(void **) &v,
$&1_descriptor, 0) != -1) ? 1 : 0;
}
@ -345,7 +345,7 @@ namespace std {
$1 = CHECK(head) ? 1 : 0;
} else {
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
$1 = (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor, 0) != -1) ? 1 : 0;
}

View File

@ -11,17 +11,17 @@
fragment=SWIG_From_frag(Type),
fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef value_category category;
static const char* type_name() { return #Type; }
};
template <> struct traits_asval<Type > {
};
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(octave_value obj, value_type *val) {
static int asval(octave_value obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static octave_value from(const value_type& val) {
return SWIG_From(Type)(val);
@ -44,13 +44,13 @@ namespace swig {
fragment=SWIG_From_frag(int),
fragment="StdTraits") {
namespace swig {
template <> struct traits_asval<Type > {
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(octave_value obj, value_type *val) {
static int asval(octave_value obj, value_type *val) {
return SWIG_AsVal(int)(obj, (int *)val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static octave_value from(const value_type& val) {
return SWIG_From(int)((int)val);

View File

@ -106,7 +106,7 @@ namespace std {
}
}
%typemap(out) list<T> {
std::list<T>::const_iterator i;
std::list< T >::const_iterator i;
unsigned int j;
int len = $1.size();
SV **svs = new SV*[len];
@ -125,7 +125,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_LIST) list<T> {
{
/* wrapped list? */
std::list<T >* v;
std::list< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_&descriptor,0) != -1) {
$1 = 1;
@ -158,7 +158,7 @@ namespace std {
const list<T>* {
{
/* wrapped list? */
std::list<T >* v;
std::list< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor,0) != -1) {
$1 = 1;
@ -265,7 +265,7 @@ namespace std {
}
}
%typemap(out) list<T> {
std::list<T>::const_iterator i;
std::list< T >::const_iterator i;
unsigned int j;
int len = $1.size();
SV **svs = new SV*[len];
@ -282,7 +282,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_LIST) list<T> {
{
/* wrapped list? */
std::list<T >* v;
std::list< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_&descriptor,0) != -1) {
$1 = 1;
@ -313,7 +313,7 @@ namespace std {
const list<T>* {
{
/* wrapped list? */
std::list<T >* v;
std::list< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor,0) != -1) {
$1 = 1;

View File

@ -35,7 +35,7 @@ namespace std {
void clear();
%extend {
const T& get(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
return i->second;
else
@ -45,14 +45,14 @@ namespace std {
(*self)[key] = x;
}
void del(const K& key) throw (std::out_of_range) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
if (i != self->end())
self->erase(i);
else
throw std::out_of_range("key not found");
}
bool has_key(const K& key) {
std::map<K,T >::iterator i = self->find(key);
std::map< K, T >::iterator i = self->find(key);
return i != self->end();
}
}

View File

@ -119,7 +119,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_VECTOR) vector<T> {
{
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$&1_descriptor,0) != -1) {
$1 = 1;
@ -151,7 +151,7 @@ namespace std {
const vector<T>* {
{
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor,0) != -1) {
$1 = 1;
@ -292,7 +292,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_VECTOR) vector<T *> {
{
/* wrapped vector? */
std::vector<T *>* v;
std::vector< T *>* v;
int res = SWIG_ConvertPtr($input,(void **) &v, $&1_descriptor,0);
if (SWIG_IsOK(res)) {
$1 = 1;
@ -323,7 +323,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_VECTOR) const vector<T *>&,const vector<T *>* {
{
/* wrapped vector? */
std::vector<T *> *v;
std::vector< T *> *v;
int res = SWIG_ConvertPtr($input,%as_voidptrptr(&v), $1_descriptor,0);
if (SWIG_IsOK(res)) {
$1 = 1;
@ -466,7 +466,7 @@ namespace std {
%typecheck(SWIG_TYPECHECK_VECTOR) vector<T> {
{
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$&1_descriptor,0) != -1) {
$1 = 1;
@ -496,7 +496,7 @@ namespace std {
const vector<T>* {
{
/* wrapped vector? */
std::vector<T >* v;
std::vector< T >* v;
if (SWIG_ConvertPtr($input,(void **) &v,
$1_descriptor,0) != -1) {
$1 = 1;

View File

@ -13,17 +13,17 @@
fragment=SWIG_From_frag(Type),
fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef value_category category;
static const char* type_name() { return #Type; }
};
template <> struct traits_asval<Type > {
};
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(PyObject *obj, value_type *val) {
static int asval(PyObject *obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static PyObject *from(const value_type& val) {
return SWIG_From(Type)(val);
@ -46,13 +46,13 @@ namespace swig {
fragment=SWIG_From_frag(int),
fragment="StdTraits") {
namespace swig {
template <> struct traits_asval<Type > {
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(PyObject *obj, value_type *val) {
static int asval(PyObject *obj, value_type *val) {
return SWIG_AsVal(int)(obj, (int *)val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static PyObject *from(const value_type& val) {
return SWIG_From(int)((int)val);

View File

@ -12,17 +12,17 @@
fragment=SWIG_From_frag(Type),
fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef value_category category;
static const char* type_name() { return #Type; }
};
template <> struct traits_asval<Type > {
};
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(SEXP obj, value_type *val) {
static int asval(SEXP obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static SEXP from(const value_type& val) {
return SWIG_From(Type)(val);
@ -45,13 +45,13 @@ namespace swig {
fragment=SWIG_From_frag(int),
fragment="StdTraits") {
namespace swig {
template <> struct traits_asval<Type > {
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(SEXP obj, value_type *val) {
static int asval(SEXP obj, value_type *val) {
return SWIG_AsVal(int)(obj, (int *)val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static SEXP from(const value_type& val) {
return SWIG_From(int)((int)val);

View File

@ -14,17 +14,17 @@
fragment=SWIG_From_frag(Type),
fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef value_category category;
static const char* type_name() { return #Type; }
};
template <> struct traits_asval<Type > {
};
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(VALUE obj, value_type *val) {
static int asval(VALUE obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static VALUE from(const value_type& val) {
return SWIG_From(Type)(val);
@ -47,13 +47,13 @@ namespace swig {
fragment=SWIG_From_frag(int),
fragment="StdTraits") {
namespace swig {
template <> struct traits_asval<Type > {
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(VALUE obj, value_type *val) {
static int asval(VALUE obj, value_type *val) {
return SWIG_AsVal(int)(obj, (int *)val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static VALUE from(const value_type& val) {
return SWIG_From(int)((int)val);

View File

@ -11,17 +11,17 @@
fragment=SWIG_From_frag(Type),
fragment="StdTraits") {
namespace swig {
template <> struct traits<Type > {
template <> struct traits< Type > {
typedef value_category category;
static const char* type_name() { return #Type; }
};
template <> struct traits_asval<Type > {
};
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(SwigSciObject obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static SwigSciObject from(const value_type& val) {
return SWIG_From(Type)(val);
@ -44,13 +44,13 @@ namespace swig {
fragment=SWIG_From_frag(int),
fragment="StdTraits") {
namespace swig {
template <> struct traits_asval<Type > {
template <> struct traits_asval< Type > {
typedef Type value_type;
static int asval(SwigSciObject obj, value_type *val) {
return SWIG_AsVal(int)(obj, (int *)val);
}
};
template <> struct traits_from<Type > {
template <> struct traits_from< Type > {
typedef Type value_type;
static SwigSciObject from(const value_type& val) {
return SWIG_From(int)((int)val);

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);