Lines Matching full:container
5 …ml Emulating container types]) using `Boost.Python` is non trivial. There are a lot of issues to c…
9 * Make indexable C++ containers behave exactly as one would expect a Python container to behave.
10 * Provide default reference semantics for container element indexing (`__getitem__`) such that c[i]…
19 …rom `__getitem__` such that subsequent adds and deletes to and from the container will not result …
21 * Accept Python container arguments (e.g. `lists`, `tuples`) wherever appropriate.
27 …container look and feel and behave exactly as we'd expect a Python container. The class automatica…
39 …container. This method should return a new iterator object that can iterate over all the objects i…
61 XVec is now a full-fledged Python container (see the example in full, along with its python test).
77 … in the `NoProxy` template parameter. XMap is now a full-fledged Python container (see the example…
83 [[Container][A class type][ The container type to be wrapped to Python. ][]]
87 [[Data][][The container's data type.][Container::value_type]]
88 [[Index][][The container's index type.][Container::size_type]]
89 [[Key][][The container's key type.][Container::value_type]]
92 template <class Container,
96 class Data = typename Container::value_type,
97 class Index = typename Container::size_type,
98 class Key = typename Container::value_type>
110 get_item(Container& container, index_type i);
113 get_slice(Container& container, index_type from, index_type to);
116 set_item(Container& container, index_type i, data_type const& v);
120 Container& container, index_type from,
126 set_slice(Container& container, index_type from,
131 delete_item(Container& container, index_type i);
134 delete_slice(Container& container, index_type from, index_type to);
137 size(Container& container);
141 contains(Container& container, T const& val);
144 convert_index(Container& container, PyObject* i);
153 …container can handle. For instance, negative indexes in Python, by convention, start counting from…
155 When a container expands or contracts, held indexes to its elements must be adjusted to follow the …
163 …t index, the function should return the adjusted index when data in the container at index from..t…
169 [[Container][A class type][ The container type to be wrapped to Python. ][]]
174 template <class Container,
181 typedef typename Container::value_type data_type;
182 typedef typename Container::value_type key_type;
183 typedef typename Container::size_type index_type;
184 typedef typename Container::size_type size_type;
185 typedef typename Container::difference_type difference_type;
188 get_item(Container& container, index_type i);
191 get_slice(Container& container, index_type from, index_type to);
194 set_item(Container& container, index_type i, data_type const& v);
197 set_slice(Container& container, index_type from,
202 set_slice(Container& container, index_type from,
206 delete_item(Container& container, index_type i);
209 delete_slice(Container& container, index_type from, index_type to);
212 size(Container& container);
215 contains(Container& container, key_type const& key);
218 convert_index(Container& container, PyObject* i);
229 [[Container][ A class type ][ The container type to be wrapped to Python. ][]]
234 template <class Container,
241 typedef typename Container::value_type value_type;
242 typedef typename Container::value_type::second_type data_type;
243 typedef typename Container::key_type key_type;
244 typedef typename Container::key_type index_type;
245 typedef typename Container::size_type size_type;
246 typedef typename Container::difference_type difference_type;
249 get_item(Container& container, index_type i);
252 set_item(Container& container, index_type i, data_type const& v);
255 delete_item(Container& container, index_type i);
258 size(Container& container);
261 contains(Container& container, key_type const& key);
264 compare_index(Container& container, index_type a, index_type b);
267 convert_index(Container& container, PyObject* i);