1 #define tabsize(x) ((size_t)(sizeof(x)/sizeof(*x))) 2 #define PFC_TABSIZE(x) ((size_t)(sizeof(x)/sizeof(*x))) 4 #define TEMPLATE_CONSTRUCTOR_FORWARD_FLOOD_WITH_INITIALIZER(THISCLASS,MEMBER,INITIALIZER) \ 5 THISCLASS() : MEMBER() INITIALIZER \ 6 template<typename t_param1> THISCLASS(const t_param1 & p_param1) : MEMBER(p_param1) INITIALIZER \ 7 template<typename t_param1,typename t_param2> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2) : MEMBER(p_param1,p_param2) INITIALIZER \ 8 template<typename t_param1,typename t_param2,typename t_param3> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3) : MEMBER(p_param1,p_param2,p_param3) INITIALIZER \ 9 template<typename t_param1,typename t_param2,typename t_param3,typename t_param4> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3,const t_param4 & p_param4) : MEMBER(p_param1,p_param2,p_param3,p_param4) INITIALIZER \ 10 template<typename t_param1,typename t_param2,typename t_param3,typename t_param4,typename t_param5> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3,const t_param4 & p_param4,const t_param5 & p_param5) : MEMBER(p_param1,p_param2,p_param3,p_param4,p_param5) INITIALIZER \ 11 template<typename t_param1,typename t_param2,typename t_param3,typename t_param4,typename t_param5,typename t_param6> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3,const t_param4 & p_param4,const t_param5 & p_param5,const t_param6 & p_param6) : MEMBER(p_param1,p_param2,p_param3,p_param4,p_param5,p_param6) INITIALIZER \ 12 template<typename t_param1,typename t_param2,typename t_param3,typename t_param4,typename t_param5,typename t_param6, typename t_param7> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3,const t_param4 & p_param4,const t_param5 & p_param5,const t_param6 & p_param6,const t_param7 & p_param7) : MEMBER(p_param1,p_param2,p_param3,p_param4,p_param5,p_param6,p_param7) INITIALIZER \ 13 template<typename t_param1,typename t_param2,typename t_param3,typename t_param4,typename t_param5,typename t_param6, typename t_param7, typename t_param8> THISCLASS(const t_param1 & p_param1,const t_param2 & p_param2,const t_param3 & p_param3,const t_param4 & p_param4,const t_param5 & p_param5,const t_param6 & p_param6,const t_param7 & p_param7, const t_param8 & p_param8) : MEMBER(p_param1,p_param2,p_param3,p_param4,p_param5,p_param6,p_param7, p_param8) INITIALIZER 15 #define TEMPLATE_CONSTRUCTOR_FORWARD_FLOOD(THISCLASS,MEMBER) TEMPLATE_CONSTRUCTOR_FORWARD_FLOOD_WITH_INITIALIZER(THISCLASS,MEMBER,{}) 26 #define PFC_DECLARE_EXCEPTION(NAME,BASECLASS,DEFAULTMSG) \ 27 class NAME : public BASECLASS { \ 29 static const char * g_what() {return DEFAULTMSG;} \ 30 NAME() : BASECLASS(DEFAULTMSG,0) {} \ 31 NAME(const char * p_msg) : BASECLASS(p_msg) {} \ 32 NAME(const char * p_msg,int) : BASECLASS(p_msg,0) {} \ 33 NAME(const NAME & p_source) : BASECLASS(p_source) {} \ 38 throw t_exception(p_message);
44 #define PFC_DECLARE_EXCEPTION(NAME,BASECLASS,DEFAULTMSG) \ 45 class NAME : public BASECLASS { \ 47 static const char * g_what() {return DEFAULTMSG;} \ 48 const char* what() const throw() {return DEFAULTMSG;} \ 70 if (p_message != NULL)
m_message = strdup(p_message);
88 template<
typename p_type1,
typename p_type2>
90 template<
typename p_type>
91 class is_same_type<p_type,p_type> {
public:
enum {value =
true}; };
96 #define PFC_STATIC_ASSERT(X) { ::pfc::static_assert_t<(X)>(); } 98 template<
typename t_type>
108 ::memcpy(reinterpret_cast<void*>(p_dst), reinterpret_cast<const void*>(p_src), p_count *
sizeof(t_type));
117 t_type * ret =
new(&p_item) t_type;
118 PFC_ASSERT(ret == &p_item);
125 t_type * walk = p_items;
151 t_type * ret =
new(&p_item) t_type(p_copyfrom);
152 PFC_ASSERT(ret == &p_item);
171 if (p_copyfrom_count > p_count) p_copyfrom_count = p_count;
184 template<
typename t_ret,
typename t_param>
188 if (p_param == NULL)
return NULL;
202 template<
typename t_ret,
typename t_param>
204 t_ret temp = (t_ret) p_param;
205 if ((t_param) temp != p_param)
throw exception_overflow();
209 template<
typename t_exception,
typename t_ret,
typename t_param>
211 t_ret temp = (t_ret) p_param;
212 if ((t_param) temp != p_param)
throw t_exception();
216 template<
typename t_acc,
typename t_add>
218 t_acc delta = downcast_guarded<t_acc>(p_add);
220 if (delta < p_acc)
throw exception_overflow();
228 throw_exception_with_message<exception_bug_check>(p_msg);
235 throw exception_bug_check();
242 throw_exception_with_message<exception_dynamic_assert>(p_msg);
248 throw exception_dynamic_assert();
254 T * walk1 = p_buffer1, * walk2 = p_buffer2;
255 for(
t_size n=p_size;n;--n) {
263 template<
typename T,t_size p_size>
265 T * walk1 = p_buffer1, * walk2 = p_buffer2;
266 for(
t_size n=p_size;n;--n) {
275 template<t_size p_size>
277 if (p_size %
sizeof(
t_size) == 0) {
278 swap_multi_t<
t_size,p_size/
sizeof(
t_size)>(reinterpret_cast<t_size*>(p_object1),
reinterpret_cast<t_size*
>(p_object2));
280 swap_multi_t<t_uint8,p_size>(
reinterpret_cast<t_uint8*
>(p_object1),reinterpret_cast<t_uint8*>(p_object2));
287 __unsafe__swap_raw_t<sizeof(T)>(
reinterpret_cast<void*
>( &p_item1 ), reinterpret_cast<void*>( &p_item2 ) );
289 T temp( std::move(p_item2) );
290 p_item2 = std::move(p_item1);
291 p_item1 = std::move(temp);
300 if (t::needs_constructor || t::needs_destructor) {
301 if (t::realloc_safe)
swap_t(p_item1, p_item2);
302 else p_item1 = std::move( p_item2 );
304 p_item1 = std::move( p_item2 );
308 template<
typename t_array>
311 template<
typename t_item, t_size p_w
idth>
314 template<
typename t_array,
typename t_item>
static bool array_isLast(
const t_array & arr,
const t_item & item) {
316 return size > 0 && arr[size-1] == item;
318 template<
typename t_array,
typename t_item>
static bool array_isFirst(
const t_array & arr,
const t_item & item) {
320 return size > 0 && arr[0] == item;
323 template<
typename t_array,
typename t_filler>
324 inline void fill_t(t_array & p_buffer,
const t_size p_count,
const t_filler & p_filler) {
325 for(
t_size n=0;n<p_count;n++)
326 p_buffer[n] = p_filler;
329 template<
typename t_array,
typename t_filler>
330 inline void fill_ptr_t(t_array * p_buffer,
const t_size p_count,
const t_filler & p_filler) {
331 for(
t_size n=0;n<p_count;n++)
332 p_buffer[n] = p_filler;
335 template<
typename t_item1,
typename t_item2>
336 inline int compare_t(
const t_item1 & p_item1,
const t_item2 & p_item2) {
337 if (p_item1 < p_item2)
return -1;
338 else if (p_item1 > p_item2)
return 1;
345 template<
typename t_item1,
typename t_item2>
346 inline static int compare(
const t_item1 & p_item1,
const t_item2 & p_item2) {
return pfc::compare_t(p_item1,p_item2);}
350 template<
typename t_item1,
typename t_item2>
static int compare(
const t_item1 & p_item1,
const t_item2 & p_item2) {
return t_comparator::compare(*p_item1,*p_item2);}
354 template<
typename t_item1,
typename t_item2>
static int compare(
const t_item1 & p_item1,
const t_item2 & p_item2) {
356 if (state != 0)
return state;
363 template<
typename t_item1,
typename t_item2>
364 inline static int compare(
const t_item1 & p_item1,
const t_item2 & p_item2) {
366 return memcmp(&p_item1,&p_item2,
sizeof(t_item1));
370 template<
typename t_source1,
typename t_source2>
372 t_size walk1 = 0, walk2 = 0, walk_out = 0;
373 const t_size max1 = p_source1.get_size(), max2 = p_source2.get_size();
376 if (walk1 < max1 && walk2 < max2) {
378 }
else if (walk1 < max1) {
380 }
else if (walk2 < max2) {
385 if (state < 0) walk_out++;
386 if (state <= 0) walk1++;
387 if (state >= 0) walk2++;
394 template<
typename t_destination,
typename t_source1,
typename t_source2>
395 void subtract_sorted_lists(t_destination & p_destination,
const t_source1 & p_source1,
const t_source2 & p_source2) {
397 t_size walk1 = 0, walk2 = 0, walk_out = 0;
398 const t_size max1 = p_source1.get_size(), max2 = p_source2.get_size();
401 if (walk1 < max1 && walk2 < max2) {
403 }
else if (walk1 < max1) {
405 }
else if (walk2 < max2) {
412 if (state < 0) p_destination[walk_out++] = p_source1[walk1];
413 if (state <= 0) walk1++;
414 if (state >= 0) walk2++;
418 template<
typename t_source1,
typename t_source2>
420 t_size walk1 = 0, walk2 = 0, walk_out = 0;
421 const t_size max1 = p_source1.get_size(), max2 = p_source2.get_size();
424 if (walk1 < max1 && walk2 < max2) {
426 }
else if (walk1 < max1) {
428 }
else if (walk2 < max2) {
433 if (state <= 0) walk1++;
434 if (state >= 0) walk2++;
442 template<
typename t_destination,
typename t_source1,
typename t_source2>
443 void merge_sorted_lists(t_destination & p_destination,
const t_source1 & p_source1,
const t_source2 & p_source2) {
445 t_size walk1 = 0, walk2 = 0, walk_out = 0;
446 const t_size max1 = p_source1.get_size(), max2 = p_source2.get_size();
449 if (walk1 < max1 && walk2 < max2) {
451 }
else if (walk1 < max1) {
453 }
else if (walk2 < max2) {
459 p_destination[walk_out] = p_source1[walk1++];
460 }
else if (state > 0) {
461 p_destination[walk_out] = p_source2[walk2++];
463 p_destination[walk_out] = p_source1[walk1];
472 template<
typename t_array,
typename T>
475 t_size old_count = p_array.get_size();
476 p_array.set_size(old_count + 1);
477 p_array[old_count] = p_item;
481 template<
typename t_array,
typename T>
484 t_size old_count = p_array.get_size();
485 p_array.set_size(old_count + 1);
486 swap_t(p_array[old_count],p_item);
490 template<
typename t_array>
492 t_size old_count = p_array.get_size();
493 if (p_index > old_count) p_index = old_count;
494 p_array.set_size(old_count + 1);
495 for(
t_size n=old_count;n>p_index;n--)
move_t(p_array[n], p_array[n-1]);
499 template<
typename t_array,
typename T>
501 t_size old_count = p_array.get_size();
502 if (p_index > old_count) p_index = old_count;
503 p_array.set_size(old_count + 1);
504 for(
t_size n=old_count;n>p_index;n--)
505 move_t(p_array[n], p_array[n-1]);
506 p_array[p_index] = p_item;
509 template<
typename array1_t,
typename array2_t>
510 void insert_array_t( array1_t & outArray,
size_t insertAt, array2_t
const & inArray,
size_t inArraySize) {
511 const size_t oldSize = outArray.get_size();
512 if (insertAt > oldSize) insertAt = oldSize;
513 const size_t newSize = oldSize + inArraySize;
514 outArray.set_size( newSize );
515 for(
size_t m = oldSize; m != insertAt; --m) {
516 move_t( outArray[ m - 1 + inArraySize], outArray[m - 1] );
518 for(
size_t w = 0; w < inArraySize; ++w) {
519 outArray[ insertAt + w ] = inArray[ w ];
523 template<
typename t_array,
typename in_array_t>
525 const t_size old_count = p_array.get_size();
526 const size_t new_count = old_count + p_itemCount;
527 if (p_index > old_count) p_index = old_count;
528 p_array.set_size(new_count);
529 size_t toMove = old_count - p_index;
530 for(
size_t w = 0; w < toMove; ++w) {
531 move_t( p_array[new_count - 1 - w], p_array[old_count - 1 - w] );
534 for(
size_t w = 0; w < p_itemCount; ++w) {
535 p_array[p_index+w] = p_items[w];
540 template<
typename t_array,
typename T>
542 t_size old_count = p_array.get_size();
543 if (p_index > old_count) p_index = old_count;
544 p_array.set_size(old_count + 1);
545 for(
t_size n=old_count;n>p_index;n--)
546 swap_t(p_array[n],p_array[n-1]);
547 swap_t(p_array[p_index],p_item);
553 inline T max_t(
const T & item1,
const T & item2) {
return item1 > item2 ? item1 : item2;};
556 inline T min_t(
const T & item1,
const T & item2) {
return item1 < item2 ? item1 : item2;};
559 inline T abs_t(
T item) {
return item<0 ? -item : item;}
565 inline T clip_t(
const T & p_item,
const T & p_min,
const T & p_max) {
566 if (p_item < p_min)
return p_min;
567 else if (p_item <= p_max)
return p_item;
585 template<
typename t_exception,
typename t_
int>
587 if (p_val1 == 0 || p_val2 == 0)
return 0;
589 if (temp / p_val1 != p_val2)
throw t_exception();
592 template<
typename t_
int>
594 return mul_safe_t<exception_overflow>(v1, v2);
598 if (v < v1)
return ~0;
603 if (v > v1)
return 0;
610 template<
typename t_src,
typename t_dst>
612 for(
t_size n=0;n<p_count;n++) p_dst[n] = p_src[n];
615 template<
typename t_dst,
typename t_src>
617 for(
t_size n=0;n<p_count;n++) p_dst[n] = p_src[n];
620 template<
typename t_src,
typename t_dst>
622 p_dst += p_count; p_src += p_count;
623 for(
t_size n=0;n<p_count;n++) *(--p_dst) = *(--p_src);
626 template<
typename T,
typename t_val>
628 for(
t_size n=0;n<p_count;n++) p_buffer[n] = p_val;
631 template<
typename T,
typename t_val>
634 for(
t_size n=0;n<width;n++) p_buffer[n] = p_val;
639 for(
t_size n=0;n<p_count;n++) p_buffer[n] = 0;
645 for(
t_size n=0;n<width;n++) p_buffer[n] = 0;
650 if (p_dst == p_src) {}
651 else if (p_dst > p_src && p_dst < p_src + p_count) memcpy_backwards_t<T>(p_dst,p_src,p_count);
652 else memcpy_t<T>(p_dst,p_src,p_count);
655 template<
typename TVal>
void memxor_t(TVal * out,
const TVal * s1,
const TVal * s2,
t_size count) {
656 for(
t_size walk = 0; walk < count; ++walk) out[walk] = s1[walk] ^ s2[walk];
658 static void memxor(
void * target,
const void * source1,
const void * source2,
t_size size) {
659 memxor_t( reinterpret_cast<t_uint8*>(target), reinterpret_cast<const t_uint8*>(source1), reinterpret_cast<const t_uint8*>(source2), size);
664 if (p_ptr == NULL)
throw std::bad_alloc();
670 if (p_val < 0)
return -1;
671 else if (p_val > 0)
return 1;
681 template<
typename t_type,
typename t_newval>
682 t_type
replace_t(t_type & p_var,
const t_newval & p_newval) {
683 t_type oldval = p_var;
687 template<
typename t_type>
694 template<t_size p_size_pow2>
697 return ( ((
t_size)p_ptr) & (p_size_pow2-1) ) == 0;
701 template<
typename t_array>
706 template<
typename t_array>
708 if (p_from > p_to)
throw pfc::exception_overflow();
718 template<
typename t_array>
721 t_size n,count = p_array.get_size(), total = 0;
723 n = total = p_mask.
find(
true,0,count);
727 for(n=p_mask.
find(
false,n+1,count-n-1);n<count;n=p_mask.
find(
false,n+1,count-n-1))
728 move_t(p_array[total++],p_array[n]);
730 p_array.set_size(total);
737 template<
typename t_array,
typename t_compare>
744 for(n=1;n<p_count;n++)
746 bool found = p_compare(p_array[n-1],p_array[n]) == 0;
754 template<
typename t_array,
typename t_compare,
typename t_permutation>
759 p_out.
set(p_permutation[0],
false);
760 for(n=1;n<p_count;n++)
762 bool found = p_compare(p_array[p_permutation[n-1]],p_array[p_permutation[n]]) == 0;
764 p_out.
set(p_permutation[n],found);
770 template<
typename t_
char>
772 for(
t_size walk = 0;;walk++) {
773 if (walk >= p_length || p_string[walk] == 0)
return walk;
778 template<
typename t_array>
782 template<
typename t_item>
783 void operator() (
const t_item & p_item) {
784 PFC_ASSERT(m_walk < m_array.get_size());
785 m_array[m_walk++] = p_item;
788 PFC_ASSERT(m_walk == m_array.get_size());
795 template<
typename t_list,
typename t_array>
797 p_array.set_size(p_list.get_count());
799 p_list.enumerate(enumerator);
803 template<
typename t_receiver>
807 template<
typename t_item>
void operator() (
const t_item & p_item) {m_receiver.add_item(p_item);}
812 template<
typename t_receiver,
typename t_giver>
815 p_giver.enumerate(wrapper);
818 template<
typename t_receiver,
typename t_giver>
820 p_receiver.remove_all();
824 inline bool lxor(
bool p_val1,
bool p_val2) {
825 return p_val1 == !p_val2;
828 template<
typename t_val>
829 inline void min_acc(t_val & p_acc,
const t_val & p_val) {
830 if (p_val < p_acc) p_acc = p_val;
833 template<
typename t_val>
834 inline void max_acc(t_val & p_acc,
const t_val & p_val) {
835 if (p_val > p_acc) p_acc = p_val;
841 template<
typename t_val>
851 const uint32_t mask = 0x11111111;
852 uint32_t acc = i & mask;
853 acc += (i >> 1) & mask;
854 acc += (i >> 2) & mask;
855 acc += (i >> 3) & mask;
857 const uint32_t mask2 = 0x0F0F0F0F;
858 uint32_t acc2 = acc & mask2;
859 acc2 += (acc >> 4) & mask2;
861 const uint32_t mask3 = 0x00FF00FF;
862 uint32_t acc3 = acc2 & mask3;
863 acc3 += (acc2 >> 8) & mask3;
865 return (acc3 & 0xFFFF) + ((acc3 >> 16) & 0xFFFF);
869 template<
typename t_to,
typename t_from>
872 template<
typename t_array,
typename t_value>
873 void fill_array_t(t_array & p_array,
const t_value & p_value);
877 #define PFC_CLASS_NOT_COPYABLE(THISCLASSNAME,THISTYPE) \ 879 THISCLASSNAME(const THISTYPE&); \ 880 const THISTYPE & operator=(const THISTYPE &); 882 #define PFC_CLASS_NOT_COPYABLE_EX(THISTYPE) PFC_CLASS_NOT_COPYABLE(THISTYPE,THISTYPE)
const char * what() const
~__exception_with_message_t()
t_type * __unsafe__in_place_resize_array_t(t_type *p_items, t_size p_from, t_size p_to)
For use with avltree/map etc.
void list_to_array(t_array &p_array, const t_list &p_list)
int sgn_t(const T &p_val)
void __unsafe__in_place_destructor_array_t(t_type *p_items, t_size p_count)
T min_t(const T &item1, const T &item2)
void set_message(const char *p_message)
void copy_list_enumerated(t_receiver &p_receiver, const t_giver &p_giver)
t_uint64 pow_int(t_uint64 base, t_uint64 exp)
__exception_with_message_t< t_base > t_self
void __unsafe__in_place_destructor_t(t_type &p_item)
virtual t_size find(bool val, t_size start, t_ssize count) const
Returns the first occurance of val between start and start+count (excluding start+count), or start+count if not found; count may be negative to search back rather than forward. Can be overridden by bit_array implementations for improved speed in specific cases.
void memxor_t(TVal *out, const TVal *s1, const TVal *s2, t_size count)
t_size subtract_sorted_lists_calculate_count(const t_source1 &p_source1, const t_source2 &p_source2)
t_type replace_null_t(t_type &p_var)
t_size find_duplicates_sorted_permutation_t(t_array p_array, t_size p_count, t_compare p_compare, t_permutation const &p_permutation, bit_array_var &p_out)
t_int multiply_guarded(t_int v1, t_int v2)
Bit array interface class, constant version (you can only retrieve values). Range of valid indexes d...
int compare(t1 const &p1, t2 const &p2)
t_ret * safe_ptr_cast(t_param *p_param)
t_int sub_unsigned_clipped(t_int v1, t_int v2)
t_size merge_sorted_lists_calculate_count(const t_source1 &p_source1, const t_source2 &p_source2)
void fill_ptr_t(t_array *p_buffer, const t_size p_count, const t_filler &p_filler)
void memcpy_backwards_t(t_dst *p_dst, const t_src *p_src, t_size p_count)
t_size remove_mask_t(t_array &p_array, const bit_array &p_mask)
t_int add_unsigned_clipped(t_int v1, t_int v2)
bool is_ptr_aligned_t(const void *p_ptr)
t_type replace_t(t_type &p_var, const t_newval &p_newval)
static int compare(const t_item1 &p_item1, const t_item2 &p_item2)
unsigned countBits32(uint32_t i)
void dynamic_assert(bool p_condition, const char *p_msg)
t_size append_t(t_array &p_array, const T &p_item)
void move_t(T &p_item1, T &p_item2)
This is similar to plain p_item1 = p_item2; assignment, but optimized for the case where p_item2 cont...
t_type * __unsafe__in_place_constructor_array_copy_t(t_type *p_items, t_size p_count, const t_copy *p_copyfrom)
enumerator_add_item(t_receiver &p_receiver)
void max_acc(t_val &p_acc, const t_val &p_val)
void merge_sorted_lists(t_destination &p_destination, const t_source1 &p_source1, const t_source2 &p_source2)
Merges p_source1 and p_source2, storing content in p_destination. Both source lists must be sorted...
void __unsafe__swap_raw_t(void *p_object1, void *p_object2)
__exception_with_message_t(const char *p_message)
virtual void set(t_size n, bool val)=0
static void memxor(void *target, const void *source1, const void *source2, t_size size)
void insert_array_t(array1_t &outArray, size_t insertAt, array2_t const &inArray, size_t inArraySize)
bool lxor(bool p_val1, bool p_val2)
void copy_array_t(t_to &p_to, const t_from &p_from)
void copy_array_loop_t(t_dst &p_dst, const t_src &p_src, t_size p_count)
void acc_unsigned_clipped(t_int &v1, t_int v2)
t_size strlen_t(const t_char *p_string, t_size p_length=~0)
t_size insert_multi_t(t_array &p_array, const in_array_t &p_items, size_t p_itemCount, t_size p_index)
const wchar_t * empty_string_t< wchar_t >()
void memmove_t(T *p_dst, const T *p_src, t_size p_count)
void subtract_sorted_lists(t_destination &p_destination, const t_source1 &p_source1, const t_source2 &p_source2)
Subtracts p_source2 contents from p_source1 and stores result in p_destination. Both source lists mus...
t_int64 rint64(double p_val)
t_int32 rint32(double p_val)
t_size append_swap_t(t_array &p_array, T &p_item)
void memset_null_t(T *p_buffer, t_size p_count)
void delete_array_t(T *ptr)
void fill_array_t(t_array &p_array, const t_value &p_value)
int compare_t(const hasher_md5_result &p_item1, const hasher_md5_result &p_item2)
static bool array_isFirst(const t_array &arr, const t_item &item)
Bit array interface class, variable version (you can both set and retrieve values). As with the constant version, valid index range depends on the context.
T * new_ptr_check_t(T *p_ptr)
t_ret downcast_guarded(const t_param &p_param)
const char * empty_string_t< char >()
void accumulate_guarded(t_acc &p_acc, const t_add &p_add)
T clip_t(const T &p_item, const T &p_min, const T &p_max)
static bool array_isLast(const t_array &arr, const t_item &item)
t_size find_duplicates_sorted_t(t_array p_array, t_size p_count, t_compare p_compare, bit_array_var &p_out)
t_ret downcast_guarded_ex(const t_param &p_param)
void __unsafe__in_place_constructor_t(t_type &p_item)
const t_self & operator=(const t_self &p_source)
t_ret implicit_cast(t_ret val)
void fill_t(t_array &p_buffer, const t_size p_count, const t_filler &p_filler)
t_type * __unsafe__in_place_constructor_array_t(t_type *p_items, t_size p_count)
t_size array_size_t(const t_array &p_array)
PFC_NORETURN void throw_exception_with_message(const char *p_message)
t_int mul_safe_t(t_int p_val1, t_int p_val2)
__exception_with_message_t(const t_self &p_source)
t_type * __unsafe__in_place_constructor_array_copy_partial_t(t_type *p_items, t_size p_count, const t_copy *p_copyfrom, t_size p_copyfrom_count)
__list_to_array_enumerator(t_array &p_array)
void __unsafe__memcpy_t(t_type *p_dst, const t_type *p_src, t_size p_count)
void overwrite_list_enumerated(t_receiver &p_receiver, const t_giver &p_giver)
t_size insert_swap_t(t_array &p_array, T &p_item, t_size p_index)
void memcpy_t(t_dst *p_dst, const t_src *p_src, t_size p_count)
__exception_with_message_t()
static int compare(const t_item1 &p_item1, const t_item2 &p_item2)
void array_rangecheck_t(const t_array &p_array, t_size p_index)
static int compare(const t_item1 &p_item1, const t_item2 &p_item2)
void swap_multi_t(T *p_buffer1, T *p_buffer2, t_size p_size)
void swap_t(T &p_item1, T &p_item2)
t_size insert_uninitialized_t(t_array &p_array, t_size p_index)
const T * empty_string_t()
PFC_DECLARE_EXCEPTION(exception_map_entry_not_found, exception,"Map entry not found")
T max_t(const T &item1, const T &item2)
void memset_t(T *p_buffer, const t_val &p_val, t_size p_count)
void __unsafe__in_place_constructor_copy_t(t_type &p_item, const t_copy &p_copyfrom)
t_size insert_t(t_array &p_array, const T &p_item, t_size p_index)
void min_acc(t_val &p_acc, const t_val &p_val)
void bug_check_assert(bool p_condition, const char *p_msg)
static int compare(const t_item1 &p_item1, const t_item2 &p_item2)