annotate lib/swig/swigwin-2.0.11/Lib/std/std_container.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 %include <std_common.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 %include <exception.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 %include <std_alloc.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6 #include <algorithm>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 // Common container methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 %define %std_container_methods(container...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 container();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 container(const container&);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 bool empty() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 size_type size() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 void clear();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 void swap(container& v);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 allocator_type get_allocator() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 #ifdef SWIG_EXPORT_ITERATOR_METHODS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 class iterator;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 class reverse_iterator;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 class const_iterator;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 class const_reverse_iterator;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 iterator begin();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 iterator end();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 reverse_iterator rbegin();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 reverse_iterator rend();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 // Common sequence
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 %define %std_sequence_methods_common(sequence)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 %std_container_methods(%arg(sequence));
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 sequence(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 void pop_back();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 void resize(size_type new_size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 #ifdef SWIG_EXPORT_ITERATOR_METHODS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 iterator erase(iterator pos);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 iterator erase(iterator first, iterator last);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 %define %std_sequence_methods(sequence)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 %std_sequence_methods_common(%arg(sequence));
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 sequence(size_type size, const value_type& value);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 void push_back(const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 const value_type& front() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 const value_type& back() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 void assign(size_type n, const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 void resize(size_type new_size, const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 #ifdef SWIG_EXPORT_ITERATOR_METHODS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 iterator insert(iterator pos, const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 void insert(iterator pos, size_type n, const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 %define %std_sequence_methods_val(sequence...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 %std_sequence_methods_common(%arg(sequence));
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 sequence(size_type size, value_type value);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 void push_back(value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 value_type front() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 value_type back() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 void assign(size_type n, value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 void resize(size_type new_size, value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 #ifdef SWIG_EXPORT_ITERATOR_METHODS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 iterator insert(iterator pos, value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 void insert(iterator pos, size_type n, value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 // Ignore member methods for Type with no default constructor
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 %define %std_nodefconst_type(Type...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 %feature("ignore") std::vector<Type >::vector(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 %feature("ignore") std::vector<Type >::resize(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 %feature("ignore") std::deque<Type >::deque(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 %feature("ignore") std::deque<Type >::resize(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 %feature("ignore") std::list<Type >::list(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 %feature("ignore") std::list<Type >::resize(size_type size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 %enddef