diff --git a/.gitignore b/.gitignore index 0181326..071a0ef 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ ADD_MANY_COMPONENT_100K.json ADD_MANY_COMPONENT_100M.json ADD_MANY_COMPONENT_1K.json ADD_MANY_COMPONENT_10M.json + +# External Dev +external_dev diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 33e4d94..7f5cacd 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,7 +4,7 @@ "name": "Default Windows", "includePath": [ "src/", - "bazel-littleecs/external/_main~_repo_rules~ProjectCore/src/" + "bazel-littleecs/external/_main~_repo_rules~StreamFormat/src/" ], "cStandard": "c17", "cppStandard": "c++20", diff --git a/BUILD b/BUILD index a85a38e..e3af315 100644 --- a/BUILD +++ b/BUILD @@ -21,12 +21,12 @@ cc_test( name = "LittleECSTests", srcs = glob([ "Tests/**/*.h", "Tests/**/*.cpp" ], exclude=["Tests/Perf/**"]), includes = [ "src/" ], - defines = [ "LECS_USE_PROJECTCORE" ], + defines = [ "LECS_USE_STREAMFORMAT" ], copts = select({ "@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"], "//conditions:default": ["-std=c++20"], }), - deps = [ "@ProjectCore//:ProjectCore", ":LittleECS" ], + deps = [ "@StreamFormat//:StreamFormat", ":LittleECS" ], visibility = ["//visibility:public"], ) @@ -34,11 +34,11 @@ cc_test( name = "LittleECSTestsPerf", srcs = glob([ "Tests/**/*.h", "Tests/**/*.cpp" ]), includes = [ "src/" ], - defines = [ "LECS_USE_PROJECTCORE" ], + defines = [ "LECS_USE_STREAMFORMAT" ], copts = select({ "@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"], "//conditions:default": ["-std=c++20"], }), - deps = [ "@ProjectCore//:ProjectCore", ":LittleECS" ], + deps = [ "@StreamFormat//:StreamFormat", ":LittleECS" ], visibility = ["//visibility:public"], ) diff --git a/Examples/MODULE.bazel b/Examples/MODULE.bazel index 68148e3..d858191 100644 --- a/Examples/MODULE.bazel +++ b/Examples/MODULE.bazel @@ -17,7 +17,7 @@ local_path_override( http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "ProjectCore", - urls = [ "https://github.com/0-Sacha/ProjectCore/archive/refs/heads/dev.zip" ], - strip_prefix = "ProjectCore-dev" + name = "StreamFormat", + urls = [ "https://github.com/0-Sacha/StreamFormat/archive/refs/heads/dev.zip" ], + strip_prefix = "StreamFormat-dev" ) diff --git a/Examples/README.md b/Examples/README.md index 0e97e3b..2b75fe8 100644 --- a/Examples/README.md +++ b/Examples/README.md @@ -1,4 +1,4 @@ -# Example of ProjectCore +# Example of StreamFormat ### Try thoses examples ! diff --git a/Examples/Workflow/BUILD b/Examples/Workflow/BUILD index 072516d..3679cdf 100644 --- a/Examples/Workflow/BUILD +++ b/Examples/Workflow/BUILD @@ -5,11 +5,11 @@ load("@rules_cc//cc:defs.bzl", "cc_binary") cc_binary( name = "Workflow", srcs = glob([ "*.h", "*.cpp" ]), - defines = [ "LECS_USE_PROJECTCORE" ], + defines = [ "LECS_USE_STREAMFORMAT" ], copts = select({ "@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"], "//conditions:default": ["-std=c++20"], }), - deps = [ "@ProjectCore//:ProjectCore", "@littleecs//:LittleECS" ], + deps = [ "@StreamFormat//:StreamFormat", "@littleecs//:LittleECS" ], visibility = ["//visibility:public"], ) diff --git a/Examples/Workflow/main.cpp b/Examples/Workflow/main.cpp index 39174b3..9978707 100644 --- a/Examples/Workflow/main.cpp +++ b/Examples/Workflow/main.cpp @@ -1,8 +1,8 @@ #include "LittleECS/LittleECS.h" -#include "ProjectCore/FLog.h" +#include "StreamFormat/FLog.h" -ProjectCore::FLog::BasicLogger Logger("Workflow"); +StreamFormat::FLog::BasicLogger Logger("Workflow"); /****** Components ******/ struct ASmallComponent @@ -20,7 +20,7 @@ struct Name std::string Name; }; // To be able to Format the struct Name -PROJECTCORE_AUTO_FORMATTER(Name, "{}", value.Name); +STREAMFORMAT_AUTO_FORMATTER(Name, "{}", value.Name); int main() { diff --git a/MODULE.bazel b/MODULE.bazel index db2bba9..c5bda94 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,8 +11,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9") http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "ProjectCore", - urls = [ "https://github.com/0-Sacha/ProjectCore/archive/refs/heads/dev.zip" ], - strip_prefix = "ProjectCore-dev", - integrity = "sha256-28v/wuBCDSekQV03i9/2Tn+AR9hllqPdCOMYOvHBwmI=", + name = "StreamFormat", + urls = [ "https://github.com/0-Sacha/StreamFormat/archive/refs/heads/dev.zip" ], + strip_prefix = "StreamFormat-dev", ) diff --git a/Tests/BaseLittleECSTest.h b/Tests/BaseLittleECSTest.h index 90f2470..17add83 100644 --- a/Tests/BaseLittleECSTest.h +++ b/Tests/BaseLittleECSTest.h @@ -1,5 +1,5 @@ #pragma once -#include "ProjectCore/Tester/TestSuite/AllTestSuite.h" +#include "StreamFormat/Tester/TestSuite/AllTestSuite.h" inline PCT_TEST_SUITE(LITTLE_ECS); diff --git a/Tests/BasicWorkflow.cpp b/Tests/BasicWorkflow.cpp index 4fba4ce..5192409 100644 --- a/Tests/BasicWorkflow.cpp +++ b/Tests/BasicWorkflow.cpp @@ -2,7 +2,7 @@ #include "LittleECS/LittleECS.h" -#include "ProjectCore/ProfilerManager.h" +#include "StreamFormat/ProfilerManager.h" #include diff --git a/Tests/Perf/PerformanceTest.cpp b/Tests/Perf/PerformanceTest.cpp index e16f8bb..7d6a955 100644 --- a/Tests/Perf/PerformanceTest.cpp +++ b/Tests/Perf/PerformanceTest.cpp @@ -2,7 +2,7 @@ #include "LittleECS/LittleECS.h" -#include "ProjectCore/ProfilerManager.h" +#include "StreamFormat/ProfilerManager.h" #include @@ -35,7 +35,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom #define BenchmarkTest(Size, Name) PCT_TEST_FUNC(PERFORMANCE, ADD_MANY_COMPONENT_ ## Name) \ { \ - ProjectCore::ProfilerManager::Profiler profiler("ADD_MANY_COMPONENT_" #Name); \ + StreamFormat::ProfilerManager::Profiler profiler("ADD_MANY_COMPONENT_" #Name); \ \ LECS::Registry registry; \ \ @@ -43,7 +43,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom entities.reserve(Size); \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "Create Entities"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "Create Entities"); \ \ for (std::size_t i = 0; i < Size; ++i) \ { \ @@ -52,7 +52,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom } \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "Check Entities Ids"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "Check Entities Ids"); \ \ bool uid = true; \ \ @@ -91,7 +91,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom } \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "Add Component"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "Add Component"); \ \ for (std::size_t i = 0; i < Size; ++i) \ { \ @@ -100,7 +100,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom } \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "Get Component"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "Get Component"); \ \ for (std::size_t i = 0; i < Size; ++i) \ { \ @@ -109,7 +109,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom } \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "Has Component"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "Has Component"); \ \ for (std::size_t i = 0; i < Size; ++i) \ { \ @@ -119,7 +119,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom } \ \ { \ - ProjectCore::ProfilerManager::ScopeProfile scope(profiler, "ForEach Component"); \ + StreamFormat::ProfilerManager::ScopeProfile scope(profiler, "ForEach Component"); \ \ registry.ForEachUniqueComponent([](LECS::EntityId, BasicIntComponent& k) \ { \ @@ -127,7 +127,7 @@ struct LECS::Detail::ComponentStorageInfo : public DefaultCom }); \ } \ \ - ProjectCore::ProfilerManager::ProfilerFactory::ToJson(profiler); \ + StreamFormat::ProfilerManager::ProfilerFactory::ToJson(profiler); \ } BenchmarkTest(1'000, 1K); diff --git a/Tests/Tests.cpp b/Tests/Tests.cpp index 090a463..ad2d7f5 100644 --- a/Tests/Tests.cpp +++ b/Tests/Tests.cpp @@ -1,8 +1,8 @@ -#include "ProjectCore/Tester/TestSuite/AllTestSuite.h" +#include "StreamFormat/Tester/TestSuite/AllTestSuite.h" int main() { - ProjectCore::Tester::TestSuitesManager::Verbose = false; - return ProjectCore::Tester::TestSuitesManager::ExecAllTestSuites(); + StreamFormat::Tester::TestSuitesManager::Verbose = false; + return StreamFormat::Tester::TestSuitesManager::ExecAllTestSuites(); } diff --git a/premake5.lua b/premake5.lua index 18c67b7..5c0799c 100644 --- a/premake5.lua +++ b/premake5.lua @@ -10,11 +10,11 @@ Solution.Projects["LittleECS"].Defines = { "LECS_ENABLE_EACH" } Solution.Projects["LittleECS"].ProjectDependencies = { - "ProjectCore" + "StreamFormat" } project "LittleECS" - kind (Solution.Projects["ProjectCore"].Type) + kind (Solution.Projects["StreamFormat"].Type) language "C++" cppdialect "C++20" diff --git a/src/LittleECS/Core/Core.h b/src/LittleECS/Core/Core.h index 712a835..a012acc 100644 --- a/src/LittleECS/Core/Core.h +++ b/src/LittleECS/Core/Core.h @@ -13,8 +13,8 @@ #define LECS_LOGGER_ENABLE #endif -#ifdef LECS_USE_PROJECTCORE - #include "UseProjectCore.h" +#ifdef LECS_USE_STREAMFORMAT + #include "UseStreamFormat.h" #endif #ifdef LECS_LOGGER_ENABLE diff --git a/src/LittleECS/Core/UseProjectCore.h b/src/LittleECS/Core/UseStreamFormat.h similarity index 70% rename from src/LittleECS/Core/UseProjectCore.h rename to src/LittleECS/Core/UseStreamFormat.h index 0aaedaa..c105a64 100644 --- a/src/LittleECS/Core/UseProjectCore.h +++ b/src/LittleECS/Core/UseStreamFormat.h @@ -1,18 +1,18 @@ #pragma once -#include "ProjectCore/FMT.h" +#include "StreamFormat/FMT.h" #ifdef LECS_LOGGER_ENABLE - #include "ProjectCore/FLog.h" + #include "StreamFormat/FLog.h" namespace LECS { class Core { public: - static ProjectCore::FLog::BasicLogger& Logger() { return m_Logger; } + static StreamFormat::FLog::BasicLogger& Logger() { return m_Logger; } private: - static inline ProjectCore::FLog::BasicLogger m_Logger{}; + static inline StreamFormat::FLog::BasicLogger m_Logger{}; }; } diff --git a/src/LittleECS/Detail/ComponentId.h b/src/LittleECS/Detail/ComponentId.h index ab72db6..b1df616 100644 --- a/src/LittleECS/Detail/ComponentId.h +++ b/src/LittleECS/Detail/ComponentId.h @@ -49,7 +49,7 @@ namespace LECS } } -namespace ProjectCore::FMT +namespace StreamFormat::FMT { template struct FormatterType { diff --git a/src/LittleECS/Detail/EntityId.h b/src/LittleECS/Detail/EntityId.h index 352e6aa..7fa24b1 100644 --- a/src/LittleECS/Detail/EntityId.h +++ b/src/LittleECS/Detail/EntityId.h @@ -49,8 +49,8 @@ namespace LECS } } -#ifdef PROJECTCORE_FORMATTER_DECLARED - namespace ProjectCore::FMT +#ifdef STREAMFORMAT_FORMATTER_DECLARED + namespace StreamFormat::FMT { template struct FormatterType {