12 template <
class,
class =
void>
20 is_builtin_convertible<T>,
26 using size_type =
typename container_type::size_type;
28 using reference =
typename container_type::reference;
30 using pointer =
typename container_type::pointer;
32 using iterator =
typename container_type::iterator;
52 _unwrapped(
std::move(a_rhs._unwrapped)),
53 _wrapped(
std::move(a_rhs._wrapped))
68 if (
this != std::addressof(a_rhs)) {
70 _unwrapped = std::move(a_rhs._unwrapped);
71 _wrapped = std::move(a_rhs._wrapped);
90 [[nodiscard]]
pointer data() noexcept {
return _unwrapped.data(); }
97 [[nodiscard]]
iterator end() noexcept {
return _unwrapped.end(); }
109 [[nodiscard]]
bool empty() const noexcept {
return _unwrapped.empty(); }
116 swap(_unwrapped, a_rhs._unwrapped);
117 swap(_wrapped, a_rhs._wrapped);
124 const auto SIZE =
static_cast<std::uint32_t
>(_unwrapped.size());
125 for (std::uint32_t i = 0; i < SIZE; ++i) {
126 (*_wrapped)[i].Pack(_unwrapped[i]);
131 void do_unwrap(
const Variable* a_wrapped)
133 assert(a_wrapped && a_wrapped->IsArray());
134 auto arr = a_wrapped->GetArray();
135 if (_wrapped != arr) {
136 _wrapped = std::move(arr);
137 _unwrapped.reserve(_wrapped->size());
138 for (
auto& elem : *_wrapped) {
139 _unwrapped.push_back(elem.Unpack<value_type>());
144 container_type _unwrapped;
145 BSTSmartPointer<Array> _wrapped;
typename container_type::pointer pointer
Definition ReferenceArray.h:30
reverse_iterator rend() noexcept
Definition ReferenceArray.h:105
const_iterator cbegin() const noexcept
Definition ReferenceArray.h:95
size_type size() const noexcept
Definition ReferenceArray.h:111
const_reference at(size_type a_pos) const
Definition ReferenceArray.h:79
const_reference back() const
Definition ReferenceArray.h:88
reference_array()
Definition ReferenceArray.h:37
reference operator[](size_type a_pos)
Definition ReferenceArray.h:81
bool empty() const noexcept
Definition ReferenceArray.h:109
iterator end() noexcept
Definition ReferenceArray.h:97
typename container_type::const_iterator const_iterator
Definition ReferenceArray.h:33
reference at(size_type a_pos)
Definition ReferenceArray.h:78
reverse_iterator rbegin() noexcept
Definition ReferenceArray.h:101
typename container_type::reference reference
Definition ReferenceArray.h:28
reference_array & operator=(reference_array &&a_rhs)
Definition ReferenceArray.h:66
const_reverse_iterator crbegin() const noexcept
Definition ReferenceArray.h:103
const_reference front() const
Definition ReferenceArray.h:85
~reference_array()
Definition ReferenceArray.h:56
const_reverse_iterator crend() const noexcept
Definition ReferenceArray.h:107
typename container_type::const_pointer const_pointer
Definition ReferenceArray.h:31
reference back()
Definition ReferenceArray.h:87
typename container_type::reverse_iterator reverse_iterator
Definition ReferenceArray.h:34
void swap(reference_array &a_rhs)
Definition ReferenceArray.h:113
reference_array & operator=(const reference_array &)=delete
const_pointer data() const noexcept
Definition ReferenceArray.h:91
iterator begin() noexcept
Definition ReferenceArray.h:93
pointer data() noexcept
Definition ReferenceArray.h:90
reference_array(reference_array &&a_rhs)
Definition ReferenceArray.h:51
const_iterator cend() const noexcept
Definition ReferenceArray.h:99
reference front()
Definition ReferenceArray.h:84
typename container_type::value_type value_type
Definition ReferenceArray.h:25
typename container_type::iterator iterator
Definition ReferenceArray.h:32
reference_array(const reference_array &)=delete
typename container_type::const_reference const_reference
Definition ReferenceArray.h:29
std::vector< T > container_type
Definition ReferenceArray.h:24
reference_array(const Variable *a_wrapped)
Definition ReferenceArray.h:42
typename container_type::size_type size_type
Definition ReferenceArray.h:26
const_reference operator[](size_type a_pos) const
Definition ReferenceArray.h:82
const_iterator end() const noexcept
Definition ReferenceArray.h:98
const_iterator begin() const noexcept
Definition ReferenceArray.h:94
reference_array & operator=(const Variable *a_wrapped)
Definition ReferenceArray.h:58
typename container_type::const_reverse_iterator const_reverse_iterator
Definition ReferenceArray.h:35
typename container_type::difference_type difference_type
Definition ReferenceArray.h:27
const_reverse_iterator rbegin() const noexcept
Definition ReferenceArray.h:102
const_reverse_iterator rend() const noexcept
Definition ReferenceArray.h:106
Definition ReferenceArray.h:13
void swap(reference_array< T > &a_lhs, reference_array< T > &a_rhs)
Definition ReferenceArray.h:149
Definition AbsorbEffect.h:6
Definition ActorValueList.h:28