xtd 0.2.0
Loading...
Searching...
No Matches
array.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
8#undef __XTD_CORE_INTERNAL__
12#include "abstract.hpp"
13#include "core_export.hpp"
14#include "int64.hpp"
15#include "iequatable.hpp"
16#include "new_ptr.hpp"
17#include "object.hpp"
18#include "static.hpp"
19#include <algorithm>
20#include <vector>
21
22#define __XTD_ARRAY_INTERNAL__
24#include "basic_array.hpp"
25#undef __XTD_ARRAY_INTERNAL__
26
28namespace xtd {
57 template<typename type_t, xtd::size rank_, typename allocator_t>
58 class array : public basic_array<type_t, allocator_t> {
59 public:
61
68 array() = default;
69
76 array(const array<xtd::size, 1>& lengths) : xtd::basic_array<type_t, allocator_t>(lengths) {}
78
80 array(const array& array) : xtd::basic_array<type_t, allocator_t>(array) {}
81 array(array&& array) = default;
83
85
87 xtd::size rank() const noexcept override {return rank_;}
89
91
93 array& operator=(const array&) = default;
94 array& operator=(array&&) = default;
96
97 private:
98 friend class array<>;
99 array(const array<xtd::size>& lengths, bool) : basic_array<type_t, allocator_t>(lengths) {}
100 };
101}
102
103#define __XTD_ARRAY_INTERNAL__
104#include "array_1.hpp"
105#include "array_2.hpp"
106#include "array_3.hpp"
107#include "array_static.hpp"
108#include "array_.hpp"
109#undef __XTD_ARRAY_INTERNAL__
Contains array definitions.
Contains array definitions.
Contains xtd::abstract_object class.
Contains xtd::array <type_t, 1> class.
Contains xtd::array <type_t, 2> class.
Contains xtd::array <type_t, 3> class.
Contains xtd::array class.
Contains xtd::array_abstract_object class.
Contains xtd::array <> class.
Contains xtd::basic_array class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:58
array(const array< xtd::size, 1 > &lengths)
Initializes a new instance of the array class with lengths for each rank specified.
Definition array.hpp:76
xtd::size rank() const noexcept override
Gets the rank (number of dimensions) of the array.
Definition array.hpp:87
array()=default
Initializes a new instance of the array class that is empty.
Base object that represent array.
Definition basic_array.hpp:27
Contains core_export_ keyword.
Contains xtd::collections::generic::enumerator <type_t> interface.
Contains xtd::collections::generic::ilist <type_t> interface.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
Contains xtd::collections::generic::icomparer <type_t> interface.
Contains xtd::iequatable interface.
Contains xtd::int64 type.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::new_ptr method.
Contains xtd::object class.
Contains xtd::static_object class.