annotate lib/swig/swigwin-2.0.11/Lib/std/std_multiset.i @ 2194:d0e321190c86

Merge
author Grumpy7
date Thu, 30 Jan 2014 22:11:28 +0100
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::set
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_set.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 // Multiset
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 %define %std_multiset_methods(multiset...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 %std_set_methods_common(multiset);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 // std::multiset
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 // const declarations are used to guess the intent of the function being
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 // exported; therefore, the following rationale is applied:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 // -- f(std::multiset<T>), f(const std::multiset<T>&):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 // the parameter being read-only, either a sequence or a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 // previously wrapped std::multiset<T> can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 // -- f(std::multiset<T>&), f(std::multiset<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 // the parameter may be modified; therefore, only a wrapped std::multiset
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 // can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 // -- std::multiset<T> f(), const std::multiset<T>& f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 // the set is returned by copy; therefore, a sequence of T:s
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 // is returned which is most easily used in other functions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 // -- std::multiset<T>& f(), std::multiset<T>* f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 // the set is returned by reference; therefore, a wrapped std::multiset
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 // is returned
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 // -- const std::multiset<T>* f(), f(const std::multiset<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 // for consistency, they expect and return a plain set pointer.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 // exported classes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 namespace std {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 //multiset
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 template <class _Key, class _Compare = std::less<_Key>,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 class _Alloc = allocator<_Key> >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 class multiset {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 typedef _Key value_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 value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 typedef value_type& reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 typedef const value_type& const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 %traits_swigtype(_Key);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 %fragment(SWIG_Traits_frag(std::multiset<_Key, _Compare, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 fragment=SWIG_Traits_frag(_Key),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 fragment="StdMultisetTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 template <> struct traits<std::multiset<_Key, _Compare, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 return "std::multiset<" #_Key "," #_Compare "," #_Alloc " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 %typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::multiset<_Key, _Compare, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 multiset( const _Compare& );
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 #ifdef %swig_multiset_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 %swig_multiset_methods(std::multiset<_Key, _Compare, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 %std_multiset_methods(multiset);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 }