xtd 0.2.0
Loading...
Searching...
No Matches
array.h
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
8#undef __XTD_CORE_INTERNAL__
12#include "abstract.h"
13#include "core_export.h"
14#include "int64.h"
15#include "iequatable.h"
16#include "new_ptr.h"
17#include "object.h"
18#include "static.h"
19#include <algorithm>
20#include <vector>
21
22#define __XTD_ARRAY_INTERNAL__
24#include "basic_array.h"
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.h"
105#include "array_2.h"
106#include "array_3.h"
107#include "array_static.h"
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_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.h:58
array(const array< xtd::size, 1 > &lengths)
Initializes a new instance of the array class with lengths for each rank specified.
Definition array.h:76
xtd::size rank() const noexcept override
Gets the rank (number of dimensions) of the array.
Definition array.h:87
array()=default
Initializes a new instance of the array class that is empty.
Base object that represent array.
Definition basic_array.h: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.h: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.h:10
Contains xtd::new_ptr method.
Contains xtd::object class.
Contains xtd::static_object class.