10#include <coresystem/cs_param.hpp>
12#include <detail/preprocessor.hpp>
13#include <param/detail/paramdef.hpp>
33template <
typename ParamType>
94 iterator found = std::lower_bound(first, last, row,
95 [](
const auto& cmp,
const auto& row) {
return cmp.first < row; });
96 if (found == last || (*found).first != row) {
97 if (!this->dummy_param) {
98 auto swap = std::make_unique<paramdef_type>();
99 std::atomic_thread_fence(std::memory_order_seq_cst);
100 this->dummy_param.swap(swap);
101 std::atomic_thread_fence(std::memory_order_seq_cst);
103 return { *this->dummy_param,
false };
105 return { (*found).second,
true };
118 auto file = this->get_file();
136 auto file = this->get_file();
141 return iterator(file_ref, file_ref.row_count);
180 return this->
begin();
219 return this->
begin();
245 return this->
begin();
271 return this->
begin();
275 mutable std::unique_ptr<paramdef_type> dummy_param;
278 auto repository = CS::SoloParamRepository::instance();
281 return repository.reference().get_param_file(
index);
289template <param_index Index,
typename Def>
304#define LIBER_PARAM_ENTRY(PARAM, PARAMDEF) \
305 inline param_table<param_type<param_index::PARAM, paramdef::PARAMDEF>> \
308#include <param/detail/paramlist.inl>
310#undef LIBER_PARAM_ENTRY
The bidirectional param table iterator.
Definition param_iterator.hpp:30
value_type & reference
Iterator reference type.
Definition param_iterator.hpp:69
An interface to a param table of one of the predefined types.
Definition param_table.hpp:34
const_reverse_iterator rend() const noexcept
Get the reverse iterator before the first param row in the table.
Definition param_table.hpp:244
const_reverse_iterator crbegin() const noexcept
Get the reverse iterator to the last param row in the table.
Definition param_table.hpp:257
std::reverse_iterator< iterator > reverse_iterator
Reverse order param iterator type.
Definition param_table.hpp:58
const_iterator cbegin() const noexcept
Get the const iterator to the first param row in the table.
Definition param_table.hpp:179
const_iterator begin() const noexcept
Get the iterator to the first param row in the table.
Definition param_table.hpp:153
param_iterator< paramdef_type > iterator
Param iterator type.
Definition param_table.hpp:52
iterator begin() noexcept
Get the iterator to the first param row in the table.
Definition param_table.hpp:117
typename ParamType::paramdef_type paramdef_type
The paramdefs this param type uses.
Definition param_table.hpp:40
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse order param const iterator type.
Definition param_table.hpp:70
const_iterator end() const noexcept
Get the iterator after the last param row in the table.
Definition param_table.hpp:166
const_reverse_iterator crend() const noexcept
Get the reverse iterator before the first param row in the table.
Definition param_table.hpp:270
iterator end() noexcept
Get the iterator after the last param row in the table.
Definition param_table.hpp:135
reverse_iterator rend() noexcept
Get the reverse iterator before the first param row in the table.
Definition param_table.hpp:218
reverse_iterator rbegin() noexcept
Get the reverse iterator to the last param row in the table.
Definition param_table.hpp:205
const_reverse_iterator rbegin() const noexcept
Get the reverse iterator to the last param row in the table.
Definition param_table.hpp:231
const_iterator cend() const noexcept
Get the const iterator after the last param row in the table.
Definition param_table.hpp:192
std::pair< paramdef_type &, bool > operator[](row_index_type row) const noexcept
Get a param row from this param table by its row index.
Definition param_table.hpp:90
static constexpr param_index index
The param index of this param table.
Definition param_table.hpp:46
Optional references based on std::optional.
ELDEN RING param defines and enums.
param_index
An enum of all param tables as they appear in order.
Definition param_defines.hpp:56
int32_t row_index_type
Signed 32-bit integers are used to represent param row indices.
Definition param_defines.hpp:22
A helper structure with param type data.
Definition param_table.hpp:290
static constexpr param_index index
The param index of this param table.
Definition param_table.hpp:301
Def paramdef_type
The paramdefs this param uses.
Definition param_table.hpp:295
A std::optional<std::reference_wrapper<T>> wrapper for lvalue references.
Definition optref.hpp:31