CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
Array.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSAtomic.h"
5#include "RE/T/TypeInfo.h"
6#include "RE/V/Variable.h"
7
8namespace RE
9{
10 namespace BSScript
11 {
13 {
14 public:
16 using size_type = std::uint32_t;
17 using difference_type = std::int32_t;
21 using const_pointer = const value_type*;
23 using const_iterator = const value_type*;
24 using reverse_iterator = std::reverse_iterator<iterator>;
25 using const_reverse_iterator = std::reverse_iterator<const_iterator>;
26
28
29 [[nodiscard]] reference operator[](size_type a_pos);
30 [[nodiscard]] const_reference operator[](size_type a_pos) const;
31
32 [[nodiscard]] reference front();
33 [[nodiscard]] const_reference front() const;
34
35 [[nodiscard]] reference back();
36 [[nodiscard]] const_reference back() const;
37
38 [[nodiscard]] pointer data() noexcept;
39 [[nodiscard]] const_pointer data() const noexcept;
40
41 [[nodiscard]] iterator begin() noexcept;
42 [[nodiscard]] const_iterator begin() const noexcept;
43 [[nodiscard]] const_iterator cbegin() const noexcept;
44
45 [[nodiscard]] iterator end() noexcept;
46 [[nodiscard]] const_iterator end() const noexcept;
47 [[nodiscard]] const_iterator cend() const noexcept;
48
49 [[nodiscard]] reverse_iterator rbegin() noexcept;
50 [[nodiscard]] const_reverse_iterator rbegin() const noexcept;
51 [[nodiscard]] const_reverse_iterator crbegin() const noexcept;
52
53 [[nodiscard]] reverse_iterator rend() noexcept;
54 [[nodiscard]] const_reverse_iterator rend() const noexcept;
55 [[nodiscard]] const_reverse_iterator crend() const noexcept;
56
57 [[nodiscard]] bool empty() const noexcept;
58
59 [[nodiscard]] size_type size() const noexcept;
60
61 [[nodiscard]] size_type max_size() const noexcept;
62
63 [[nodiscard]] TypeInfo& type_info();
64 [[nodiscard]] const TypeInfo& type_info() const;
65
66 [[nodiscard]] TypeInfo::RawType type() const;
67
68 private:
69 static inline constexpr size_type MAX_SIZE = 128;
70
71 // members
72 std::uint32_t _pad04; // 04
73 TypeInfo _elementType; // 08
74 std::uint32_t _size; // 10
75 std::uint32_t _pad14; // 14
76 mutable BSSpinLock _lock; // 18
77 Variable _data[0]; // 20
78 };
79 static_assert(sizeof(Array) == 0x20);
80 }
81}
Definition: Array.h:13
std::int32_t difference_type
Definition: Array.h:17
pointer data() noexcept
const_reverse_iterator crend() const noexcept
const_reference back() const
const_iterator cbegin() const noexcept
size_type max_size() const noexcept
reference operator[](size_type a_pos)
iterator end() noexcept
const_reference front() const
const_iterator cend() const noexcept
bool empty() const noexcept
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: Array.h:25
reverse_iterator rend() noexcept
TypeInfo & type_info()
const_reverse_iterator crbegin() const noexcept
reverse_iterator rbegin() noexcept
iterator begin() noexcept
std::uint32_t size_type
Definition: Array.h:16
size_type size() const noexcept
const_reference operator[](size_type a_pos) const
TypeInfo::RawType type() const
std::reverse_iterator< iterator > reverse_iterator
Definition: Array.h:24
Definition: TypeInfo.h:10
Definition: Variable.h:15
Definition: BSAtomic.h:49
Definition: AbsorbEffect.h:6
Definition: NiBinaryStream.h:94
Definition: BSIntrusiveRefCounted.h:8