xtd 0.2.0
basic_array.hpp
Go to the documentation of this file.
1
4
5#if !defined(__XTD_ARRAY_INTERNAL__)
6#error "Do not include this file: Internal use only. Include <xtd/array> or <xtd/array.h> instead."
7#endif
8
10namespace xtd {
12
24 template<class type_t>
25 using type_to_array_t = typename std::conditional<std::is_same<bool, type_t>::value, char, type_t>::type;
27
43 template<class type_t, class allocator_t = xtd::collections::generic::helpers::allocator<type_to_array_t<type_t>>>
44 class basic_array : public xtd::array_abstract_object, public xtd::collections::generic::ilist<type_t>, public xtd::iequatable<basic_array<type_t, allocator_t>> {
45 class comparer {
46 public:
47 comparer(const xtd::collections::generic::icomparer<type_t>* comparer) : comparer_(comparer) { }
48 comparer(const comparer&) = default;
49 comparer(comparer&&) = default;
50 comparer& operator=(const comparer& comparer) = default;
51 comparer& operator=(comparer&&) = default;
52
53 bool operator()(const type_t& e1, const type_t& e2) const noexcept {return comparer_ && comparer_->compare(e1, e2) < 0;}
54
55 private:
57 };
58
59 public:
61
64 using value_type = type_t;
68 using base_type = std::vector<typename std::conditional<std::is_same<bool, value_type>::value, xtd::byte, value_type>::type, allocator_type>;
80 using const_pointer = const value_type*;
86 using reverse_iterator = typename base_type::reverse_iterator;
88 using const_reverse_iterator = typename base_type::const_reverse_iterator;
90
92
97
99 basic_array(const basic_array& array) { if (array.data_) *data_ = *array.data_;}
100 basic_array(basic_array&& array) = default;
102
104
109 virtual reference back() {return at(size() - 1);}
113 virtual const_reference back() const {return at(size() - 1);}
114
121
125
129
134 size_type count() const noexcept override {return size();}
135
139 virtual const_reverse_iterator crbegin() const noexcept {return data_->items.crbegin();}
140
144 virtual const_reverse_iterator crend() const noexcept {return data_->items.crend();}
145
149 virtual pointer data() noexcept {return (pointer)data_->items.data();}
153 virtual const_pointer data() const noexcept {return (pointer)data_->items.data();}
154
157 virtual bool empty() const noexcept {return data_->items.empty();}
158
165
169 virtual reference front() {return at(0);}
173 virtual const_reference front() const {return at(0);}
174
175 bool is_fixed_size() const noexcept override {return true;}
176 bool is_read_only() const noexcept override {return false;}
177 bool is_synchronized() const noexcept override {return false;}
178
181 virtual const base_type& items() const noexcept {return data_->items;}
184 virtual base_type& items() noexcept {return data_->items;}
185
192 virtual size_type length() const noexcept {return size();}
196 virtual xtd::int64 long_length() {return static_cast<xtd::int64>(size());}
197
200 virtual size_type max_size() const noexcept {return data_->items.max_size();}
201
207 virtual size_type rank() const noexcept {return 1;}
208
212 virtual reverse_iterator rbegin() noexcept {return data_->items.rbegin();}
216 virtual const_reverse_iterator rbegin() const noexcept {return data_->items.rbegin();}
217
221 virtual reverse_iterator rend() noexcept {return data_->items.rend();}
225 virtual const_reverse_iterator rend() const noexcept {return data_->items.rend();}
226
229 virtual size_type size() const noexcept {return data_->items.size();}
230
231 const xtd::object& sync_root() const noexcept override {return data_->sync_root;}
233
235
241 virtual reference at(size_type index) {
243 return (reference)data_->items.at(index);
244 }
249 virtual const_reference at(size_type index) const {
251 return (reference)data_->items.at(index);
252 }
253
256 constexpr bool contains(const type_t& value) const noexcept override {
257 for (const auto& item : data_->items)
258 if (xtd::collections::generic::helpers::equator<type_t> {}(reinterpret_cast<const type_t&>(item), value)) return true;
259 return false;
260 }
261
262 void copy_to(xtd::array<type_t>& array, size_type index) const override {
264 //if (array.rank() != 1) xtd::helpers::throw_helper::throws(xtd::helpers::exception_case::argument);
267 for (auto increment = size_type {0}; increment < length(); ++increment)
268 array[index + increment] = at(increment);
269 }
270
276 void copy_to(xtd::array<type_t>& array, xtd::int64 index) const {copy_to(array, static_cast<xtd::size>(index));}
277
278 bool equals(const object& obj) const noexcept override {return dynamic_cast<const basic_array<value_type>*>(&obj) && equals(static_cast<const basic_array<value_type>&>(obj));}
279 bool equals(const basic_array& rhs) const noexcept override {
280 if (count() != rhs.count()) return false;
281 for (size_type i = 0; i < count(); i++)
282 if (!xtd::collections::generic::helpers::equator<type_t> {}(data_->items.at(i), rhs.data_->items.at(i))) return false;
283 return data_->version == rhs.data_->version && data_->lower_bound == rhs.data_->lower_bound && data_->upper_bound == rhs.data_->upper_bound;
284 }
285
288 virtual void fill(const value_type& value) noexcept {std::fill(begin(), end(), value);}
289
291 struct basic_array_enumerator : public xtd::collections::generic::ienumerator<value_type> {
292 public:
293 explicit basic_array_enumerator(const basic_array& items, size_type version) : items_(items), version_(version) {}
294
295 const value_type& current() const override {
296 if (version_ != items_.data_->version) xtd::helpers::throw_helper::throws(xtd::helpers::exception_case::invalid_operation, "Collection was modified; enumeration operation may not execute.");
297 if (index_ < items_.count()) return items_[index_];
298 static thread_local auto default_value = value_type {};
299 return default_value;
300 }
301
302 bool move_next() override {
303 if (version_ != items_.data_->version) xtd::helpers::throw_helper::throws(xtd::helpers::exception_case::invalid_operation, "Collection was modified; enumeration operation may not execute.");
304 return ++index_ < items_.count();
305 }
306
307 void reset() override {
308 version_ = items_.data_->version;
309 index_ = basic_array::npos;
310 }
311
312 protected:
313 const basic_array& items_;
314 size_type index_ = basic_array::npos;
315 size_type version_ = 0;
316 };
317 return {new_ptr<basic_array_enumerator>(*this, data_->version)};
318 }
319
327 constexpr size_type get_length(size_type dimension) const {return get_upper_bound(dimension) + 1;}
328
336 constexpr xtd::int64 get_long_length(size_type dimension) const {return static_cast<xtd::int64>(get_upper_bound(dimension) + 1);}
337
345 constexpr size_type get_lower_bound(size_type dimension) const {
347 return data_->lower_bound[dimension];
348 }
349
357 constexpr size_type get_upper_bound(size_type dimension) const {
359 return data_->upper_bound[dimension];
360 }
361
366 const value_type& get_value(const xtd::array<size_type>& indexes) const;
367
371 size_type index_of(const type_t& value) const noexcept override {return index_of(*this, value, 0, count());}
372
378 void resize(size_type new_size) {resize(new_size, value_type {});}
379
386 void resize(size_type new_size, value_type value) {
387 if (new_size == length()) return;
389 ++data_->version;
390 data_->items.resize(new_size, value);
391 data_->upper_bound[0] = new_size - 1;
392 }
393
398 void set_value(const type_t& value, const xtd::array<size_type>& indexes) {operator()(indexes) = value;}
399
402 virtual void swap(basic_array& other) noexcept {
403 ++data_->version;
404 data_->items.swap(other.data_->items);
405 }
406
407 xtd::string to_string() const noexcept override;
409
411
420 static size_type index_of(const basic_array& array, const value_type& value) noexcept {return index_of(array, value, 0, array.length());}
421
431 static size_type index_of(const basic_array& array, const value_type& value, size_type index) {return index_of(array, value, index, array.length() - index);}
432
443 static size_type index_of(const basic_array& array, const value_type& value, size_type index, size_type count) {
445
446 if (array.size() == 0) return npos;
447 for (auto increment = size_type {0}; increment < count; ++increment) {
448 if (xtd::collections::generic::helpers::equator<type_t> {}(array[index + increment], value))
449 return index + increment;
450 }
451 return npos;
452 }
453
457 static void reverse(basic_array& array) noexcept {reverse(array, 0, array.count());}
466 if (count == 0) return;
467 ++array.data_->version;
468 std::reverse(array.data_->items.begin() + index, array.data_->items.begin() + index + count);
469 }
471
473
479 *data_ = *other.data_;
480 return *this;
481 }
485 basic_array& operator =(basic_array&& other) noexcept = default;
489 basic_array& operator =(std::initializer_list<type_t>& items) {
490 data_->version = 0;
491 data_->items = items;
492 data_->upper_bound[0] = data_->items.size() - 1;
493 return *this;
494 }
495
500 const_reference operator [](size_type index) const override {return at(index);}
505 reference operator [](size_type index) override {return at(index);}
506
509 operator const base_type&() const noexcept {return data_->items;}
512 operator base_type&() noexcept {return data_->items;}
513
521 type_t& operator()(const xtd::array<size_type>& indexes);
522
530 const type_t& operator()(const xtd::array<size_type>& indexes) const;
532
533 private:
534 template<class type_array_t, size_type rank_array_t, class allocator_array_t>
535 friend class array;
536
537 basic_array() = default;
538 basic_array(const array<size_type, 1>& lengths);
539
542 data_->items = base_type {array, array + length};
543 data_->upper_bound[0] = data_->items.size() - 1;
544 }
545
546 basic_array(const xtd::collections::generic::ienumerable<type_t>& enumerable) {
547 for (const auto& value : enumerable)
548 data_->items.push_back(value);
549 data_->lower_bound.push_back(0);
550 data_->upper_bound[0] = data_->items.size() - 1;
551 }
552
553 basic_array(const std::vector<type_t>& array) {
554 data_->items = array;
555 data_->upper_bound[0] = data_->items.size() - 1;
556 }
557
558 basic_array(std::vector<type_t>&& array) {
559 data_->items = std::move(array);
560 data_->upper_bound[0] = data_->items.size() - 1;
561 }
562
563 basic_array(std::initializer_list<type_t> il) {
564 data_->items.assign(il.begin(), il.end());
565 data_->upper_bound[0] = data_->items.size() - 1;
566 }
567
568 basic_array(std::initializer_list<std::initializer_list<type_t>> il) {
569 for (const std::initializer_list<type_t>& il1 : il)
570 data_->items.insert(data_->items.end(), il1.begin(), il1.end());
571 data_->upper_bound[0] = il.size() - 1;
572 data_->lower_bound.push_back(0);
573 data_->upper_bound.push_back((*il.begin()).size() - 1);
574 }
575
576 basic_array(std::initializer_list<std::initializer_list<std::initializer_list<type_t>>> il) {
577 for (const std::initializer_list<std::initializer_list<type_t>>& il1 : il)
578 for (const std::initializer_list<type_t>& il2 : il1)
579 data_->items.insert(data_->items.end(), il2.begin(), il2.end());
580 data_->upper_bound[0] = il.size() - 1;
581 data_->lower_bound.push_back(0);
582 data_->upper_bound.push_back((*il.begin()).size() - 1);
583 data_->lower_bound.push_back(0);
584 data_->upper_bound.push_back((*(*il.begin()).begin()).size() - 1);
585 }
586
587 template<class input_iterator_t>
588 basic_array(input_iterator_t first, input_iterator_t last) {
589 data_->items.assign(first, last);
590 data_->lower_bound.push_back(0);
591 data_->upper_bound.push_back(data_->items.size() - 1);
592 }
593
594 void add(const type_t& item) override {}
595 void clear() override {}
596 void insert(size_type index, const type_t& value) override {}
597 bool remove(const type_t& item) override {return false;}
598 void remove_at(size_type index) override {}
599
600 typename base_type::iterator to_base_type_iterator(iterator value) noexcept {
601 if (value == begin()) return data_->items.begin();
602 if (value == end()) return data_->items.end();
603 return data_->items.begin() + (value - begin());
604 }
605
606 iterator to_iterator(typename base_type::iterator value) noexcept {
607 if (value == data_->items.begin()) return begin();
608 if (value == data_->items.end()) return end();
609 return begin() + (value - data_->items.begin());
610 }
611
612 struct array_data {
613 size_type version = 0;
614 base_type items;
615 std::vector<size_type> lower_bound {0};
616 std::vector<size_type> upper_bound {std::numeric_limits<size_type>::max()};
617 object sync_root;
618 };
619
620 xtd::ptr<array_data> data_ = xtd::new_ptr<array_data>();
621 };
622}
Abstract object that represent array.
Definition array_abstract_object.hpp:25
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Base object that represent array.
Definition basic_array.hpp:44
typename base_type::const_reverse_iterator const_reverse_iterator
Represents the const reverse iterator of array value type.
Definition basic_array.hpp:88
const value_type & const_reference
Represents the const reference of array value type.
Definition basic_array.hpp:76
constexpr xtd::int64 get_long_length(size_type dimension) const
Gets a 64-bit integer that represents the total number of elements in all the dimensions of the array...
Definition basic_array.hpp:336
virtual const_reverse_iterator rbegin() const noexcept
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last el...
Definition basic_array.hpp:216
virtual bool empty() const noexcept
Checks if the container has no elements, i.e. whether xtd::array::begin() == xtd::array::end().
Definition basic_array.hpp:157
virtual size_type rank() const noexcept
Gets the rank (number of dimensions) of the array.
Definition basic_array.hpp:207
virtual const_pointer data() const noexcept
Returns pointer to the underlying array serving as element storage.
Definition basic_array.hpp:153
void set_value(const type_t &value, const xtd::array< size_type > &indexes)
Sets a value to the element at the specified position in the multidimensional array.
Definition basic_array.hpp:398
const value_type & get_value(const xtd::array< size_type > &indexes) const
Gets the value at the specified position in the multidimensional array. The indexes are specified as ...
const_iterator cend() const noexcept override
Returns an iterator to the element following the last element of the enumarable.
Definition basic_array.hpp:128
typename xtd::collections::generic::ienumerable< type_t >::const_iterator const_iterator
Represents the const iterator of array value type.
Definition basic_array.hpp:84
xtd::ptrdiff difference_type
Represents the array difference type (usually xtd::ptrdiff).
Definition basic_array.hpp:72
virtual reference front()
Returns a reference to the first element in the container.
Definition basic_array.hpp:169
size_type count() const noexcept override
Gets the number of elements contained in the xtd::array <type_t>.
Definition basic_array.hpp:134
virtual const_reverse_iterator rend() const noexcept
Returns a reverse iterator to the element following the last element of the reversed vector....
Definition basic_array.hpp:225
virtual reference at(size_type index)
Returns a reference to the element at specified location pos, with bounds checking.
Definition basic_array.hpp:241
void resize(size_type new_size)
Resizes the container to contain count elements, does nothing if count == size(). @param new_size The...
Definition basic_array.hpp:378
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
Definition basic_array.hpp:278
xtd::collections::generic::helpers::allocator< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type > allocator_type
Represents the array allocator type.
Definition basic_array.hpp:66
constexpr size_type get_length(size_type dimension) const
Gets the total number of elements in all the dimensions of the array.
Definition basic_array.hpp:327
virtual xtd::int64 long_length()
Gets a 64-bit integer that represents the total number of elements in all the dimensions of the array...
Definition basic_array.hpp:196
typename base_type::reverse_iterator reverse_iterator
Represents the reverse iterator of array value type.
Definition basic_array.hpp:86
const value_type * const_pointer
Represents the const pointer of array value type.
Definition basic_array.hpp:80
virtual const_reference back() const
Returns a reference to the last element in the container.
Definition basic_array.hpp:113
static constexpr size_type npos
This is a special value equal to the maximum value representable by the type xtd::size.
Definition basic_array.hpp:95
static size_type index_of(const basic_array &array, const value_type &value) noexcept
Determines the index of a specific item in the array specified.
Definition basic_array.hpp:420
value_type * pointer
Represents the pointer of array value type.
Definition basic_array.hpp:78
virtual pointer data() noexcept
Returns pointer to the underlying array serving as element storage.
Definition basic_array.hpp:149
bool is_synchronized() const noexcept override
Gets a value indicating whether access to the xtd::collections::generic::icollection <type_t> is sync...
Definition basic_array.hpp:177
value_type & reference
Represents the reference of array value type.
Definition basic_array.hpp:74
size_type index_of(const type_t &value) const noexcept override
Determines the index of a specific item in the xtd::array <type_t>.
Definition basic_array.hpp:371
constexpr bool contains(const type_t &value) const noexcept override
Determines whether an element is in the array.
Definition basic_array.hpp:256
xtd::collections::generic::enumerator< value_type > get_enumerator() const noexcept override
Returns an enumerator that iterates through a collection.
Definition basic_array.hpp:290
void copy_to(xtd::array< type_t > &array, size_type index) const override
Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array,...
Definition basic_array.hpp:262
const_iterator end() const noexcept override
Returns an iterator to the element following the last element of the enumarable.
Definition basic_array.hpp:161
constexpr size_type get_lower_bound(size_type dimension) const
Gets the lower bound of the specified dimension in the array.
Definition basic_array.hpp:345
virtual size_type max_size() const noexcept
Returns the maximum number of elements the container is able to hold due to system or library impleme...
Definition basic_array.hpp:200
void resize(size_type new_size, value_type value)
Resizes the container to contain count elements, does nothing if count == size(). @param new_size The...
Definition basic_array.hpp:386
iterator begin() noexcept override
Returns an iterator to the first element of the enumarable.
Definition basic_array.hpp:120
const_iterator begin() const noexcept override
Returns an iterator to the first element of the enumarable.
Definition basic_array.hpp:117
void copy_to(xtd::array< type_t > &array, xtd::int64 index) const
Copies all the elements of the current one-dimensional array to the specified one-dimensional array s...
Definition basic_array.hpp:276
type_t value_type
Represents the array value type.
Definition basic_array.hpp:64
virtual void fill(const value_type &value) noexcept
Assigns the value to all elements in the container.
Definition basic_array.hpp:288
basic_array & operator=(const basic_array &other)
Copy assignment operator. Replaces the contents with a copy of the contents of other.
Definition basic_array.hpp:478
virtual reverse_iterator rbegin() noexcept
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last el...
Definition basic_array.hpp:212
iterator end() noexcept override
Returns an iterator to the element following the last element of the enumarable.
Definition basic_array.hpp:164
virtual const_reference at(size_type index) const
Returns a reference to the element at specified location pos, with bounds checking.
Definition basic_array.hpp:249
virtual size_type length() const noexcept
Gets a size that represents the total number of elements in all the dimensions of the array.
Definition basic_array.hpp:192
const type_t & operator()(const xtd::array< size_type > &indexes) const
Gets the value at the specified position in the multidimensional array. The indexes are specified as ...
virtual reverse_iterator rend() noexcept
Returns a reverse iterator to the element following the last element of the reversed vector....
Definition basic_array.hpp:221
virtual const base_type & items() const noexcept
Returns the underlying base type items.
Definition basic_array.hpp:181
constexpr size_type get_upper_bound(size_type dimension) const
Gets the upper bound of the specified dimension in the array.
Definition basic_array.hpp:357
virtual const_reverse_iterator crend() const noexcept
Returns a reverse iterator to the element following the last element of the reversed vector....
Definition basic_array.hpp:144
virtual void swap(basic_array &other) noexcept
Exchanges the contents and capacity of the container with those of other. Does not invoke any move,...
Definition basic_array.hpp:402
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
typename xtd::collections::generic::ienumerable< type_t >::iterator iterator
Represents the iterator of array value type.
Definition basic_array.hpp:82
const_reference operator[](size_type index) const override
Returns a reference to the element at specified location index.
Definition basic_array.hpp:500
virtual const_reference front() const
Returns a reference to the first element in the container.
Definition basic_array.hpp:173
bool is_fixed_size() const noexcept override
Gets a value indicating whether the xtd::collections::generic::ilist <type_t> has a fixed size.
Definition basic_array.hpp:175
static void reverse(basic_array &array) noexcept
Reverses the order of the elements in the entire xtd::basic_array.
Definition basic_array.hpp:457
std::vector< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type, allocator_type > base_type
Represents the array base type.
Definition basic_array.hpp:68
static size_type index_of(const basic_array &array, const value_type &value, size_type index, size_type count)
Determines the index of a specific item in the array specified.
Definition basic_array.hpp:443
static size_type index_of(const basic_array &array, const value_type &value, size_type index)
Determines the index of a specific item in the array specified.
Definition basic_array.hpp:431
virtual reference back()
Returns a reference to the last element in the container.
Definition basic_array.hpp:109
bool is_read_only() const noexcept override
Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only.
Definition basic_array.hpp:176
const_iterator cbegin() const noexcept override
Returns an iterator to the first element of the enumarable.
Definition basic_array.hpp:124
virtual base_type & items() noexcept
Returns the underlying base type items.
Definition basic_array.hpp:184
const xtd::object & sync_root() const noexcept override
Gets an object that can be used to synchronize access to the the xtd::collections::generic::icollecti...
Definition basic_array.hpp:231
type_t & operator()(const xtd::array< size_type > &indexes)
Gets the value at the specified position in the multidimensional array. The indexes are specified as ...
virtual size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(xtd::array::begin(),...
Definition basic_array.hpp:229
static void reverse(basic_array &array, size_type index, size_type count)
Reverses the order of the elements in the specified range.
Definition basic_array.hpp:464
virtual const_reverse_iterator crbegin() const noexcept
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last el...
Definition basic_array.hpp:139
xtd::size size_type
Represents the array size type (usually xtd::size).
Definition basic_array.hpp:70
Represents text as a sequence of character units.
Definition basic_string.hpp:71
virtual const_iterator end() const
Returns an iterator to the element following the last element of the enumarable.
Definition enumerable_iterators.hpp:170
virtual const_iterator begin() const
Returns an iterator to the first element of the enumarable.
Definition enumerable_iterators.hpp:155
virtual const_iterator cbegin() const
Returns an iterator to the first element of the enumarable.
Definition enumerable_iterators.hpp:162
virtual const_iterator cend() const
Returns an iterator to the element following the last element of the enumarable.
Definition enumerable_iterators.hpp:166
Provides a set of static methods for querying objects that implement ienumerable <type_t>.
Definition enumerable.hpp:32
Exposes a method that compares two objects.
Definition icomparer.hpp:30
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:36
typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition ienumerable.hpp:44
typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition ienumerable.hpp:46
Supports a simple iteration over a generic collection.
Definition ienumerator.hpp:58
Represents a collection of objects that can be individually accessed by index.
Definition ilist.hpp:41
static void throws(xtd::helpers::exception_case exception_case, const source_location &location=source_location::current())
Throws an exption with specified exception case.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.hpp:114
std::allocator< type_t > allocator
Represent an allocator alias.
Definition allocator.hpp:38
@ index_out_of_range
The index is out of range.
@ rank
The rank is not valid.
@ argument_null
The argument is null.
@ argument_out_of_range
The argument is out of range.
@ invalid_operation
The operation is not valid.
typename std::conditional< std::is_same< bool, type_t >::value, char, type_t >::type type_to_array_t
Represents the type to array type.
Definition basic_array.hpp:25
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
null_ptr null
Represents a null pointer value.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
std::ptrdiff_t ptrdiff
Represent the signed integer type of the result of subtracting two pointers.
Definition ptrdiff.hpp:23
std::type_info type
Stores information about a type.
Definition type.hpp:23
@ other
The operating system is other.
@ add
The Add key.
@ i
The I key.
@ insert
The INS (INSERT) key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Supports a simple iteration over a generic collection.
Definition enumerator.hpp:38
Implements a function object for performing comparisons. Unless specialised, invokes operator== on ty...
Definition equator.hpp:38