BLI: rename resource collector to resource scope
Differential Revision: https://developer.blender.org/D10857
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
* the function. `MFParams` is then used inside the called function to access the parameters.
|
||||
*/
|
||||
|
||||
#include "BLI_resource_collector.hh"
|
||||
#include "BLI_resource_scope.hh"
|
||||
|
||||
#include "FN_generic_vector_array.hh"
|
||||
#include "FN_generic_virtual_vector_array.hh"
|
||||
@@ -35,7 +35,7 @@ namespace blender::fn {
|
||||
|
||||
class MFParamsBuilder {
|
||||
private:
|
||||
ResourceCollector resources_;
|
||||
ResourceScope scope_;
|
||||
const MFSignature *signature_;
|
||||
int64_t min_array_size_;
|
||||
Vector<const GVArray *> virtual_arrays_;
|
||||
@@ -55,13 +55,13 @@ class MFParamsBuilder {
|
||||
|
||||
template<typename T> void add_readonly_single_input(const T *value, StringRef expected_name = "")
|
||||
{
|
||||
this->add_readonly_single_input(resources_.construct<GVArrayForSingleValueRef>(
|
||||
this->add_readonly_single_input(scope_.construct<GVArrayForSingleValueRef>(
|
||||
__func__, CPPType::get<T>(), min_array_size_, value),
|
||||
expected_name);
|
||||
}
|
||||
void add_readonly_single_input(const GSpan span, StringRef expected_name = "")
|
||||
{
|
||||
this->add_readonly_single_input(resources_.construct<GVArrayForGSpan>(__func__, span),
|
||||
this->add_readonly_single_input(scope_.construct<GVArrayForGSpan>(__func__, span),
|
||||
expected_name);
|
||||
}
|
||||
void add_readonly_single_input(const GVArray &ref, StringRef expected_name = "")
|
||||
@@ -74,7 +74,7 @@ class MFParamsBuilder {
|
||||
void add_readonly_vector_input(const GVectorArray &vector_array, StringRef expected_name = "")
|
||||
{
|
||||
this->add_readonly_vector_input(
|
||||
resources_.construct<GVVectorArrayForGVectorArray>(__func__, vector_array), expected_name);
|
||||
scope_.construct<GVVectorArrayForGVectorArray>(__func__, vector_array), expected_name);
|
||||
}
|
||||
void add_readonly_vector_input(const GVVectorArray &ref, StringRef expected_name = "")
|
||||
{
|
||||
@@ -136,9 +136,9 @@ class MFParamsBuilder {
|
||||
return *vector_arrays_[data_index];
|
||||
}
|
||||
|
||||
ResourceCollector &resources()
|
||||
ResourceScope &resource_scope()
|
||||
{
|
||||
return resources_;
|
||||
return scope_;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -177,7 +177,7 @@ class MFParams {
|
||||
template<typename T> const VArray<T> &readonly_single_input(int param_index, StringRef name = "")
|
||||
{
|
||||
const GVArray &array = this->readonly_single_input(param_index, name);
|
||||
return builder_->resources_.construct<VArrayForGVArray<T>>(__func__, array);
|
||||
return builder_->scope_.construct<VArrayForGVArray<T>>(__func__, array);
|
||||
}
|
||||
const GVArray &readonly_single_input(int param_index, StringRef name = "")
|
||||
{
|
||||
@@ -202,7 +202,7 @@ class MFParams {
|
||||
const VVectorArray<T> &readonly_vector_input(int param_index, StringRef name = "")
|
||||
{
|
||||
const GVVectorArray &vector_array = this->readonly_vector_input(param_index, name);
|
||||
return builder_->resources_.construct<VVectorArrayForGVVectorArray<T>>(__func__, vector_array);
|
||||
return builder_->scope_.construct<VVectorArrayForGVVectorArray<T>>(__func__, vector_array);
|
||||
}
|
||||
const GVVectorArray &readonly_vector_input(int param_index, StringRef name = "")
|
||||
{
|
||||
|
Reference in New Issue
Block a user