acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
_collection.h
1#pragma once
2
3
4
5template < typename ITERABLE >
6inline ::collection::count __iterable_count(const ITERABLE & iterable);
7
8
9//#ifdef UNIVERSAL_WINDOWS
10//
11//
12//template < typename T >
13//inline ::collection::count __iterable_count(::winrt::Windows::Foundation::Collections::IVectorImpact < T > ^ a)
14//{
15//
16// return a.Size;
17//
18//}
19//#endif
20
21
22class strid_array;
23
24
25CLASS_DECL_ACME bool safe_destroy_element(::particle * pparticle);
26
27CLASS_DECL_ACME bool safe_free_memory(void * ptype);
28
29
30
31
32
33
34
35template<class TYPE>
36inline void CopyElements(TYPE * pDest, const TYPE * pSrc, ::collection::count nCount);
37
38
39template<class TYPE>
40inline void dump_elements(dump_context & dumpcontext, const TYPE * pElements, ::collection::count nCount);
41
42
43
44#define _TYPELIB_INDEX_LENGTH 10
45#define _QUOTES_SPACE 2
46
47
48#define forall(set) for(auto item : set)
49#define forallref(set) for(auto & item : set)
50
51
52
53
54#include "single.h"
55
56#include "pair.h"
57
58
59//
60//
62//template < typename CONST_ITERATOR >
63//class const_range
64//{
65//public:
66//
67// typedef CONST_ITERATOR const_iterator;
68//
69// CONST_ITERATOR m_begin;
70// CONST_ITERATOR m_end;
71//
72// const_range(CONST_ITERATOR b,CONST_ITERATOR e): m_begin(b),m_end(e) {}
73//
74// CONST_ITERATOR begin() const { return m_begin; }
75// CONST_ITERATOR end() const { return m_end; }
76//
77//
78// auto & element_at(::collection::index iIndex)
79// {
80//
81// CONST_ITERATOR it = begin();
82//
83// while(iIndex > 0 && it != end())
84// {
85//
86// iIndex--;
87//
88// }
89//
90// if(iIndex != 0)
91// {
92//
93// throw ::exception(error_bad_argument);
94//
95// }
96//
97// return (*it);
98//
99// }
100//};
101//
104//template < typename ITERATOR >
105//class range
106//{
107//public:
108//
109//
110//
111// ITERATOR m_begin;
112// ITERATOR m_end;
113//
114// range(ITERATOR b,ITERATOR e): m_begin(b),m_end(e) { }
115//
116// auto begin() const { return m_begin; }
117// auto end() const { return m_end; }
118//
119// auto & element_at(::collection::index iIndex)
120// {
121//
122// ITERATOR it = begin();
123//
124// while(iIndex > 0 && it != end())
125// {
126//
127// iIndex--;
128//
129// }
130//
131// if(iIndex != 0)
132// {
133//
134// throw ::exception(error_bad_argument);
135//
136// }
137//
138// return (*it);
139//
140// }
141//
142//};
143
144
145//#include "comparable_eq_array.h"
146//#include "comparable_array.h"
147#include "comparable_raw_array.h"
148#include "comparable_array.h"
149
150
151//#include "prototype_array.h"
152#include "numeric_array_range.h"
153#include "numeric_array.h"
154
155#include "logic_array.h"
156
157#include "list.h"
158#include "comparable_eq_list_base.h"
159#include "acme/prototype/collection/comparable_list.h"
160
161
162#include "set_node.h"
163
164
165#include "set.h"
166
167
168#include "acme/prototype/collection/map.h"
169
170
171#include "attrib_map.h"
172#include "integer_map.h"
173#include "acme/prototype/collection/string_map.h"
174#include "strid_map.h"
175#include "map_to_smart_pointer.h"
176#include "fifo_map.h"
177#include "sort_map.h"
178
179
180#include "sort_array.h"
181
182
184// Classes declared in this file
185
186//matter
187
188// Lists
189class pointer_list; // list_base of void *
190class object_list; // list_base of matter*
191
192
193
194
195#include "acme/prototype/collection/string_list.h"
196
197
198using map_u16_to_ptr = map_base < ::u16, ::u16, void *, void * >;
199
200using map_ptr_to_unsigned_short = map_base < void *, void *, ::u16, ::u16 >;
201
202using map_ptr_to_ptr = map_base < void *, void *, void *, void * >;
203
204using map_word_to_ob = map_base < ::u16, ::u16, matter *, matter * >;
205
206using map_string_to_ptr = map_base < string, const ::scoped_string & scopedstr, void *, void * >;
207
208using map_string_to_ob = map_base < string, const ::scoped_string & scopedstr, matter *, matter * >;
209
210
211#include "string_to_string_map.h"
212#include "bit_array.h"
213//#include "string_base_array.h"
214
215
216
217
218
219//#include "acme/parallelization/keep_task_payload.h"
220
221
222#include "acme/platform/options.h"
223
224
225typedef CLASS_DECL_ACME pointer_array < u32_array > dword_2darray;
226typedef CLASS_DECL_ACME pointer_array < index_array > index_2darray;
227
228
229
230
231
232#include "acme/prototype/comparison/less.h"
233
234
235#include "sort.h"
236
237//#include "atom_array.h"
238
239#include "bitset.h"
240
241#include "packset.h"
242
243#include "spreadset.h"
244
245#include "deque.h"
246
247#include "queue.h"
248
249#include "priority_queue.h"
250
251
252
253
254#include "acme/prototype/collection/string_list.h"
255//#include "string_sort_array.h"
256//#include "string_array.h"
257
258#include "_papaya_array.h"
259
260
261
262
263
264
265
266#include "unique_array.h"
267
268#include "stack.h"
269
270#include "set_element.h"
271
272#include "set.h"
273
274//#include "runnable_array.h"
275
276//#include "base_2array.h"
277
278
279#include "time.h"
280
281
282
Definition iterable.h:4040
Definition particle.h:95