summaryrefslogtreecommitdiff
path: root/Lib/std/std_vector.i
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/std/std_vector.i')
-rw-r--r--Lib/std/std_vector.i40
1 files changed, 40 insertions, 0 deletions
diff --git a/Lib/std/std_vector.i b/Lib/std/std_vector.i
index ab1435b31..b0bb714d4 100644
--- a/Lib/std/std_vector.i
+++ b/Lib/std/std_vector.i
@@ -135,6 +135,46 @@ namespace std {
};
// ***
+ // const pointer specialization
+ // ***
+ template<class _Tp, class _Alloc >
+ class vector<const _Tp *, _Alloc > {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef const _Tp * value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type reference;
+ typedef value_type const_reference;
+ typedef _Alloc allocator_type;
+
+ %traits_swigtype(_Tp);
+
+ %fragment(SWIG_Traits_frag(std::vector<const _Tp *, _Alloc >), "header",
+ fragment=SWIG_Traits_frag(_Tp),
+ fragment="StdVectorTraits") {
+ namespace swig {
+ template <> struct traits<std::vector<const _Tp *, _Alloc > > {
+ typedef value_category category;
+ static const char* type_name() {
+ return "std::vector<const " #_Tp " *," #_Alloc " >";
+ }
+ };
+ }
+ }
+
+ %typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<const _Tp *, _Alloc >);
+
+#ifdef %swig_vector_methods_val
+ // Add swig/language extra methods
+ %swig_vector_methods_val(std::vector<const _Tp *, _Alloc >);
+#endif
+
+ %std_vector_methods_val(vector);
+ };
+
+ // ***
// ***
// bool specialization