Blender  V2.93
generic_virtual_vector_array.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
18 
19 namespace blender::fn {
20 
21 void GVArrayForGVVectorArrayIndex::get_impl(const int64_t index_in_vector, void *r_value) const
22 {
23  vector_array_.get_vector_element(index_, index_in_vector, r_value);
24 }
25 
27  void *r_value) const
28 {
29  type_->construct_default(r_value);
30  vector_array_.get_vector_element(index_, index_in_vector, r_value);
31 }
32 
34 {
35  return array_.size();
36 }
37 
39  const int64_t index_in_vector,
40  void *r_value) const
41 {
42  array_.get(index_in_vector, r_value);
43 }
44 
46 {
47  return true;
48 }
49 
51 {
52  return span_.size();
53 }
54 
56  const int64_t index_in_vector,
57  void *r_value) const
58 {
59  type_->copy_to_initialized(span_[index_in_vector], r_value);
60 }
61 
63 {
64  return true;
65 }
66 
67 } // namespace blender::fn
#define UNUSED(x)
void construct_default(void *ptr) const
Definition: FN_cpp_type.hh:329
void copy_to_initialized(const void *src, void *dst) const
Definition: FN_cpp_type.hh:390
int64_t size() const
void get_impl(const int64_t index_in_vector, void *r_value) const override
void get_to_uninitialized_impl(const int64_t index_in_vector, void *r_value) const override
void get(const int64_t index, void *r_value) const
void get_vector_element_impl(const int64_t UNUSED(index), const int64_t index_in_vector, void *r_value) const override
int64_t get_vector_size_impl(const int64_t UNUSED(index)) const override
void get_vector_element_impl(const int64_t index, const int64_t index_in_vector, void *r_value) const override
int64_t get_vector_size_impl(const int64_t index) const override
void get_vector_element(const int64_t index, const int64_t index_in_vector, void *r_value) const
__int64 int64_t
Definition: stdint.h:92