|
|
- static std::span<<%= @out_type %>> get_<%= @name %>(const <%= class_name %>& alter) {
- auto ptr = (char*)&alter;
- ptr+=<%= @start %>;
- return std::span<<%= @out_type %>>((<%= @out_type %>*)ptr, get_<%= @count_name %>(alter));
- }
-
- static void set_<%= @name %>(<%= class_name %>& alter, size_t index, const <%= @out_type %>& param) {
- auto ptr = (char*)&alter;
- ptr+=<%= @start %>;
- *(<%= @out_type %>*)ptr = param;
- }
-
- static constexpr size_t <%= @name %>_position() {
- return <%= @start %>;
- }
-
- static size_t <%= @name %>_end_position(<%= class_name %>& alter) {
- return <%= @start %>+get_<%= @count_name %>(alter)*sizeof(<%= @out_type %>);
- }
|