Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-09 13:16:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-09 13:17:16 +0300
commit7f4878ac7f5612082a1235cf6083dc490cbfc212 (patch)
tree2fb612ec9cfa6a0f5cc4466860575aa536137b6b /source/blender/functions/FN_generic_virtual_array.hh
parentb8bad3549dcef0b761708ef9cc1f814ebedb3106 (diff)
Cleanup: move public doc-strings into headers for 'functions'
Ref T92709
Diffstat (limited to 'source/blender/functions/FN_generic_virtual_array.hh')
-rw-r--r--source/blender/functions/FN_generic_virtual_array.hh21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index aed7c206fe5..03e81b13714 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -148,11 +148,29 @@ class GVArrayCommon {
void materialize_to_uninitialized(void *dst) const;
void materialize_to_uninitialized(const IndexMask mask, void *dst) const;
+ /**
+ * Returns true when the virtual array is stored as a span internally.
+ */
bool is_span() const;
+ /**
+ * Returns the internally used span of the virtual array. This invokes undefined behavior is the
+ * virtual array is not stored as a span internally.
+ */
GSpan get_internal_span() const;
+ /**
+ * Returns true when the virtual array returns the same value for every index.
+ */
bool is_single() const;
+ /**
+ * Copies the value that is used for every element into `r_value`, which is expected to point to
+ * initialized memory. This invokes undefined behavior if the virtual array would not return the
+ * same value for every index.
+ */
void get_internal_single(void *r_value) const;
+ /**
+ * Same as `get_internal_single`, but `r_value` points to initialized memory.
+ */
void get_internal_single_to_uninitialized(void *r_value) const;
void get(const int64_t index, void *r_value) const;
@@ -226,6 +244,9 @@ class GVMutableArray : public GVArrayCommon {
void set_by_relocate(const int64_t index, void *value);
void fill(const void *value);
+ /**
+ * Copy the values from the source buffer to all elements in the virtual array.
+ */
void set_all(const void *src);
GVMutableArrayImpl *get_implementation() const;