acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
aaa__string_array_impl.h
1
#pragma once
2
3
4
//#include "acme/prototype/prototype/property_set.h"
5
//#include "acme/prototype/prototype/memory.h"
6
//
7
//
8
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
9
//Type string_base_array < Type, RawType, t_etypeContainer >::safe_at(::collection::index nIndex, Type tDefault) const
10
//{
11
//
12
// if (nIndex < 0 || nIndex >= this->get_size())
13
// {
14
//
15
// return tDefault;
16
//
17
// }
18
//
19
// return this->element_at(nIndex);
20
//
21
//}
22
//
23
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
24
//Type string_base_array < Type, RawType, t_etypeContainer >::safe_at(::collection::index nIndex, Type tDefault)
25
//{
26
// if (nIndex < 0 || nIndex >= this->get_size())
27
// return tDefault;
28
//
29
// return this->element_at(nIndex);
30
//
31
//}
32
//
33
//
34
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
35
//Type string_base_array < Type, RawType, t_etypeContainer >::get_at(::collection::index nIndex) const
36
//{
37
// if (nIndex < 0 || nIndex >= this->m_nSize)
38
// throw ::exception(error_index_out_of_bounds);
39
// return get_data()[nIndex];
40
//}
41
//
50
//
51
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
52
//void string_base_array < Type, RawType, t_etypeContainer >::set_at(::collection::index nIndex, const Type & newElement)
53
//{
54
// if (nIndex < 0 || nIndex >= this->m_nSize)
55
// throw ::exception(error_index_out_of_bounds);
56
// get_data()[nIndex] = newElement;
57
//}
58
//
59
//
60
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
61
//Type & string_base_array < Type, RawType, t_etypeContainer >::element_at(::collection::index nIndex)
62
//{
63
// if (nIndex < 0 || nIndex >= this->m_nSize)
64
// throw ::exception(error_index_out_of_bounds);
65
// return get_data()[nIndex];
66
//}
67
//
68
//
69
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
70
//const Type & string_base_array < Type, RawType, t_etypeContainer >::element_at(::collection::index nIndex) const
71
//{
72
// if (nIndex < 0 || nIndex >= this->m_nSize)
73
// throw ::exception(error_index_out_of_bounds);
74
// return get_data()[nIndex];
75
//}
76
//
77
//
78
//
87
//
88
//
89
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
90
//string_base_array < Type, RawType, t_etypeContainer > & string_base_array < Type, RawType, t_etypeContainer > ::operator = (const ::payload & payload)
91
//{
92
//
93
// this->erase_all();
94
//
95
// if (payload.get_type() == ::e_type_string_array)
96
// {
97
//
98
// payload.get_array(*this);
99
//
100
// }
101
// else
102
// {
103
//
104
// if (payload.get_count() == 1)
105
// {
106
//
107
// add((Type)payload.string());
108
//
109
// }
110
// else if (payload.get_count() > 1)
111
// {
112
//
113
// payload.get_array(*this);
114
//
115
// }
116
//
117
// }
118
//
119
// return *this;
120
//
121
//}
122
//
123
//
196
//
197
//
206
//
207
//
208
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
209
//void string_base_array < Type, RawType, t_etypeContainer >::case_insensitive_get_quick_sort(index_array & ia)
210
//{
211
// index_array stackLowerBound;
212
// index_array stackUpperBound;
213
// ::collection::index iLowerBound;
214
// ::collection::index iUpperBound;
215
// ::collection::index iLPos,iUPos,iMPos;
216
// Type t;
217
// ia.erase_all();
218
// ::papaya::array::append_sequence(ia,(::collection::index)0,(::collection::index)get_upper_bound());
219
// if(this->get_size() >= 2)
220
// {
221
// stackLowerBound.push(0);
222
// stackUpperBound.push(this->get_size() - 1);
223
// while(true)
224
// {
225
// iLowerBound = stackLowerBound.pop();
226
// iUpperBound = stackUpperBound.pop();
227
// iLPos = iLowerBound;
228
// iMPos = iLowerBound;
229
// iUPos = iUpperBound;
230
// while(true)
231
// {
232
// while(true)
233
// {
234
// if(iMPos == iUPos)
235
// break;
236
// if(this->element_at(ia[iMPos]).case_insensitive_order(this->element_at(ia[iUPos])) <= 0)
237
// iUPos--;
238
// else
239
// {
240
// ::collection::index i = ia[iMPos];
241
// ia[iMPos] = ia[iUPos];
242
// ia[iUPos] = i;
243
// break;
244
// }
245
// }
246
// if(iMPos == iUPos)
247
// break;
248
// iMPos = iUPos;
249
// while(true)
250
// {
251
// if(iMPos == iLPos)
252
// break;
253
//
254
// if(this->element_at(ia[iLPos]).case_insensitive_order(this->element_at(ia[iMPos])) <= 0)
255
// iLPos++;
256
// else
257
// {
258
// ::collection::index i = ia[iLPos];
259
// ia[iLPos] = ia[iMPos];
260
// ia[iMPos] = i;
261
// break;
262
// }
263
// }
264
// if(iMPos == iLPos)
265
// break;
266
// iMPos = iLPos;
267
// }
268
// if(iLowerBound < iMPos - 1)
269
// {
270
// stackLowerBound.push(iLowerBound);
271
// stackUpperBound.push(iMPos - 1);
272
// }
273
// if(iMPos + 1 < iUpperBound)
274
// {
275
// stackLowerBound.push(iMPos + 1);
276
// stackUpperBound.push(iUpperBound);
277
// }
278
// if(stackLowerBound.get_size() == 0)
279
// break;
280
// }
281
// }
282
//
283
//}
284
//
285
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
286
//inline void string_base_array < Type, RawType, t_etypeContainer > ::debug_output(::collection::index iStart, ::collection::count inCountLastOut)
287
//{
288
//
289
// ::information(implode(STR_NEWLINE, iStart, inCountLastOut));
290
//
291
//}
292
//
293
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
294
//::collection::index string_base_array < Type, RawType, t_etypeContainer > ::case_insensitive_suffix_find_first(const Type& pcszTopic, ::collection::index iFind, ::collection::index iLast) const
295
//{
296
//
297
// if (this->prepare_first_last(iFind, iLast))
298
// {
299
//
300
// for (; iFind <= iLast; iFind++)
301
// {
302
//
303
// if (case_insensitive_string_ends(pcszTopic, this->element_at(iFind)))
304
// {
305
//
306
// return iFind;
307
//
308
// }
309
//
310
// }
311
//
312
// }
313
//
314
// return -1;
315
//
316
//}
317
//
318
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
319
//::collection::index string_base_array < Type, RawType, t_etypeContainer > ::suffix_find_first(const Type& pcszTopic, ::collection::index iFind, ::collection::index iLast) const
320
//{
321
//
322
// if (this->prepare_first_last(iFind, iLast))
323
// {
324
//
325
// for (; iFind <= iLast; iFind++)
326
// {
327
//
328
// if (string_ends(pcszTopic, this->element_at(iFind)))
329
// {
330
//
331
// return iFind;
332
//
333
// }
334
//
335
// }
336
//
337
// }
338
//
339
// return -1;
340
//
341
//}
342
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
343
//::collection::index string_base_array < Type, RawType, t_etypeContainer > ::_find_first_suffixed(const Type & strSuffix, ::collection::index iFind, ::collection::index iLast) const
344
//{
345
//
346
// for (; iFind < iLast; iFind++)
347
// {
348
//
349
// if (string_ends(this->element_at(iFind), strSuffix))
350
// {
351
//
352
// return iFind;
353
//
354
// }
355
//
356
// }
357
//
358
// return -1;
359
//
360
//}
361
//
362
//
363
//template < typename Type, typename RawType, ::enum_type t_etypeContainer >
364
//::collection::index string_base_array < Type, RawType, t_etypeContainer > ::case_insensitive__find_first_suffixed(const Type & strSuffix, ::collection::index iFind, ::collection::index iLast) const
365
//{
366
//
367
// for (; iFind < iLast; iFind++)
368
// {
369
//
370
// if (case_insensitive_string_ends(this->element_at(iFind), strSuffix))
371
// {
372
//
373
// return iFind;
374
//
375
// }
376
//
377
// }
378
//
379
// return -1;
380
//
381
//}
382
//
prototype
collection
aaa__string_array_impl.h
Generated by
1.17.0