3#ifndef _aspose_system_array_h_
4#define _aspose_system_array_h_
6#include <system/details/collections_helper.h>
7#include <system/details/comparer_type.h>
8#include <system/details/equality_helper.h>
9#include <system/details/array_view.h>
10#include <system/details/stack_array.h>
11#include <system/object.h>
12#include <system/collections/icomparer.h>
13#include <system/collections/ienumerable.h>
14#include <system/collections/ilist.h>
15#include <system/collections/iread_only_list.h>
16#include <system/exceptions.h>
17#include <system/collections/algorithms.h>
18#include <system/converter.h>
19#include <system/predicate.h>
20#include <system/action.h>
21#include <system/select_type.h>
22#include <system/cycles_detection.h>
23#include <system/comparison.h>
24#include <system/collections/read_only_collection.h>
31#include <initializer_list>
40namespace System {
namespace Collections {
namespace ObjectModel {
41template<
typename>
class ReadOnlyCollection;
47 template <
typename X,
typename IdxType>
50 return (**ptr).operator[](
static_cast<int>(idx));
55 template <typename Integral, bool = std::numeric_limits<Integral>::is_signed>
56 struct NegativeValueChecker
61 static void Check(
const Integral &value)
64 throw System::OverflowException(u
"Negative array size");
69 template <
typename Integral>
70 struct NegativeValueChecker<Integral, false>
73 static void Check(
const Integral&) {}
78 template <
typename Integral,
bool = (sizeof(Integral) >
sizeof(int)) || (!std::numeric_limits<Integral>::is_signed && (
sizeof(Integral) ==
sizeof(
int)))>
79 struct IntPositiveOverflowChecker
84 static void Check(
const Integral& value)
86 if (value >=
static_cast<Integral
>((std::numeric_limits<int>::max)()))
87 throw System::OverflowException(u
"Array size too big for signed integer");
92 template <
typename Integral>
93 struct IntPositiveOverflowChecker<Integral, false>
96 static void Check(
const Integral &value) { ASPOSE_UNUSED(value); }
104 template <
typename Integral>
105 int FixArraySize(
const Integral &value)
107 NegativeValueChecker<Integral>::Check(value);
108 IntPositiveOverflowChecker<Integral>::Check(value);
109 return static_cast<int>(
value);
147 System::Details::MakeObjectLeakageDetector::SignatureBacktraceSentry signature_sentry;
148 System::Details::MakeObjectLeakageDetector::SetSignature<Array<T>>(init);
150 Detail::OwnNextObject ownershipSentry;
154 ownershipSentry.CreatedSuccessfully(arr);
155 signature_sentry.CreatedSuccessfully(arr);
166 System::Details::MakeObjectLeakageDetector::SignatureBacktraceSentry signature_sentry;
167 System::Details::MakeObjectLeakageDetector::SetSignature<Array<T>>(std::forward<Args>(args)...);
169 Detail::OwnNextObject ownershipSentry;
173 ownershipSentry.CreatedSuccessfully(arr);
174 signature_sentry.CreatedSuccessfully(arr);
185 template <
class T,
class Integral,
class... Args>
186 typename std::enable_if<std::is_integral<Integral>::value,
ArrayPtr<T>>::type
MakeArray(Integral size, Args&&... args)
188 System::Details::MakeObjectLeakageDetector::SignatureBacktraceSentry signature_sentry;
189 System::Details::MakeObjectLeakageDetector::SetSignature<Array<T>>(Details::FixArraySize(size), std::forward<Args>(args)...);
191 Detail::OwnNextObject ownershipSentry;
193 Array<T>*
const arr =
new Array<T>(Details::FixArraySize(size), std::forward<Args>(args)...);
195 ownershipSentry.CreatedSuccessfully(arr);
196 signature_sentry.CreatedSuccessfully(arr);
208 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
209 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
223 template <
typename T>
226 return MakeArray<T>();
300 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
301 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
311 typedef System::Details::CollectionHelpers::ContainerPointerMode<UnderlyingType>
pointer_mode_t;
313 typedef std::vector<UnderlyingType, typename pointer_mode_t::allocator_type>
vector_t;
318#ifdef ASPOSE_GET_SHARED_MEMBERS
319 DEFINE_GET_SHARED_MEMBERS(m_data)
352 return (m_idx < 0 || m_idx >= (int64_t)m_array->
m_data.size())
353 ? System::Default<T>()
354 : m_array->
m_data[(size_t)m_idx];
362 if (m_idx < (int64_t)m_array->
m_data.size())
365 return m_idx < (int64_t)m_array->
m_data.size();
374#ifdef __DBG_FOR_EACH_MEMBER
378 void DBG_for_each_member(DBG::for_each_member_visitor &visitor)
const override
380 visitor.add_self(
this);
381 visitor.add_member(
this, m_array.
get_shared(),
"m_array");
385 const char* DBG_class_name()
const override {
return "Array<T>::Enumerator"; }
389#ifdef ASPOSE_GET_SHARED_MEMBERS
391 virtual void GetSharedMembers(System::Object::shared_members_type& result)
const override
393 Object::GetSharedMembers(result);
394 result.Add(
"System::Array<T>::Enumerator::m_array", m_array);
400 Array() : m_data(m_pointer_mode.GetAllocator()) {}
405 Array(
int count,
const T& init = T()) : m_data(count, static_cast<
UnderlyingType>(init), m_pointer_mode.GetAllocator()) { }
411 template <
typename ValueType>
412 Array(
typename std::enable_if<std::is_arithmetic<T>::value && std::is_arithmetic<ValueType>::value && std::is_convertible<ValueType, T>::value,
int>::type count,
ValueType init)
413 :
Array(count, ASPOSECPP_CHECKED_CAST(T, init)) {}
418 Array(
int count,
const T inits[]) : m_data(count, static_cast<
UnderlyingType>(T()), m_pointer_mode.GetAllocator())
420 for (
int i = 0; i < count; ++i)
421 m_data[i] = inits[i];
430 Array(
const vector_t &assgn) : m_data(assgn, m_pointer_mode.GetAllocator()) {}
436 template <typename Q, typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
438 : m_data(
value.begin(),
value.end(), m_pointer_mode.GetAllocator())
445 template <typename Q, typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
447 : m_data(m_pointer_mode.GetAllocator())
454 Array(std::initializer_list<UnderlyingType> init) : m_data(init, m_pointer_mode.GetAllocator()) {}
459 template <std::
size_t InitArraySize>
460 Array(
const std::array<UnderlyingType, InitArraySize> &init) :
461 Array(init, static_cast<std::make_index_sequence<InitArraySize>*>(nullptr))
466 Array(std::initializer_list<bool> init,
int = 0) : m_data(m_pointer_mode.GetAllocator())
468 for (
auto it = init.begin(); it != init.end(); ++it)
478 return MakeObject<Enumerator>(std::move(
MakeSharedPtr(
this)));
494 virtual void Add(
const T&)
override
496 throw NotSupportedException(u
"Array as ICollection<T>::Add");
503 throw NotSupportedException(u
"Array as ICollection<T>::Clear");
510 m_pointer_mode.SetWeak(argument, m_data);
518 template <
typename Q = T>
519 auto ContainsImpl(
const Q* item)
const ->
decltype(std::declval<UnderlyingType>() == *item, void(0), bool())
521 return std::find_if(m_data.begin(), m_data.end(),
522 [&item](
const T& value) { return Details::AreEqual(value, *item); }) != m_data.end();
527 bool ContainsImpl(...)
const
529 throw NotImplementedException(ASPOSE_CURRENT_FUNCTION);
535 virtual bool Contains(
const T& item)
const override
537 return ContainsImpl(&item);
544 throw NotSupportedException(u
"Array as ICollection<T>::Remove");
563 this->CopyTo<T>(arr,
static_cast<int64_t
>(arrayIndex));
570 template <std::size_t ...InitArrayIndexes>
571 Array(
const std::array<UnderlyingType,
sizeof...(InitArrayIndexes)> &init, std::index_sequence<InitArrayIndexes...>*) :
572 m_data({ init[InitArrayIndexes]... }, m_pointer_mode.GetAllocator()) {}
579 template <
typename Q = T>
580 auto IndexOfImpl(
const Q* item)
const ->
decltype(std::declval<UnderlyingType>() == *item, void(0), int())
582 auto it = std::find_if(m_data.begin(), m_data.end(), [&item](
const T& value) { return Details::AreEqual(value, *item); });
584 return (it != m_data.end()) ?
static_cast<int>(it - m_data.begin()) : -1;
589 int IndexOfImpl(...)
const
591 throw NotImplementedException(ASPOSE_CURRENT_FUNCTION);
598 virtual int IndexOf(
const T& item)
const override
600 return IndexOfImpl(&item);
605 virtual void Insert(
int,
const T&)
override
607 throw NotSupportedException(u
"Array as IList<T>::Insert");
614 throw NotSupportedException(u
"Array as IList<T>::RemoveAt");
622 return operator[](
index);
628 virtual void idx_set(
int index, T value)
override
640 for (
size_t i = 0; i < m_data.size(); ++i)
641 m_data[i] = inits[i];
649 for (
size_t i = 0; i < m_data.size(); ++i)
658 using namespace Collections::Generic::Details;
659 if (IsOutOfBounds(
index, m_data)) {
662 return m_data[
static_cast<typename vector_t::size_type
>(
index)];
670 using namespace Collections::Generic::Details;
671 if (IsOutOfBounds(
index, m_data)) {
674 return m_data[
static_cast<typename vector_t::size_type
>(
index)];
682 System::ArrayPtr<T> clone = System::MakeObject< System::Array<T> >(
static_cast<int>(m_data.size()));
683 std::copy(m_data.begin(), m_data.end(), clone->data().
begin());
690 return System::MakeObject<Collections::ObjectModel::ReadOnlyCollection<T>>(array);
704 template<
typename Y,
typename Z>
707 throw NotImplementedException();
715 return static_cast<int>(GetLongLength(dimension));
723 return upper_bound(m_data, dimension) + 1;
731 ASPOSE_UNUSED(dimension);
740 return upper_bound(m_data, dimension);
749 template <
typename InputType,
typename OutputType>
754 throw System::ArgumentNullException(u
"arr");
757 if (converter.IsNull())
759 throw System::ArgumentNullException(u
"converter");
763 for (
int i = 0; i < input_array->get_Length(); i++)
765 newArray[i] = converter(input_array[i]);
776 template <
typename InputType,
typename OutputType>
788 if (!arr || match.IsNull())
790 throw System::ArgumentNullException(u
"arr or match");
793 for (
int i = 0; i < arr->get_Length(); i++)
807 if (!arr || match.IsNull())
809 throw System::ArgumentNullException(u
"arr or match");
812 for (
auto val: arr->
m_data)
824 if (!arr || match.IsNull())
826 throw System::ArgumentNullException(u
"arr or match");
831 for (
auto val : arr->
m_data)
833 result->data().push_back(val);
844 if (!arr || match.IsNull())
846 throw System::ArgumentNullException(u
"arr or match");
848 for (
auto val : arr->
m_data)
855 int32_t
get_Rank()
const {
throw System::NotImplementedException(ASPOSE_CURRENT_FUNCTION); };
862 const int64_t len64 = get_LongLength();
864 if (len64 > (std::numeric_limits<int32_t>::max)()) {
865 throw OverflowException();
867 return static_cast<int32_t
>(len64);
874 return GetSizeTLength();
881 return recursive_size(m_data);
886 int Count()
const {
return get_Length(); }
893 template<
typename DstType>
896 this->CopyTo(dstArray, 0, dstIndex, GetSizeTLength());
904 template<
typename DstType>
905 void CopyTo(
const System::Details::ArrayView<DstType> &dstArray, int64_t dstIndex)
const
907 this->CopyTo(dstArray, 0, dstIndex, GetSizeTLength());
918 template<
typename DstType>
921 using namespace Collections::Generic::Details;
924 throw ArgumentNullException(u
"dstArray");
926 if (srcIndex < 0 || dstIndex < 0 || count < 0) {
929 if (IsOutOfSize(srcIndex + count, m_data)
930 || IsOutOfSize(dstIndex + count, dstArray->data())) {
936 if (dstArray.
GetObjectOrNull() == (
Object*)(
this) && dstIndex > srcIndex && dstIndex < srcIndex + count)
939 m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex)
940 , m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
941 , dstArray->data().
begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, dstIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
947 m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex)
948 , m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
949 , dstArray->data().
begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, dstIndex)
962 template<
typename DstType>
963 void CopyTo(
const System::Details::ArrayView<DstType> &dstArray, int64_t srcIndex, int64_t dstIndex, int64_t count)
const
965 using namespace Collections::Generic::Details;
968 throw ArgumentNullException(u
"dstArray");
970 if (srcIndex < 0 || dstIndex < 0 || count < 0) {
973 if (IsOutOfSize(srcIndex + count, m_data)
974 || dstIndex + count > dstArray.get_Length()) {
978 if (dstArray.data() == this->data().data()
979 && dstIndex > srcIndex && dstIndex < srcIndex + count)
982 m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex)
983 , m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
984 , dstArray.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, dstIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
990 m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex)
991 , m_data.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, srcIndex) + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, count)
992 , dstArray.begin() + ASPOSECPP_CHECKED_CAST(std::ptrdiff_t, dstIndex)
1002 if (action.IsNull())
1003 throw ArgumentNullException(u
"action");
1005 for (
auto val : arr->
m_data)
1015 template<
typename ArrayType,
typename ValueType>
1018 return IndexOf(arr,
value, 0);
1028 template<
typename ArrayType,
typename ValueType>
1031 return IndexOf(arr,
value, startIndex, arr->get_Length() - startIndex);
1042 template<
typename ArrayType,
typename ValueType>
1045 using namespace Collections::Generic::Details;
1047 throw ArgumentNullException(u
"arr");
1049 if (startIndex < 0 || count < 0 || IsOutOfSize(startIndex + count, arr->data())) {
1053 auto begin = arr->data().
begin() + startIndex;
1054 auto end = begin + count;
1056 std::find_if(begin, end, [&
value](
const ArrayType& item) {
return Details::AreEqual(item,
value); });
1058 return (it != end) ?
static_cast<int>(it - arr->data().
begin()) : -1;
1069 template<
typename ArrayType,
typename ValueType>
1072 using namespace Collections::Generic::Details;
1074 throw ArgumentNullException(u
"arr");
1076 if (startIndex < 0 || count < 0
1077 || IsOutOfSize(startIndex, arr->data()) || IsOutOfSize(count, arr->data())
1078 || (startIndex - count + 1) < 0) {
1081 auto rbegin = arr->data().rbegin() + arr->data().size() - startIndex - 1;
1082 auto rend = rbegin + count;
1083 auto rit = std::find_if(rbegin, rend, [&
value](
const ArrayType& item) {
return Details::AreEqual(item,
value); });
1085 return (rit != rend) ? ASPOSECPP_CHECKED_CAST(
int, rit.base() - arr->data().
begin() - 1) : -1;
1095 template<
typename ArrayType,
typename ValueType>
1098 return LastIndexOf(items,
value, startIndex, (items->get_Length() == 0) ? 0 : startIndex + 1);
1107 template<
typename ArrayType,
typename ValueType>
1110 return LastIndexOf(items,
value, items->get_Length() - 1, items->get_Length());
1118 template<
typename Type>
1121 using namespace Collections::Generic::Details;
1123 throw ArgumentNullException(u
"arr");
1125 if (startIndex < 0 || count < 0 || IsOutOfSize(startIndex + count, arr->data())) {
1129 for (
auto i = 0; i < count; ++i)
1130 arr->data().at(startIndex + i) = Type();
1144 template <
typename SrcType,
typename DstType>
1149 throw ArgumentNullException(u
"srcArray");
1151 srcArray->CopyTo(dstArray, srcIndex, dstIndex, count);
1158 template<
typename SrcType,
typename DstType>
1163 throw ArgumentNullException(u
"srcArray");
1165 srcArray->CopyTo(dstArray, 0, 0, count);
1172 template<
typename SrcType,
typename DstType>
1173 static void Copy(System::Details::ArrayView<SrcType> srcArray,
1177 throw ArgumentNullException(u
"srcArray");
1179 srcArray.CopyTo(dstArray, 0, 0, count);
1186 template<
typename SrcType,
typename DstType>
1188 System::Details::ArrayView<DstType> dstArray, int64_t count)
1191 throw ArgumentNullException(u
"srcArray");
1193 srcArray->CopyTo(dstArray, 0, 0, count);
1200 template<
typename SrcType,
typename DstType>
1201 static void Copy(System::Details::ArrayView<SrcType> srcArray,
1202 System::Details::ArrayView<DstType> dstArray, int64_t count)
1205 throw ArgumentNullException(u
"srcArray");
1207 srcArray.CopyTo(dstArray, 0, 0, count);
1214 template<
typename SrcType, std::
size_t N,
typename DstType>
1215 static void Copy(System::Details::StackArray<SrcType, N> &srcArray,
1218 Copy(
static_cast<System::Details::ArrayView<SrcType>
>(srcArray), dstArray, count);
1225 template<
typename SrcType,
typename DstType, std::
size_t N>
1227 System::Details::StackArray<DstType, N> &dstArray, int64_t count)
1229 Copy(srcArray,
static_cast<System::Details::ArrayView<DstType>
>(dstArray), count);
1236 template<
typename SrcType, std::
size_t NS,
typename DstType, std::
size_t ND>
1237 static void Copy(System::Details::StackArray<SrcType, NS> &srcArray,
1238 System::Details::StackArray<DstType, ND> &dstArray, int64_t count)
1240 Copy(
static_cast<System::Details::ArrayView<SrcType>
>(srcArray),
1241 static_cast<System::Details::ArrayView<DstType>
>(dstArray), count);
1252 template<
typename SrcType,
typename DstType>
1257 throw ArgumentNullException(u
"srcArray");
1259 srcArray->CopyTo(dstArray, srcIndex, dstIndex, count);
1270 template<
typename SrcType,
typename DstType>
1271 static void Copy(System::Details::ArrayView<SrcType> srcArray, int64_t srcIndex,
1275 throw ArgumentNullException(u
"srcArray");
1277 srcArray.CopyTo(dstArray, srcIndex, dstIndex, count);
1288 template<
typename SrcType,
typename DstType>
1290 System::Details::ArrayView<DstType> dstArray, int64_t dstIndex, int64_t count)
1293 throw ArgumentNullException(u
"srcArray");
1295 srcArray->CopyTo(dstArray, srcIndex, dstIndex, count);
1306 template<
typename SrcType,
typename DstType>
1307 static void Copy(System::Details::ArrayView<SrcType> srcArray, int64_t srcIndex,
1308 System::Details::ArrayView<DstType> dstArray, int64_t dstIndex, int64_t count)
1311 throw ArgumentNullException(u
"srcArray");
1313 srcArray.CopyTo(dstArray, srcIndex, dstIndex, count);
1324 template<
typename SrcType, std::
size_t N,
typename DstType>
1325 static void Copy(System::Details::StackArray<SrcType, N> &srcArray, int64_t srcIndex,
1328 Copy(
static_cast<System::Details::ArrayView<SrcType>
>(srcArray), srcIndex, dstArray, dstIndex, count);
1339 template<
typename SrcType,
typename DstType, std::
size_t N>
1341 System::Details::StackArray<DstType, N> &dstArray, int64_t dstIndex, int64_t count)
1343 Copy(srcArray, srcIndex,
static_cast<System::Details::ArrayView<DstType>
>(dstArray), dstIndex, count);
1354 template<
typename SrcType, std::
size_t NS,
typename DstType, std::
size_t ND>
1355 static void Copy(System::Details::StackArray<SrcType, NS> &srcArray, int64_t srcIndex,
1356 System::Details::StackArray<DstType, ND> &dstArray, int64_t dstIndex, int64_t count)
1358 Copy(
static_cast<System::Details::ArrayView<SrcType>
>(srcArray), srcIndex,
1359 static_cast<System::Details::ArrayView<DstType>
>(dstArray), dstIndex, count);
1370 template<
typename SrcType,
typename DstType, std::
size_t ND>
1371 static void Copy(System::Details::ArrayView<SrcType> &srcArray, int64_t srcIndex,
1372 System::Details::StackArray<DstType, ND> &dstArray, int64_t dstIndex, int64_t count)
1374 Copy(srcArray, srcIndex,
1375 static_cast<System::Details::ArrayView<DstType>
>(dstArray), dstIndex, count);
1380 template<
typename Type>
1383 Sort(arr, 0, arr->get_Length());
1390 template<
typename Type>
1393 using namespace Collections::Generic::Details;
1395 throw ArgumentNullException(u
"arr");
1397 if (startIndex < 0 || count < 0 || IsOutOfSize(startIndex + count, arr->data())) {
1401 auto begin = arr->data().
begin() + startIndex;
1402 auto end = begin + count;
1404 std::sort(begin, end, Collections::Generic::Details::ComparerType<Type>());
1410 template<
typename Type>
1414 std::sort(arr->data().
begin(), arr->data().
end(), adapter);
1419 template<
typename Type,
typename Y>
1422 throw NotImplementedException();
1426 template<
typename Type>
1429 std::sort(arr->data().
begin(), arr->data().
end(), comparison);
1438 template<
typename TKey,
typename TValue>
1441 if (keys ==
nullptr)
1442 throw ArgumentNullException(u
"keys");
1444 Sort(keys, items, 0, keys->get_Length());
1455 template<
typename TKey,
typename TValue>
1458 if (keys ==
nullptr)
1459 throw ArgumentNullException(u
"keys");
1460 if (
index < 0 || length < 0)
1462 if (
index + length > keys->Count() || (items !=
nullptr &&
index + length > items->Count()))
1465 if (items ==
nullptr)
1467 typename std::vector<TKey>::iterator keys_begin = keys->data().
begin() +
index;
1468 typename std::vector<TKey>::iterator keys_end = keys_begin + length;
1470 std::sort(keys_begin, keys_end, Collections::Generic::Details::ComparerType<TKey>());
1475 std::multimap<TKey, TValue, Collections::Generic::Details::ComparerType<TKey>> map;
1477 map.insert(std::make_pair(keys[i], items[i]));
1479 auto map_iter = map.begin();
1480 for (
int i =
index; (i <
index + length) && (map_iter != map.end()); ++i, ++map_iter)
1482 keys[i] = map_iter->first;
1483 items[i] = map_iter->second;
1490 template<
typename Type>
1500 template<
typename Type>
1503 using namespace Collections::Generic::Details;
1505 throw ArgumentNullException(u
"arr");
1507 if (startIndex < 0 || count < 0 || IsOutOfSize(startIndex + count, arr->data())) {
1511 std::reverse(arr->
m_data.begin() + startIndex, arr->
m_data.begin() + startIndex + count);
1517 template<
typename Type>
1529 auto new_array = MakeObject<Array<T>>(new_size);
1530 std::copy(arr->data_ptr(), arr->data_ptr() + (std::ptrdiff_t)std::min(new_size, arr->get_Length()), new_array->data_ptr());
1536 arr->
m_data.resize((
typename vector_t::size_type)new_size);
1542 arr = MakeObject<Array<T>>(new_size);
1551 using namespace Collections::Generic::Details;
1552 if (IsOutOfBounds(
index, m_data)) {
1594 return m_data.begin();
1602 return m_data.begin();
1610 return m_data.cbegin();
1618 return m_data.end();
1626 return m_data.end();
1634 return m_data.cend();
1643 return m_data.rbegin();
1652 return m_data.rbegin();
1661 return m_data.crbegin();
1670 return m_data.rend();
1679 return m_data.rend();
1688 return m_data.crend();
1708 return *std::min_element(m_data.cbegin(), m_data.cend());
1715 return *std::max_element(m_data.cbegin(), m_data.cend());
1724 for (
int i = 0; i < arr->get_Length(); i++)
1735 return new System::Details::NativeIteratorWrapper<T, iterator>(begin(), end());
1740 return new System::Details::NativeIteratorWrapper<T, iterator>(end(), end());
1745 return new System::Details::NativeConstIteratorWrapper<T, const_iterator>(begin(), end());
1750 return new System::Details::NativeConstIteratorWrapper<T, const_iterator>(end(), end());
1759 template <
typename ErrType>
1760 static int upper_bound(ErrType arr,
int dim)
1764 throw System::IndexOutOfRangeException();
1772 template <
typename VType,
typename Alloc>
1773 static int upper_bound(
const std::vector<VType, Alloc> &arr,
int dim)
1776 return (
int)arr.size() - 1;
1781 return upper_bound(arr[0], dim - 1);
1789 template <
typename U,
typename Alloc>
1790 static size_t recursive_size(
const std::vector<U, Alloc>& v)
1802 template <
typename U,
typename Alloc1,
typename Alloc2>
1803 static size_t recursive_size(
const std::vector<std::vector<U, Alloc1>, Alloc2>& v)
1806 for (
const auto &i : v)
1807 rv += recursive_size(i);
1816#ifdef __DBG_FOR_EACH_MEMBER
1820 void DBG_for_each_member(DBG::for_each_member_visitor &visitor)
const override
1822 visitor.add_self(
this);
1823 DBG::for_each_of_Object(
this, m_data, visitor);
1826 const char* DBG_class_name()
const override {
return "Array<T>"; }
1831 template <
typename TTo>
1832 struct CastResult<
Array<TTo>>
1835 typedef ArrayPtr<TTo>
type;
1844 template <
typename T>
1845 inline Array<T>* CreateArray(Array<T>*)
1847 return new Array<T>(0);
Implements IEnumerator interface that enables enumeration of elements of an Array object....
Definition: array.h:332
virtual ~Enumerator()
Destructor.
Definition: array.h:347
Enumerator(const SharedPtr< Array< T > > &arr)
Constructs a new Enumerator object that represents the specified array.
Definition: array.h:344
virtual MakeConstRef_t< T > get_Current() const override
Returns a copy of the current element.
Definition: array.h:350
virtual bool MoveNext() override
Checks if the current element's index does not point to the last element in the array and advances it...
Definition: array.h:360
virtual void Reset() override
Resets the current element's index.
Definition: array.h:369
The dummy for System.Array class (abstract base class for all arrays) May be filled with functionalit...
Definition: array.h:204
static ArrayPtr< T > Empty()
Returns an empty array.
Definition: array.h:224
virtual void * raw_data_ptr()=0
Returns pointer to the first element of single-dimension array. For multi-dimensional arrays result u...
virtual int32_t get_Length() const =0
Returns 32-bit integer that represents the total number of all elements in all dimensions of the arra...
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:296
static System::ArrayPtr< T > FindAll(System::ArrayPtr< T > arr, System::Predicate< T > match)
Retrieves all the elements that match the conditions defined by the specified predicate.
Definition: array.h:822
static void Clear(const ArrayPtr< Type > &arr, int startIndex, int count)
Replaces count values starting at the startIndex index in the specified array with default values.
Definition: array.h:1119
static ArrayPtr< OutputType > ConvertAll(ArrayPtr< InputType > input_array, std::function< OutputType(InputType)> converter)
Constructs a new Array object and fills it with elements of the specified array converted to OutputTy...
Definition: array.h:777
const_reverse_iterator crbegin() const noexcept
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: array.h:1659
static int IndexOf(const ArrayPtr< ArrayType > &arr, const ValueType &value)
Determines the index of the first occurrence of specified item in the array.
Definition: array.h:1016
void SetValue(const T &value, int index)
Sets value of the element at specified index.
Definition: array.h:1549
SharedPtr< Collections::Generic::IEnumerator< T > > EnumeratorPtr
An alias for shared pointer type pointing to IEnumerator object containing elements of type T.
Definition: array.h:325
static void ConstrainedCopy(const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
Copies a range of elements from an System.Array starting at the specified source.
Definition: array.h:1145
vector_t::iterator iterator
Iterator type.
Definition: array.h:1581
static void Sort(const ArrayPtr< Type > &arr, const SharedPtr< System::Collections::Generic::IComparer< T > > &comparator)
Sorts elements in the specified array using specified comparer.
Definition: array.h:1411
reverse_iterator rbegin() noexcept
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: array.h:1641
UnderlyingType Min() const
Finds the smallest element in the array using operator<() to compare elements.
Definition: array.h:1706
Array(std::vector< Q > &&value)
Constructs an Array object and fills it with values moved from an std::vector object whose values' ty...
Definition: array.h:446
virtual bool Contains(const T &item) const override
Determines if the specified item is in the array.
Definition: array.h:535
vector_t::const_reverse_iterator const_reverse_iterator
Const reverse iterator type.
Definition: array.h:1587
const UnderlyingType * data_ptr() const
Returns a constant raw pointer to the beginning of the memory buffer where the array elements are sto...
Definition: array.h:1574
~Array() override
Destructor.
Definition: array.h:1814
virtual void Clear() override
Not supported because the array represented by the current object is read-only.
Definition: array.h:501
static void Copy(System::Details::ArrayView< SrcType > srcArray, int64_t srcIndex, System::Details::ArrayView< DstType > dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array view starting at the specified index to t...
Definition: array.h:1307
iterator begin() noexcept
Returns an iterator to the first element of the container. If the container is empty,...
Definition: array.h:1592
virtual int IndexOf(const T &item) const override
Determines the index of the first occurrence of the specified item in the array.
Definition: array.h:598
static void Sort(const ArrayPtr< Type > &arr, const SharedPtr< System::Collections::Generic::IComparer< Y > > &comparator)
NOT IMPLEMENTED.
Definition: array.h:1420
vector_t m_data
The storage for array's elements.
Definition: array.h:317
static T Find(System::ArrayPtr< T > arr, System::Predicate< T > match)
Searches for the first element in the specified array that satisfies the conditions of the specified ...
Definition: array.h:805
ArrayPtr< T > Init(const T inits[])
Fills the array represented by the current object with the values from the specified array.
Definition: array.h:638
static void Sort(const ArrayPtr< TKey > &keys, const ArrayPtr< TValue > &items, int index, int length)
Sorts two arrays one containing keys and the other - corresponding items, based on the values of arra...
Definition: array.h:1456
int GetLength(int dimension)
Returns the number of elements in the specified dimension.
Definition: array.h:713
virtual EnumeratorPtr GetEnumerator() override
Returns a pointer to Enumerator object that provides IEnumerator interface to elements of the array r...
Definition: array.h:476
Array(vector_t &&value)
Move constructor.
Definition: array.h:426
vector_t::pointer data_ptr()
Returns a raw pointer to the beginning of the memory buffer where the array elements are stored.
Definition: array.h:1565
static void Reverse(const ArrayPtr< Type > &arr)
Reverses elements in the specified array.
Definition: array.h:1491
static void Copy(System::Details::StackArray< SrcType, NS > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, ND > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array on stack starting at the specified index ...
Definition: array.h:1355
const vector_t & data() const
Returns a constant reference to the internal data structure used to store the array elements.
Definition: array.h:1562
static void Copy(System::Details::ArrayView< SrcType > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, ND > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array view starting at the specified index to t...
Definition: array.h:1371
Array(std::initializer_list< bool > init, int=0)
Constructs an Array object and fills it with values from the specified initializer list containing el...
Definition: array.h:466
static int IndexOf(const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex, int count)
Determines the index of the first occurrence of the specified item in a range of items of the array s...
Definition: array.h:1043
static void Copy(const ArrayPtr< SrcType > &srcArray, System::Details::ArrayView< DstType > dstArray, int64_t count)
Copies the specified number of elements from the source array to the destination array view.
Definition: array.h:1187
SharedPtr< Collections::Generic::IEnumerable< T > > EnumerablePtr
An alias for shared pointer type pointing to IEnumerable object containing elements of type T.
Definition: array.h:323
Array(const std::vector< Q > &value)
Constructs an Array object and fills it with values copied from an std::vector object whose values' t...
Definition: array.h:437
System::Details::CollectionHelpers::ContainerPointerMode< UnderlyingType > pointer_mode_t
Type to keep information on whether to treat array elements as shared or weak pointers,...
Definition: array.h:311
void * raw_data_ptr() override
Returns pointer to the first element of single-dimension array. For multi-dimensional arrays result u...
Definition: array.h:1578
void CopyTo(const ArrayPtr< DstType > &dstArray, int64_t srcIndex, int64_t dstIndex, int64_t count) const
Copies a specified number of elements from the current array starting at specified position to specif...
Definition: array.h:919
System::Details::VirtualizedIteratorBase< T > * virtualizeEndConstIterator() const override
Gets the implementation of end const iterator for the current container.
Definition: array.h:1748
ArrayPtr< T > Clone()
Clones the array.
Definition: array.h:680
virtual void Add(const T &) override
Not supported because the array represented by the current object is read-only.
Definition: array.h:494
vector_t & data()
Returns a reference to the internal data structure used to store the array elements.
Definition: array.h:1559
void CopyTo(const ArrayPtr< DstType > &dstArray, int64_t dstIndex) const
Copies all elements of the current array to the specified destination array. Elements are inserted in...
Definition: array.h:894
void CopyTo(const System::Details::ArrayView< DstType > &dstArray, int64_t dstIndex) const
Copies all elements of the current array to the specified destination array view. Elements are insert...
Definition: array.h:905
void CopyTo(const System::Details::ArrayView< DstType > &dstArray, int64_t srcIndex, int64_t dstIndex, int64_t count) const
Copies a specified number of elements from the current array starting at specified position to specif...
Definition: array.h:963
virtual bool Remove(const T &) override
Not supported because the array represented by the current object is read-only.
Definition: array.h:542
const_reverse_iterator rend() const noexcept
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: array.h:1677
Array(const vector_t &assgn)
Copy constructor.
Definition: array.h:430
iterator end() noexcept
Returns an iterator to the element following the last element of the container. This element acts as ...
Definition: array.h:1616
static int BinarySearch(System::ArrayPtr< T > arr, const T &item)
Performs binary search in the sorted array.
Definition: array.h:697
UnderlyingType Max() const
Finds the largest element in the array using operator<() to compare elements.
Definition: array.h:1713
int32_t get_Rank() const
NOT IMPLEMENTED.
Definition: array.h:855
const_iterator end() const noexcept
Returns an iterator to the element following the last element of the const-qualified container....
Definition: array.h:1624
static ArrayPtr< OutputType > ConvertAll(ArrayPtr< InputType > input_array, Converter< InputType, OutputType > converter)
Constructs a new Array object and fills it with elements of the specified array converted to OutputTy...
Definition: array.h:750
static int IndexOf(const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex)
Determines the index of the first occurrence of the specified item in the array starting from the spe...
Definition: array.h:1029
static bool Exists(ArrayPtr< T > arr, std::function< bool(T)> match)
Determines if the specified Array object contains an element that satisfies requirements of the speci...
Definition: array.h:1722
T ValueType
Alias for the type of the elements of the array.
Definition: array.h:305
static void Copy(System::Details::ArrayView< SrcType > srcArray, System::Details::ArrayView< DstType > dstArray, int64_t count)
Copies the specified number of elements from the source array view to the destination array view.
Definition: array.h:1201
static bool TrueForAll(System::ArrayPtr< T > arr, System::Predicate< T > match)
Determines whether all elements in the specified array satisfy the conditions defined by specified pr...
Definition: array.h:842
static int FindIndex(System::ArrayPtr< T > arr, System::Predicate< T > match)
Searches for the first element in the specified array that satisfies the conditions of the specified ...
Definition: array.h:786
static int LastIndexOf(const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex, int count)
Determines the index of the last occurrence of the specified item in a range of items of the array sp...
Definition: array.h:1070
static void Copy(const ArrayPtr< SrcType > &srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
Copies the specified number of elements from the source array to the destination array.
Definition: array.h:1159
vector_t::reverse_iterator reverse_iterator
Reverse iterator type.
Definition: array.h:1585
Array(int count, const T &init=T())
Filling constructor.
Definition: array.h:405
int64_t get_LongLength() const
Returns 64-bit integer that represents the total number of all elements in all dimensions of the arra...
Definition: array.h:872
static void Copy(System::Details::StackArray< SrcType, NS > &srcArray, System::Details::StackArray< DstType, ND > &dstArray, int64_t count)
Copies the specified number of elements from the source array on stack to the destination array on st...
Definition: array.h:1237
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginConstIterator() const override
Gets the implementation of begin const iterator for the current container.
Definition: array.h:1743
static void Sort(const ArrayPtr< Type > &arr, const System::Comparison< T > &comparison)
Sorts elements in the specified array using specified comparison.
Definition: array.h:1427
UnderlyingType const & operator[](int index) const
Returns an item at the specified index.
Definition: array.h:668
static SharedPtr< Collections::ObjectModel::ReadOnlyCollection< T > > AsReadOnly(const SharedPtr< Array< T > > &array)
Casts array to read only collection.
Definition: array.h:688
virtual void CopyTo(ArrayPtr< T > arr, int arrayIndex) override
Copies all elements of the current array to the specified destination array. Elements are inserted in...
Definition: array.h:561
virtual bool get_IsReadOnly() const override
Indicates whether the array is read-only.
Definition: array.h:552
static void Sort(const ArrayPtr< TKey > &keys, const ArrayPtr< TValue > &items)
Sorts two arrays one containing keys and the other - corresponding items, based on the values of arra...
Definition: array.h:1439
void Initialize()
Fills the array with the default constructed objects of type T.
Definition: array.h:647
Array(int count, const T inits[])
Filling constructor.
Definition: array.h:418
virtual T idx_get(int index) const override
Returns the item at the specified index.
Definition: array.h:620
int GetLowerBound(int dimension) const
Returns the lower bound of the specified dimension.
Definition: array.h:729
System::Details::VirtualizedIteratorBase< T > * virtualizeEndIterator() override
Gets the implementation of end iterator for the current container.
Definition: array.h:1738
static void ForEach(const ArrayPtr< T > &arr, System::Action< T > action)
Performs specified action on each element of the specified array.
Definition: array.h:1000
int64_t GetLongLength(int dimension)
Returns the number of elements in the specified dimension as 64-bit integer.
Definition: array.h:721
static void Copy(System::Details::StackArray< SrcType, N > &srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array on stack starting at the specified index ...
Definition: array.h:1325
static int BinarySearch(System::ArrayPtr< T > arr, const Y &item, const SharedPtr< Collections::Generic::IComparer< Z > > &comparer)
NOT IMPLEMENTED.
Definition: array.h:705
static int LastIndexOf(const ArrayPtr< ArrayType > &items, const ValueType &value, int startIndex)
Determines the index of the last occurrence of the specified item in the array starting from the spec...
Definition: array.h:1096
static void Copy(const ArrayPtr< SrcType > &srcArray, System::Details::StackArray< DstType, N > &dstArray, int64_t count)
Copies the specified number of elements from the source array to the destination array on stack.
Definition: array.h:1226
virtual int get_Count() const override
Returns the size of the array.
Definition: array.h:487
typename System::Details::SelectType< T >::type UnderlyingType
Alias for the type used to represent each element of the array.
Definition: array.h:307
static void Sort(const ArrayPtr< Type > &arr)
Sorts elements in the specified array using default comparer.
Definition: array.h:1381
virtual void RemoveAt(int) override
Not supported because array represented by the current object is read-only.
Definition: array.h:612
virtual void idx_set(int index, T value) override
Sets the specified value as the item of the array at the specified index.
Definition: array.h:628
const_iterator cbegin() const noexcept
Returns an iterator to the first const-qualified element of the container. If the container is empty,...
Definition: array.h:1608
static void Copy(System::Details::ArrayView< SrcType > srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
Copies the specified number of elements from the source array view to the destination array.
Definition: array.h:1173
Array(const std::array< UnderlyingType, InitArraySize > &init)
Constructs an Array object and fills it with values from the specified array containing elements of U...
Definition: array.h:460
size_t GetSizeTLength() const
Returns an std::size_t variable that represents the total number of all elements in all dimensions of...
Definition: array.h:879
int32_t get_Length() const override
Returns 32-bit integer that represents the total number of all elements in all dimensions of the arra...
Definition: array.h:859
static void Resize(ArrayPtr< Type > &arr, int new_size)
Changes the size of the specified array to the specified value or crates new array with specified siz...
Definition: array.h:1518
static void Copy(System::Details::StackArray< SrcType, N > &srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
Copies the specified number of elements from the source array on stack to the destination array.
Definition: array.h:1215
static void Copy(const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, System::Details::ArrayView< DstType > dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array starting at the specified index to the sp...
Definition: array.h:1289
const_iterator cend() const noexcept
Returns an iterator to the element following the last element of the container. This element acts as ...
Definition: array.h:1632
static int LastIndexOf(const ArrayPtr< ArrayType > &items, const ValueType &value)
Determines the index of the last occurrence of the specified item in the array.
Definition: array.h:1108
std::vector< UnderlyingType, typename pointer_mode_t::allocator_type > vector_t
An alias for the type used to store the array's elements.
Definition: array.h:313
int GetUpperBound(int dimension)
Returns the upper bound of the specified dimension.
Definition: array.h:738
void SetTemplateWeakPtr(uint32_t argument) override
Makes array treat stored pointers as weak (if applicable).
Definition: array.h:508
const_iterator begin() const noexcept
Returns an iterator to the first element of the const-qualified container. If the container is empty,...
Definition: array.h:1600
virtual void Insert(int, const T &) override
Not supported because array represented by the current object is read-only.
Definition: array.h:605
static void Copy(const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array starting at the specified index to the sp...
Definition: array.h:1253
static void Copy(System::Details::ArrayView< SrcType > srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array view starting at the specified index to t...
Definition: array.h:1271
const_reverse_iterator crend() const noexcept
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: array.h:1686
static void Sort(const ArrayPtr< Type > &arr, int startIndex, int count)
Sorts a range of elements in the specified array using default comparer.
Definition: array.h:1391
vector_t::const_iterator const_iterator
Const iterator type.
Definition: array.h:1583
pointer_mode_t m_pointer_mode
Information on whether to treat array elements as shared or weak pointers, if applicable.
Definition: array.h:315
Array(typename std::enable_if< std::is_arithmetic< T >::value &&std::is_arithmetic< ValueType >::value &&std::is_convertible< ValueType, T >::value, int >::type count, ValueType init)
Filling constructor.
Definition: array.h:412
reverse_iterator rend() noexcept
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: array.h:1668
const_reverse_iterator rbegin() const noexcept
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: array.h:1650
static void Reverse(const ArrayPtr< Type > &arr, int startIndex, int count)
Reverses a range of elements in the specified array.
Definition: array.h:1501
static void Copy(const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, N > &dstArray, int64_t dstIndex, int64_t count)
Copies a specified number of elements from the source array starting at the specified index to the sp...
Definition: array.h:1340
Array()
Constructs an empty array.
Definition: array.h:400
Array(std::initializer_list< UnderlyingType > init)
Constructs an Array object and fills it with values from the specified initializer list containing el...
Definition: array.h:454
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginIterator() override
Gets the implementation of begin iterator for the current container.
Definition: array.h:1733
int Count() const
Returns a number that represents the total number of all elements in all dimensions of the array.
Definition: array.h:886
UnderlyingType & operator[](int index)
Returns an item at the specified index.
Definition: array.h:656
Interface that compares two objects in greater-equal-less sense. Objects of this class should only be...
Definition: icomparer.h:21
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: ienumerator.h:63
Interface of indexed container of elements. Objects of this class should only be allocated using Syst...
Definition: ilist.h:20
Interface of read-only indexed container of elements. Objects of this class should only be allocated ...
Definition: iread_only_list.h:18
Represents a pointer to the method that compares two objects of the same type. This type should be al...
Definition: comparison.h:93
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
auto end() -> decltype(std::declval< Q >().end())
Accessor for end() method of an underling collection. Only compiles if SmartPtr_ is specialization ty...
Definition: smart_ptr.h:828
auto begin() -> decltype(std::declval< Q >().begin())
Accessor for begin() method of an underling collection. Only compiles if SmartPtr_ is specialization ...
Definition: smart_ptr.h:820
Object * GetObjectOrNull() const
Gets pointed object (if any) or nullptr. Same as get().
Definition: smart_ptr.h:773
int get_shared_count() const
Gets number of shared pointers existing to referenced object, including current one....
Definition: smart_ptr.h:793
Pointee_ * get_shared() const
Gets pointed object, but asserts that pointer is in shared mode.
Definition: smart_ptr.h:514
class System::SmartPtr::Data m_data
An instance of Data class.
int _net_binnary_search(const containterT< T, Allocator > &container, int index, int count, T value, const SharedPtr< System::Collections::Generic::IComparer< T > > &comparer)
Implements binary search in random access container.
Definition: algorithms.h:23
Definition: db_command.h:9
ArrayPtr< T > MakeArray(std::initializer_list< T > init)
A factory function that constructs a new Array object, fills it with the elements from the specified ...
Definition: array.h:145
MulticastDelegate< void(Args...)> Action
Delegate type that references methods that have no return value.
Definition: action.h:40
SmartPtr< X > MakeSharedPtr(X *p)
Converts raw pointer to smart pointer.
Definition: smart_ptr.h:1640
MulticastDelegate< TOutput(TInput)> Converter
Represents a pointer to the invokable entity that accepts a single argument of the TInput type and re...
Definition: converter.h:14
MulticastDelegate< bool(T)> Predicate
Represents a pointer to a predicate - an invokable entity that accepts a single argument and returns ...
Definition: predicate.h:41
typename MakeConstRef< T >::type MakeConstRef_t
Helper type for MakeConstRef modifier.
Definition: make_const_ref.h:20
System::ArrayPtr< uint8_t > ByteArrayPtr
An alias for a smart pointer object that points to an array of unsigned 8-bit integers.
Definition: array.h:114
System::ExceptionWrapper< Details_ArgumentException > ArgumentException
Definition: throw_helper.h:23
class ASPOSECPP_SHARED_CLASS Array
Definition: smart_ptr.h:22
System::ExceptionWrapper< Details_ArgumentOutOfRangeException > ArgumentOutOfRangeException
Definition: throw_helper.h:24
SmartPtr< TTo > type
An alias for a pointer to an instance of TTo.
Definition: object.h:376
Adapter to use IComparer within STL environment. Uses IComparer if set; otherwise,...
Definition: icomparer.h:45