annotate lib/swig/swigwin-2.0.11/Lib/std/std_multimap.i @ 1980:c1c74df0a33e

changing most of auto types to their actual types
author Grumpy7
date Wed, 30 Oct 2013 00:47:37 -0700
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 // std::map
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 %include <std_map.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 %define %std_multimap_methods(mmap...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 %std_map_methods_common(mmap);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 #ifdef SWIG_EXPORT_ITERATOR_METHODS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 std::pair<iterator,iterator> equal_range(const key_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 // std::multimap
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 // const declarations are used to guess the intent of the function being
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 // exported; therefore, the following rationale is applied:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 // -- f(std::multimap<T>), f(const std::multimap<T>&):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 // the parameter being read-only, either a sequence or a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 // previously wrapped std::multimap<T> can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 // -- f(std::multimap<T>&), f(std::multimap<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 // the parameter may be modified; therefore, only a wrapped std::multimap
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 // can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 // -- std::multimap<T> f(), const std::multimap<T>& f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 // the map is returned by copy; therefore, a sequence of T:s
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 // is returned which is most easily used in other functions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 // -- std::multimap<T>& f(), std::multimap<T>* f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 // the map is returned by reference; therefore, a wrapped std::multimap
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 // is returned
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 // -- const std::multimap<T>* f(), f(const std::multimap<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 // for consistency, they expect and return a plain map pointer.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 // exported class
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 namespace std {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 template<class _Key, class _Tp, class _Compare = std::less<_Key >,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 class _Alloc = allocator<std::pair<const _Key, _Tp > > >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 class multimap {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 typedef _Key key_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 typedef _Tp mapped_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 typedef std::pair<const _Key, _Tp> value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 typedef value_type& reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 typedef const value_type& const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 %traits_swigtype(_Key);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 %fragment(SWIG_Traits_frag(std::pair< _Key, _Tp >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 fragment=SWIG_Traits_frag(_Key),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 fragment="StdPairTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 template <> struct traits<std::pair< _Key, _Tp > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 return "std::pair<" #_Key "," #_Tp " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 %fragment(SWIG_Traits_frag(std::multimap<_Key, _Tp, _Compare, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 fragment="StdMultimapTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 template <> struct traits<std::multimap<_Key, _Tp, _Compare, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 return "std::multimap<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 %typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::multimap<_Key, _Tp, _Compare, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 multimap( const _Compare& );
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 #ifdef %swig_multimap_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 %swig_multimap_methods(std::multimap<_Key, _Tp, _Compare, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 %std_multimap_methods(multimap);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 }