From 46b2132240d14f56b8c19079d3ff5c98a085ee30 Mon Sep 17 00:00:00 2001 From: Ubpa Date: Sat, 23 Jan 2021 15:16:24 +0800 Subject: [PATCH] cpp20 --- CMakeLists.txt | 9 +- cmake/InitUCMake.cmake | 18 +- config/Config.cmake.in | 16 +- include/UECS/AccessTypeID.h | 34 +++ include/UECS/ArchetypeFilter.h | 12 +- include/UECS/ChunkView.h | 21 +- include/UECS/CmptLocator.h | 21 +- include/UECS/CmptPtr.h | 30 +-- include/UECS/CmptTag.h | 4 +- include/UECS/CmptType.h | 95 -------- include/UECS/CmptsView.h | 11 +- include/UECS/Entity.h | 14 +- include/UECS/EntityMngr.h | 64 +++--- include/UECS/EntityQuery.h | 2 +- include/UECS/RTDCmptTraits.h | 54 ++--- include/UECS/RandomAccessor.h | 4 +- include/UECS/Schedule.h | 31 +-- include/UECS/SingletonLocator.h | 13 +- include/UECS/SingletonsView.h | 10 +- include/UECS/SystemMngr.h | 22 +- include/UECS/SystemTraits.h | 44 ++-- include/UECS/World.h | 14 +- include/UECS/config.h | 4 +- include/UECS/detail/AccessTypeID.inl | 13 ++ include/UECS/detail/Archetype.h | 70 +++--- include/UECS/detail/Archetype.inl | 32 +-- include/UECS/detail/ArchetypeCmptTraits.h | 30 +-- include/UECS/detail/ArchetypeCmptTraits.inl | 22 +- include/UECS/detail/Chunk.h | 8 +- include/UECS/detail/ChunkView.inl | 8 +- include/UECS/detail/CmptTag.inl | 76 +++---- include/UECS/detail/CmptType.inl | 20 -- include/UECS/detail/CmptTypeSet.h | 40 ---- include/UECS/detail/CmptTypeSet.inl | 98 -------- include/UECS/detail/CmptsLocator.inl | 8 +- include/UECS/detail/EntityMngr.inl | 66 +++--- include/UECS/detail/EntityQuery.inl | 4 +- include/UECS/detail/RTDCmptTraits.inl | 40 ++-- include/UECS/detail/Schedule.inl | 7 +- include/UECS/detail/SingletonLocator.inl | 6 +- include/UECS/detail/SystemFunc.h | 16 +- include/UECS/detail/SystemFunc.inl | 10 +- include/UECS/detail/SystemMngr.inl | 8 +- include/UECS/detail/SystemTraits.inl | 34 ++- include/UECS/detail/TypeIDSet.h | 40 ++++ include/UECS/detail/TypeIDSet.inl | 98 ++++++++ include/UECS/detail/Util.h | 11 +- include/UECS/detail/Util.inl | 21 +- include/UECS/detail/World.inl | 4 +- src/app/CmptHashCode/CMakeLists.txt | 2 +- src/app/CmptHashCode/main.cpp | 4 +- src/core/Archetype.cpp | 134 +++++------ src/core/ArchetypeFilter.cpp | 12 +- src/core/CMakeLists.txt | 1 - src/core/Chunk.cpp | 18 +- src/core/ChunkView.cpp | 8 +- src/core/CmptLocator.cpp | 18 +- src/core/CmptsView.cpp | 2 +- src/core/EntityMngr.cpp | 235 ++++++++++---------- src/core/Schedule.cpp | 158 ++++++++----- src/core/SingletonLocator.cpp | 2 +- src/core/SingletonsView.cpp | 2 +- src/core/SysFuncGraph.cpp | 2 +- src/core/SystemFunc.cpp | 6 +- src/core/SystemMngr.cpp | 14 +- src/core/SystemTraits.cpp | 36 +-- src/core/World.cpp | 37 +-- src/test/03_query_entity/main.cpp | 5 +- src/test/04_filter/main.cpp | 6 +- src/test/06_none_parallel/main.cpp | 4 +- src/test/07_overload/main.cpp | 3 +- src/test/08_job/main.cpp | 14 +- src/test/11_runtime_cmpt/main.cpp | 11 +- src/test/12_framegraph/main.cpp | 20 +- src/test/13_performance/main.cpp | 10 +- src/test/14_serialize/main.cpp | 4 +- src/test/15_chunk_job/main.cpp | 10 +- src/test/17_serial/main.cpp | 4 +- src/test/19_direct_run/main.cpp | 7 +- src/test/21_random/main.cpp | 13 +- 80 files changed, 1077 insertions(+), 1062 deletions(-) create mode 100644 include/UECS/AccessTypeID.h delete mode 100644 include/UECS/CmptType.h create mode 100644 include/UECS/detail/AccessTypeID.inl delete mode 100644 include/UECS/detail/CmptType.inl delete mode 100644 include/UECS/detail/CmptTypeSet.h delete mode 100644 include/UECS/detail/CmptTypeSet.inl create mode 100644 include/UECS/detail/TypeIDSet.h create mode 100644 include/UECS/detail/TypeIDSet.inl diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bad430..1cd0b2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,15 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR) -project(UECS VERSION 0.14.4) +project(UECS VERSION 0.15.0) message(STATUS "[Project] ${PROJECT_NAME}") include(cmake/InitUCMake.cmake) -Ubpa_InitUCMake() +Ubpa_InitUCMake(VERSION 0.6.4) Ubpa_InitProject() -Ubpa_AddDep(UContainer 0.0.9) -Ubpa_AddDep(UTemplate 0.4.9) -Ubpa_AddDep(UGraphviz 0.1.6) +Ubpa_AddDep(UTemplate 0.6.0) +Ubpa_AddDep(UGraphviz 0.2.0) Ubpa_AddSubDirsRec(include) Ubpa_AddSubDirsRec(src) diff --git a/cmake/InitUCMake.cmake b/cmake/InitUCMake.cmake index 7cdb7da..61c2946 100644 --- a/cmake/InitUCMake.cmake +++ b/cmake/InitUCMake.cmake @@ -1,6 +1,22 @@ macro(Ubpa_InitUCMake) + cmake_parse_arguments( + "ARG" # prefix + "" # # TRUE / FALSE + "VERSION" # + "" # # list + ${ARGN} + ) + # 结果为 ARG_* + # - ARG_