|
CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
Functions | |
| template<typename T , typename U > | |
| int32_t | Compare (const SharedPtr< T > &a, const SharedPtr< U > &b) |
| Compares two smart pointers. More... | |
| template<typename T > | |
| int32_t | Compare (const T &a, const T &b) |
| Compares two arithmetic values. More... | |
| template<typename T , typename U > | |
| int32_t | Compare (const SharedPtr< T > &a, const U &b) |
| Compares a smart pointer with a value. More... | |
| template<typename T > | |
| int32_t | LastIndexOfImpl (const ReadOnlySpan< T > &searchSpace, int32_t length, const T &value) |
| Finds the last index of a value in a span. More... | |
| template<typename T > | |
| bool | SequenceEqualImpl (const ReadOnlySpan< T > &first, const int32_t start, int32_t length, const ReadOnlySpan< T > &second) |
| Checks if two spans are equal starting from specified positions. More... | |
| template<typename TKey , typename TValue > | |
| void | IntroSort (Span< TKey > &keys, Span< TValue > &values, int32_t depthLimit, std::function< int32_t(const TKey &, const TKey &)> comparer) |
| Internal implementation of introsort algorithm for key-value pairs. More... | |
| template<typename TKey , typename TValue > | |
| void | SwapIfGreaterWithValues (Span< TKey > &keys, Span< TValue > &values, std::function< int32_t(const TKey &, const TKey &)> comparer, int32_t i, int32_t j) |
| Swaps key-value pairs if comparison condition is met. More... | |
| template<typename TKey , typename TValue > | |
| void | InsertionSort (Span< TKey > &keys, Span< TValue > &values, std::function< int32_t(const TKey &, const TKey &)> comparer) |
| Performs insertion sort on key-value pairs. More... | |
| template<typename TKey , typename TValue > | |
| void | HeapSort (Span< TKey > &keys, Span< TValue > &values, std::function< int32_t(const TKey &, const TKey &)> comparer) |
| Performs heap sort on key-value pairs. More... | |
| template<typename TKey , typename TValue > | |
| void | Heapify (Span< TKey > &keys, Span< TValue > &values, int32_t n, int32_t i, std::function< int32_t(const TKey &, const TKey &)> comparer) |
| Maintains heap property for key-value pairs. More... | |
| template<typename TKey , typename TValue > | |
| int32_t | PickPivotAndPartition (Span< TKey > &keys, Span< TValue > &values, std::function< int32_t(const TKey &, const TKey &)> comparer) |
| Selects pivot and partitions key-value pairs for quicksort. More... | |
| template<typename T , typename TValue , typename TCompareFunc > | |
| int32_t | BinarySearchImpl (const ReadOnlySpan< T > &span, const TValue &value, TCompareFunc compareFunc) |
| Common binary search implementation. More... | |
Variables | |
| const std::array< char16_t, 22 > | DefaultWhitespaceChars |
| Default whitespace characters used for trimming operations. More... | |
| const ReadOnlySpan< char16_t > | DefaultWhitespaceSpan |
| Static ReadOnlySpan for default whitespace characters to avoid array creation. More... | |
| int32_t System::MemoryExtensions::Details::BinarySearchImpl | ( | const ReadOnlySpan< T > & | span, |
| const TValue & | value, | ||
| TCompareFunc | compareFunc | ||
| ) |
Common binary search implementation.
| T | Type of elements in span |
| TValue | Type of value to search for |
| TCompareFunc | Function type for comparison |
| span | The span to search |
| value | The value to search for |
| compareFunc | Function that compares value with span element and returns int32_t (-1, 0, 1) |
| int32_t System::MemoryExtensions::Details::Compare | ( | const SharedPtr< T > & | a, |
| const SharedPtr< U > & | b | ||
| ) |
Compares two smart pointers.
| T | Type of first smart pointer |
| U | Type of second smart pointer |
| a | First smart pointer |
| b | Second smart pointer |
| int32_t System::MemoryExtensions::Details::Compare | ( | const SharedPtr< T > & | a, |
| const U & | b | ||
| ) |
Compares a smart pointer with a value.
| T | Type pointed to by smart pointer |
| U | Type of value |
| a | Smart pointer |
| b | Value |
| int32_t System::MemoryExtensions::Details::Compare | ( | const T & | a, |
| const T & | b | ||
| ) |
Compares two arithmetic values.
| T | Arithmetic type |
| a | First value |
| b | Second value |
| void System::MemoryExtensions::Details::Heapify | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| int32_t | n, | ||
| int32_t | i, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer | ||
| ) |
Maintains heap property for key-value pairs.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys in the heap |
| values | The span of values in the heap |
| n | Size of the heap |
| i | Index to heapify from |
| comparer | Comparison function for keys |
| void System::MemoryExtensions::Details::HeapSort | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer | ||
| ) |
Performs heap sort on key-value pairs.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys to sort |
| values | The span of values to sort |
| comparer | Comparison function for keys |
| void System::MemoryExtensions::Details::InsertionSort | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer | ||
| ) |
Performs insertion sort on key-value pairs.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys to sort |
| values | The span of values to sort |
| comparer | Comparison function for keys |
| void System::MemoryExtensions::Details::IntroSort | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| int32_t | depthLimit, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer | ||
| ) |
Internal implementation of introsort algorithm for key-value pairs.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys to sort |
| values | The span of values to sort |
| depthLimit | Maximum recursion depth before switching to heapsort |
| comparer | Comparison function for keys |
| int32_t System::MemoryExtensions::Details::LastIndexOfImpl | ( | const ReadOnlySpan< T > & | searchSpace, |
| int32_t | length, | ||
| const T & | value | ||
| ) |
Finds the last index of a value in a span.
| T | Type of elements in span |
| searchSpace | Span to search |
| length | Length to search within |
| value | Value to find |
| int32_t System::MemoryExtensions::Details::PickPivotAndPartition | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer | ||
| ) |
Selects pivot and partitions key-value pairs for quicksort.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys to partition |
| values | The span of values to partition |
| comparer | Comparison function for keys |
| bool System::MemoryExtensions::Details::SequenceEqualImpl | ( | const ReadOnlySpan< T > & | first, |
| const int32_t | start, | ||
| int32_t | length, | ||
| const ReadOnlySpan< T > & | second | ||
| ) |
Checks if two spans are equal starting from specified positions.
| T | Type of elements in spans |
| first | First span |
| start | Starting index in first span |
| length | Number of elements to compare |
| second | Second span |
| void System::MemoryExtensions::Details::SwapIfGreaterWithValues | ( | Span< TKey > & | keys, |
| Span< TValue > & | values, | ||
| std::function< int32_t(const TKey &, const TKey &)> | comparer, | ||
| int32_t | i, | ||
| int32_t | j | ||
| ) |
Swaps key-value pairs if comparison condition is met.
| TKey | The type of keys |
| TValue | The type of values |
| keys | The span of keys |
| values | The span of values |
| comparer | Comparison function for keys |
| i | First index to compare |
| j | Second index to compare |
|
extern |
Default whitespace characters used for trimming operations.
|
extern |
Static ReadOnlySpan for default whitespace characters to avoid array creation.