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:
authorJacques Lucke <mail@jlucke.com>2019-09-12 15:23:21 +0300
committerJacques Lucke <mail@jlucke.com>2019-09-12 15:23:21 +0300
commit369d5e8ad2bb7c249c6b941779066b6aa99f9ea0 (patch)
treeb0aece159472bfdc863832d8dc94666eba9a6327 /source/blender/blenlib/CMakeLists.txt
parent19547236355d59bc3888635ecbe4a9e35c1f86cb (diff)
BLI: new C++ ArrayRef, Vector, Stack, ... data structures
Many generic C++ data structures have been developed in the functions branch. This commit merges a first chunk of them into master. The following new data structures are included: Array: Owns a memory buffer with a fixed size. It is different from std::array in that the size is not part of the type. ArrayRef: References an array owned by someone else. All elements in the referenced array are considered to be const. This should be the preferred parameter type for functions that take arrays as input. MutableArrayRef: References an array owned by someone else. The elements in the referenced array can be changed. IndexRange: Specifies a continuous range of integers with a start and end index. IntrusiveListBaseWrapper: A utility class that allows iterating over ListBase instances where the prev and next pointer are stored in the objects directly. Stack: A stack implemented on top of a vector. Vector: An array that can grow dynamically. Allocators: Three allocator types are included that can be used by the container types to support different use cases. The Stack and Vector support small object optimization. So when the amount of elements in them is below a certain threshold, no memory allocation is performed. Additionally, most methods have unit tests. I'm merging this without normal code review, after I checked the code roughly with Sergey, and after we talked about it with Brecht.
Diffstat (limited to 'source/blender/blenlib/CMakeLists.txt')
-rw-r--r--source/blender/blenlib/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index 73652e18a56..b4db305ccd4 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -44,6 +44,7 @@ set(SRC
intern/BLI_ghash_utils.c
intern/BLI_heap.c
intern/BLI_heap_simple.c
+ intern/BLI_index_range.cc
intern/BLI_kdopbvh.c
intern/BLI_linklist.c
intern/BLI_linklist_lockfree.c
@@ -51,6 +52,7 @@ set(SRC
intern/BLI_memblock.c
intern/BLI_memiter.c
intern/BLI_mempool.c
+ intern/BLI_temporary_allocator.cc
intern/BLI_timer.c
intern/DLRB_tree.c
intern/array_store.c
@@ -131,9 +133,14 @@ set(SRC
intern/kdtree_impl.h
intern/list_sort_impl.h
+
+
BLI_alloca.h
+ BLI_allocator.h
BLI_args.h
BLI_array.h
+ BLI_array_cxx.h
+ BLI_array_ref.h
BLI_array_store.h
BLI_array_store_utils.h
BLI_array_utils.h
@@ -170,6 +177,7 @@ set(SRC
BLI_hash_mm3.h
BLI_heap.h
BLI_heap_simple.h
+ BLI_index_range.h
BLI_iterator.h
BLI_jitter_2d.h
BLI_kdopbvh.h
@@ -181,6 +189,7 @@ set(SRC
BLI_linklist_lockfree.h
BLI_linklist_stack.h
BLI_listbase.h
+ BLI_listbase_wrapper.h
BLI_math.h
BLI_math_base.h
BLI_math_bits.h
@@ -198,6 +207,7 @@ set(SRC
BLI_memblock.h
BLI_memiter.h
BLI_memory_utils.h
+ BLI_memory_utils_cxx.h
BLI_mempool.h
BLI_noise.h
BLI_path_util.h
@@ -211,6 +221,7 @@ set(SRC
BLI_sort.h
BLI_sort_utils.h
BLI_stack.h
+ BLI_stack_cxx.h
BLI_strict_flags.h
BLI_string.h
BLI_string_cursor_utf8.h
@@ -219,6 +230,8 @@ set(SRC
BLI_sys_types.h
BLI_system.h
BLI_task.h
+ BLI_temporary_allocator.h
+ BLI_temporary_allocator_cxx.h
BLI_threads.h
BLI_timecode.h
BLI_timer.h
@@ -227,6 +240,7 @@ set(SRC
BLI_utildefines_stack.h
BLI_utildefines_variadic.h
BLI_uvproject.h
+ BLI_vector.h
BLI_vfontdata.h
BLI_voronoi_2d.h
BLI_voxel.h