add guards for swig/language extra methods and comments

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6386 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-10 17:58:14 +00:00
commit 024efdb6f6
12 changed files with 85 additions and 14 deletions

View file

@ -87,18 +87,13 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<T >);
%std_vector_methods(vector);
#ifdef %swig_vector_methods
// Add swig/language extra methods
%swig_vector_methods(std::vector<T >);
#endif
};
// bool specialization
%extend vector<bool> {
void flip()
{
self->flip();
}
}
// ***
// This specialization should dissapear or get simplified when
// a 'const SWIGTYPE*&' can be defined
@ -131,11 +126,23 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<T* >);
%std_vector_methods_val(vector);
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
%swig_vector_methods_val(std::vector<T* >);
#endif
};
// ***
// ***
// bool specialization
%extend vector<bool> {
void flip()
{
self->flip();
}
}
template<class T > class vector<bool> {
public:
typedef size_t size_type;
@ -164,7 +171,11 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<bool>);
%std_vector_methods_val(vector<bool>);
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
%swig_vector_methods_val(std::vector<bool>);
#endif
};
}