xtd 0.2.0
Loading...
Searching...
No Matches
array_2.h
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 {
39 template<typename type_t, typename allocator_t>
40 class array<type_t, 2, allocator_t> : public xtd::basic_array<type_t, allocator_t> {
41 public:
43
46 using value_type = type_t;
72
74
81 array()= default;
84 array(const array& array) : basic_array<type_t, allocator_t>(array) {}
87 array(const array&& array) : basic_array<type_t, allocator_t>(std::move(array)) {}
90 array(const base_type& array) : basic_array<type_t, allocator_t>(array) {}
93 array(base_type&& array) : basic_array<type_t, allocator_t>(array) {}
101 array(size_type length1, size_type length2) : basic_array<type_t, allocator_t>(array<xtd::size> {length1, length2}) {}
104 array(std::initializer_list<std::initializer_list<type_t>> items) : basic_array<type_t, allocator_t>(items) {}
106
108 ~array() {}
110
112
114 xtd::size rank() const noexcept override {return 2;}
116 };
117}
typename xtd::basic_array< type_t, allocator_t >::const_reverse_iterator const_reverse_iterator
Represents the const reverse iterator of array value type.
Definition array_2.h:70
array(base_type &&array)
Move constructor with specified base type array.
Definition array_2.h:93
array(const base_type &array)
Copy constructor with specified base type array.
Definition array_2.h:90
typename xtd::basic_array< type_t, allocator_t >::reverse_iterator reverse_iterator
Represents the reverse iterator of array value type.
Definition array_2.h:68
typename xtd::basic_array< type_t, allocator_t >::size_type size_type
Represents the array size type (usually xtd::size).
Definition array_2.h:52
xtd::size rank() const noexcept override
Gets the rank (number of dimensions) of the array.
Definition array_2.h:114
array(size_type length1, size_type length2)
Initializes a new instance of the array class with lengths for each rank specified.
Definition array_2.h:101
typename xtd::basic_array< type_t, allocator_t >::iterator iterator
Represents the iterator of array value type.
Definition array_2.h:64
array(const array &&array)
Move constructor with specified array.
Definition array_2.h:87
typename xtd::basic_array< type_t, allocator_t >::const_reference const_reference
Represents the const reference of array value type.
Definition array_2.h:58
array(std::initializer_list< std::initializer_list< type_t > > items)
Constructs the container with the contents of the specified initializer list.
Definition array_2.h:104
typename xtd::basic_array< type_t, allocator_t >::allocator_type allocator_type
Represents the array allocator type.
Definition array_2.h:48
typename xtd::basic_array< type_t, allocator_t >::const_iterator const_iterator
Represents the const iterator of array value type.
Definition array_2.h:66
typename xtd::basic_array< type_t, allocator_t >::const_pointer const_pointer
Represents the const pointer of array value type.
Definition array_2.h:62
type_t value_type
Represents the array value type.
Definition array_2.h:46
typename xtd::basic_array< type_t, allocator_t >::base_type base_type
Represents the array base type.
Definition array_2.h:50
typename xtd::basic_array< type_t, allocator_t >::reference reference
Represents the reference of array value type.
Definition array_2.h:56
array()=default
Initializes a new instance of the Array class that is empty.
typename xtd::basic_array< type_t, allocator_t >::pointer pointer
Represents the pointer of array value type.
Definition array_2.h:60
array(const array &array)
Copy constructor with specified array.
Definition array_2.h:84
typename xtd::basic_array< type_t, allocator_t >::difference_type difference_type
Represents the array difference type (usually xtd::ptrdiff).
Definition array_2.h:54
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.h:58
Base object that represent array.
Definition basic_array.h:27
typename base_type::const_reverse_iterator const_reverse_iterator
Represents the const reverse iterator of array value type.
Definition basic_array.h:71
const value_type & const_reference
Represents the const reference of array value type.
Definition basic_array.h:59
typename xtd::collections::generic::ilist< type_t >::iterator iterator
Represents the iterator of array value type.
Definition basic_array.h:65
xtd::ptrdiff difference_type
Represents the array difference type (usually xtd::ptrdiff).
Definition basic_array.h:55
typename xtd::collections::generic::ilist< type_t >::const_iterator const_iterator
Represents the const iterator of array value type.
Definition basic_array.h:67
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.h:49
typename base_type::reverse_iterator reverse_iterator
Represents the reverse iterator of array value type.
Definition basic_array.h:69
const value_type * const_pointer
Represents the const pointer of array value type.
Definition basic_array.h:63
value_type * pointer
Represents the pointer of array value type.
Definition basic_array.h:61
value_type & reference
Represents the reference of array value type.
Definition basic_array.h:57
virtual const base_type & items() const noexcept
Returns the underlying base type items.
Definition basic_array.h:163
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.h:51
xtd::size size_type
Represents the array size type (usually xtd::size).
Definition basic_array.h:53
size_t size
Represents a size of any object in bytes.
Definition size.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10