5#if !defined(__XTD_ARRAY_INTERNAL__)
6#error "Do not include this file: Internal use only. Include <xtd/array> or <xtd/array.hpp> instead."
39 template<
class type_t,
class allocator_t>
122 template<xtd::size length>
145 explicit array(
const xtd::collections::generic::ilist<type_t>& list) : basic_array<type_t, allocator_t>(list) {}
149 template<
class input_iterator_t>
153 array(std::initializer_list<type_t>
items) : basic_array<type_t, allocator_t>(
items) {}
220 using
xtd::basic_array<type_t, allocator_t>::operator();
array(size_type length)
Initializes a new instance of the array class with lengths for each rank specified.
Definition array_1.hpp:100
array(input_iterator_t first, input_iterator_t last)
Constructs the container with the contents of the range [first, last).
Definition array_1.hpp:150
typename xtd::basic_array< type_t, allocator_t >::const_reference const_reference
Represents the const reference of array value type.
Definition array_1.hpp:58
typename xtd::basic_array< type_t, allocator_t >::const_pointer const_pointer
Represents the const pointer of array value type.
Definition array_1.hpp:62
array(base_type &&array)
Move constructor with specified base type array.
Definition array_1.hpp:93
array(const xtd::collections::generic::ienumerable< type_t > &enumerable)
Initializes a new instance of the array and copy array array specified.
Definition array_1.hpp:138
array(const xtd::collections::generic::ilist< type_t > &list)
Initializes a new instance of the array and copy array array specified.
Definition array_1.hpp:145
typename xtd::basic_array< type_t, allocator_t >::difference_type difference_type
Represents the array difference type (usually xtd::ptrdiff).
Definition array_1.hpp:54
array(size_type length, const value_type &value)
Initializes a new instance of the array class with lengths for each rank specified and default value.
Definition array_1.hpp:108
typename xtd::basic_array< type_t, allocator_t >::reverse_iterator reverse_iterator
Represents the reverse iterator of array value type.
Definition array_1.hpp:68
array()=default
Initializes a new instance of the Array class that is empty.
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
typename xtd::basic_array< type_t, allocator_t >::pointer pointer
Represents the pointer of array value type.
Definition array_1.hpp:60
typename xtd::basic_array< type_t, allocator_t >::const_iterator const_iterator
Represents the const iterator of array value type.
Definition array_1.hpp:66
typename xtd::basic_array< type_t, allocator_t >::iterator iterator
Represents the iterator of array value type.
Definition array_1.hpp:64
array(array &&array)
Move constructor with specified array.
Definition array_1.hpp:87
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_1.hpp:70
array(std::initializer_list< type_t > items)
Constructs the container with the contents of the specified initializer list.
Definition array_1.hpp:153
array(const array< xtd::size, 1 > &lengths, const value_type &value)
Initializes a new instance of the array class with lengths for each rank specified.
Definition array_1.hpp:115
array(const array &array)
Copy constructor with specified array.
Definition array_1.hpp:84
const value_type & get_value(size_type index) const
Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32...
Definition array_1.hpp:193
typename xtd::basic_array< type_t, allocator_t >::base_type base_type
Represents the array base type.
Definition array_1.hpp:50
value_type & operator[](size_type index) override
Sets a value to the element at the specified position in the one-dimensional Array....
Definition array_1.hpp:249
const value_type & operator[](size_type index) const override
Gets the element at the specified index.
Definition array_1.hpp:259
typename xtd::basic_array< type_t, allocator_t >::reference reference
Represents the reference of array value type.
Definition array_1.hpp:56
array(const base_type &array)
Copy constructor with specified base type array.
Definition array_1.hpp:90
xtd::size rank() const noexcept override
Gets the rank (number of dimensions) of the array.
Definition array_1.hpp:164
void copy_to(xtd::array< type_t > &array, size_type index) const override
Copies all the elements of the current one-dimensional array to the specified one-dimensional array s...
Definition array_1.hpp:185
void set_value(const value_type &value, size_type index)
Sets a value to the element at the specified position in the one-dimensional Array....
Definition array_1.hpp:201
array(const type_t(&array)[length])
Initializes a new instance of the array and copy array[] type_t.
Definition array_1.hpp:123
typename xtd::basic_array< type_t, allocator_t >::size_type size_type
Represents the array size type (usually xtd::size).
Definition array_1.hpp:52
typename xtd::basic_array< type_t, allocator_t >::allocator_type allocator_type
Represents the array allocator type.
Definition array_1.hpp:48
array(const type_t *array, size_type length)
Initializes a new instance of the array and copy array[] type_t with length specified.
Definition array_1.hpp:131
const value_type & operator()(size_type index) const
Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32...
Definition array_1.hpp:239
type_t value_type
Represents the array value type.
Definition array_1.hpp:46
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Base object that represent array.
Definition basic_array.hpp:27
const value_type & const_reference
Represents the const reference of array value type.
Definition basic_array.hpp:45
xtd::collections::generic::helpers::allocator< value_type > allocator_type
Represents the array allocator type.
Definition basic_array.hpp:35
void set_value(const type_t &value, const xtd::array< size_type > &indexes)
Definition basic_array.hpp:342
const value_type & get_value(const xtd::array< size_type > &indexes) const
typename xtd::collections::generic::ienumerable< type_t >::const_iterator const_iterator
Represents the const iterator of array value type.
Definition basic_array.hpp:53
xtd::ptrdiff difference_type
Represents the array difference type (usually xtd::ptrdiff).
Definition basic_array.hpp:41
void copy_to(xtd::array< type_t > &array) const
Copies the entire xtd::array <type_t> to a compatible one-dimensional array.
Definition basic_array.hpp:179
const value_type * const_pointer
Represents the const pointer of array value type.
Definition basic_array.hpp:49
typename xtd::collections::generic::helpers::raw_array< value_type >::reverse_iterator reverse_iterator
Represents the reverse iterator of array value type.
Definition basic_array.hpp:55
value_type * pointer
Represents the pointer of array value type.
Definition basic_array.hpp:47
value_type & reference
Represents the reference of array value type.
Definition basic_array.hpp:43
typename xtd::collections::generic::helpers::raw_array< value_type, allocator_type >::base_type base_type
Represents the array base type.
Definition basic_array.hpp:37
virtual size_type length() const noexcept
Definition basic_array.hpp:124
virtual const base_type & items() const noexcept
Definition basic_array.hpp:113
typename xtd::collections::generic::helpers::raw_array< value_type >::const_reverse_iterator const_reverse_iterator
Represents the const reverse iterator of array value type.
Definition basic_array.hpp:57
typename xtd::collections::generic::ienumerable< type_t >::iterator iterator
Represents the iterator of array value type.
Definition basic_array.hpp:51
const_reference operator[](size_type index) const override
Returns a reference to the element at specified location index.
Definition basic_array.hpp:424
type_t & operator()(const xtd::array< size_type > &indexes)
xtd::size size_type
Represents the array size type (usually xtd::size).
Definition basic_array.hpp:39
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:40
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
read_only_span< type_t, count > first() const
Obtains a subspan consisting of the first count elements of the sequence.
Definition read_only_span.hpp:282
read_only_span< type_t, count > last() const
Obtains a subspan consisting of the last N elements of the sequence.
Definition read_only_span.hpp:307