[Bf-blender-cvs] [9116016f93f] functions-experimental-refactor: rename GET_TYPE to CPP_TYPE

Jacques Lucke noreply at git.blender.org
Thu Nov 7 15:06:23 CET 2019


Commit: 9116016f93fbc6fd61bcecf2336fd6197f6a4633
Author: Jacques Lucke
Date:   Thu Nov 7 13:48:30 2019 +0100
Branches: functions-experimental-refactor
https://developer.blender.org/rB9116016f93fbc6fd61bcecf2336fd6197f6a4633

rename GET_TYPE to CPP_TYPE

===================================================================

M	source/blender/functions/FN_attributes_ref.h
M	source/blender/functions/FN_cpp_type.h
M	source/blender/functions/FN_generic_array_ref.h
M	source/blender/functions/FN_generic_tuple.h
M	source/blender/functions/FN_generic_vector_array.h
M	source/blender/functions/FN_generic_virtual_list_list_ref.h
M	source/blender/functions/FN_generic_virtual_list_ref.h
M	source/blender/functions/FN_multi_function.h
M	source/blender/functions/FN_multi_function_data_type.h
M	source/blender/functions/intern/cpp_types.cc
M	source/blender/functions/intern/multi_functions/lists.h
M	source/blender/functions/intern/multi_functions/mixed.h
M	source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc
M	source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
M	source/blender/simulations/bparticles/c_wrapper.cpp

===================================================================

diff --git a/source/blender/functions/FN_attributes_ref.h b/source/blender/functions/FN_attributes_ref.h
index 753c5936d19..4a3530badd2 100644
--- a/source/blender/functions/FN_attributes_ref.h
+++ b/source/blender/functions/FN_attributes_ref.h
@@ -35,7 +35,7 @@ class AttributesInfoBuilder {
 
   template<typename T> void add(StringRef name)
   {
-    this->add(name, GET_TYPE<T>());
+    this->add(name, CPP_TYPE<T>());
   }
 
   void add(StringRef name, const CPPType &type)
@@ -108,7 +108,7 @@ class AttributesInfo {
 
   template<typename T> int index_of_try(StringRef name) const
   {
-    return this->index_of_try(name, GET_TYPE<T>());
+    return this->index_of_try(name, CPP_TYPE<T>());
   }
 
   int index_of_try(StringRef name) const
@@ -178,7 +178,7 @@ class AttributesRef {
 
   template<typename T> MutableArrayRef<T> get(uint index) const
   {
-    BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+    BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
     return MutableArrayRef<T>((T *)m_buffers[index] + m_range.start(), m_range.size());
   }
 
@@ -233,7 +233,7 @@ class AttributesRefGroup {
   template<typename T> void set(uint index, ArrayRef<T> data)
   {
     BLI_assert(data.size() == m_total_size);
-    BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+    BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
 
     uint offset = 0;
     for (AttributesRef attributes : *this) {
@@ -256,7 +256,7 @@ class AttributesRefGroup {
   template<typename T> void set_repeated(uint index, ArrayRef<T> data)
   {
     BLI_assert(m_total_size == 0 || data.size() > 0);
-    BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+    BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
 
     uint src_index = 0;
     for (AttributesRef attributes : *this) {
@@ -279,7 +279,7 @@ class AttributesRefGroup {
 
   template<typename T> void fill(uint index, const T &value)
   {
-    BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+    BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
 
     for (AttributesRef attributes : *this) {
       MutableArrayRef<T> array = attributes.get<T>(index);
@@ -349,7 +349,7 @@ class AttributesDefaults : BLI::NonCopyable, BLI::NonMovable {
     else {
       uint index = m_type_by_index.size();
       m_index_by_name.add_new(name, index);
-      const CPPType &type = GET_TYPE<T>();
+      const CPPType &type = CPP_TYPE<T>();
       m_type_by_index.append(&type);
       void *value_buffer = m_allocator.allocate(type.size(), type.alignment());
       new (value_buffer) T(std::move(value));
@@ -367,7 +367,7 @@ class AttributesDefaults : BLI::NonCopyable, BLI::NonMovable {
 
   template<typename T> const T &get(StringRef name) const
   {
-    const void *value = this->get(name, GET_TYPE<T>());
+    const void *value = this->get(name, CPP_TYPE<T>());
     return *(const T *)value;
   }
 };
diff --git a/source/blender/functions/FN_cpp_type.h b/source/blender/functions/FN_cpp_type.h
index 766b7c118dd..0be74e4b316 100644
--- a/source/blender/functions/FN_cpp_type.h
+++ b/source/blender/functions/FN_cpp_type.h
@@ -186,7 +186,7 @@ class CPPType {
   std::string m_name;
 };
 
-template<typename T> const CPPType &GET_TYPE();
+template<typename T> const CPPType &CPP_TYPE();
 
 }  // namespace FN
 
diff --git a/source/blender/functions/FN_generic_array_ref.h b/source/blender/functions/FN_generic_array_ref.h
index e6d688c97a6..4bf9d417e71 100644
--- a/source/blender/functions/FN_generic_array_ref.h
+++ b/source/blender/functions/FN_generic_array_ref.h
@@ -51,7 +51,7 @@ class GenericArrayRef {
 
   template<typename T> ArrayRef<T> as_typed_ref() const
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
     return ArrayRef<T>((const T *)m_buffer, m_size);
   }
 };
@@ -76,7 +76,7 @@ class GenericMutableArrayRef {
 
   template<typename T>
   GenericMutableArrayRef(ArrayRef<T> array)
-      : GenericMutableArrayRef(GET_TYPE<T>(), (void *)array.begin(), array.size())
+      : GenericMutableArrayRef(CPP_TYPE<T>(), (void *)array.begin(), array.size())
   {
   }
 
@@ -150,7 +150,7 @@ class GenericMutableArrayRef {
 
   template<typename T> MutableArrayRef<T> as_typed_ref()
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
     return MutableArrayRef<T>((T *)m_buffer, m_size);
   }
 };
diff --git a/source/blender/functions/FN_generic_tuple.h b/source/blender/functions/FN_generic_tuple.h
index 0dc473d7e84..9a8be9f1af3 100644
--- a/source/blender/functions/FN_generic_tuple.h
+++ b/source/blender/functions/FN_generic_tuple.h
@@ -84,7 +84,7 @@ class GenericTupleInfo : BLI::NonCopyable, BLI::NonMovable {
 
   template<typename T> bool element_has_type(uint index) const
   {
-    return GET_TYPE<T>().is_same_or_generalization(*m_types[index]);
+    return CPP_TYPE<T>().is_same_or_generalization(*m_types[index]);
   }
 };
 
@@ -259,7 +259,7 @@ class GenericTupleRef {
     return this->copy_out<T>(index);
   }
 
-  template<typename T> T GET_TYPE(uint index) const
+  template<typename T> T CPP_TYPE(uint index) const
   {
     BLI_STATIC_ASSERT(std::is_trivial<T>::value, "can only be used with trivial types");
     return this->copy_out<T>(index);
diff --git a/source/blender/functions/FN_generic_vector_array.h b/source/blender/functions/FN_generic_vector_array.h
index c1f43dbdd91..62e5ca2015c 100644
--- a/source/blender/functions/FN_generic_vector_array.h
+++ b/source/blender/functions/FN_generic_vector_array.h
@@ -162,13 +162,13 @@ class GenericVectorArray : BLI::NonCopyable, BLI::NonMovable {
 
   template<typename T> const TypedRef<T> as_typed_ref() const
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(m_type));
     return TypedRef<T>(*this);
   }
 
   template<typename T> MutableTypedRef<T> as_mutable_typed_ref()
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(m_type));
     return MutableTypedRef<T>(*this);
   }
 
diff --git a/source/blender/functions/FN_generic_virtual_list_list_ref.h b/source/blender/functions/FN_generic_virtual_list_list_ref.h
index 9cd90df4cb8..54d01bb3fdb 100644
--- a/source/blender/functions/FN_generic_virtual_list_list_ref.h
+++ b/source/blender/functions/FN_generic_virtual_list_list_ref.h
@@ -97,7 +97,7 @@ class GenericVirtualListListRef {
 
   template<typename T> VirtualListListRef<T> as_typed_ref() const
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
 
     switch (m_category) {
       case Category::SingleArray:
diff --git a/source/blender/functions/FN_generic_virtual_list_ref.h b/source/blender/functions/FN_generic_virtual_list_ref.h
index 4a82cee716c..f8543c0a04f 100644
--- a/source/blender/functions/FN_generic_virtual_list_ref.h
+++ b/source/blender/functions/FN_generic_virtual_list_ref.h
@@ -89,7 +89,7 @@ class GenericVirtualListRef {
   template<typename T> static GenericVirtualListRef FromFullArray(ArrayRef<T> array)
   {
     return GenericVirtualListRef::FromFullArray(
-        GET_TYPE<T>(), (const void *)array.begin(), array.size());
+        CPP_TYPE<T>(), (const void *)array.begin(), array.size());
   }
 
   static GenericVirtualListRef FromFullPointerArray(const CPPType &type,
@@ -150,7 +150,7 @@ class GenericVirtualListRef {
 
   template<typename T> VirtualListRef<T> as_typed_ref() const
   {
-    BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+    BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
 
     switch (m_category) {
       case Category::Single:
diff --git a/source/blender/functions/FN_multi_function.h b/source/blender/functions/FN_multi_function.h
index 529be545379..49906173da2 100644
--- a/source/blender/functions/FN_multi_function.h
+++ b/source/blender/functions/FN_multi_function.h
@@ -122,13 +122,13 @@ class MFSignature {
       return false;
     }
     else if (ELEM(category, MFParamType::ReadonlySingleInput, MFParamType::SingleOutput)) {
-      return GET_TYPE<T>().is_same_or_generalization(m_param_types[index].type());
+      return CPP_TYPE<T>().is_same_or_generalization(m_param_types[index].type());
     }
     else if (ELEM(category,
                   MFParamType::ReadonlyVectorInput,
                   MFParamType::VectorOutput,
                   MFParamType::MutableVector)) {
-      return GET_TYPE<T>().is_same_or_generalization(m_param_types[index].base_type());
+      return CPP_TYPE<T>().is_same_or_generalization(m_param_types[index].base_type());
     }
     else {
       return false;
@@ -154,7 +154,7 @@ class MFSignatureBuilder {
 
   template<typename T> void readonly_single_input(StringRef name)
   {
-    this->readonly_single_input(name, GET_TYPE<T>());
+    this->readonly_single_input(name, CPP_TYPE<T>());
   }
   void readonly_single_input(StringRef name, const CPPType &type)
   {
@@ -164,7 +164,7 @@ class MFSignatureBuilder {
 
   template<typename T> void single_output(StringRef name)
   {
-    this->single_output(name, GET_TYPE<T>());
+    this->single_output(name, CPP_TYPE<T>());
   }
   void single_output(StringRef name, const CPPType &type)
   {
@@ -174,7 +174,7 @@ class MFSignatureBuilder {
 
   template<typename T> void readonly_vector_input(StringRef name)
   {
-    this->readonly_vector_input(name, GET_TYPE<T>());
+    this->readonly_vector_input(name, CPP_TYPE<T>());
   }
   void readonly_vector_input(StringRef name, const CPPType &base_type)
   {
@@ -184,7 +184,7 @@ class MFSignatureBuilder {
 
   template<typename T> void vector_output(StringRef name)
   {
-    this->vector_output(name, GET_TYPE<T>());
+    this->vector_output(name, CPP_TYPE<T>());
   }
   void vector_output(StringRef name, const CPPType &base_type)
   {
@@ -357,7 +357,7 @@ class MFParamsBuilder {
   template<typename T> void add_readonly_single_input(const T *value)
   {
     m_virtual_list_refs.append(
-        GenericVirtualListRef::FromSingle(GET_TYPE<T>(), (void *)value, m_min_array_size));
+        GenericVirtualListRef::FromSin

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list