Przeglądaj źródła

Rename core module to cycle module

Patrick-Christopher Mattulat 1 tydzień temu
rodzic
commit
6bd47699b7

+ 13 - 5
CMakeLists.txt

@@ -13,7 +13,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
 # Global Project Settings
 ################################
 
-set(MODULE_NAME_CORE ls-atlantis-core)
+set(MODULE_NAME_CYCLE ls-atlantis-cycle)
 set(MODULE_NAME_INTERFACE ls-atlantis-interface)
 set(MODULE_NAME_WINDOW ls-atlantis-window)
 
@@ -37,12 +37,12 @@ endif ()
 
 ################################################################
 ################################################################
-# Module: Core
+# Module: Cycle
 ################################################################
 ################################################################
 
-include(cmake/ls-atlantis-core.cmake)
-include(cmake/ls-atlantis-core-tests.cmake)
+include(cmake/ls-atlantis-cycle.cmake)
+include(cmake/ls-atlantis-cycle-tests.cmake)
 
 ################################################################
 ################################################################
@@ -62,6 +62,14 @@ include(cmake/ls-atlantis-interface-tests.cmake)
 include(cmake/ls-atlantis-window.cmake)
 include(cmake/ls-atlantis-window-tests.cmake)
 
+################################################################
+################################################################
+# Example
+################################################################
+################################################################
+
+include(cmake/ls-atlantis-example.cmake)
+
 ################################################################
 ################################################################
 # All Tests
@@ -70,7 +78,7 @@ include(cmake/ls-atlantis-window-tests.cmake)
 
 add_custom_target(ls-atlantis-tests
     DEPENDS
-        ${MODULE_NAME_CORE}-tests
+        ${MODULE_NAME_CYCLE}-tests
         ${MODULE_NAME_INTERFACE}-tests
         ${MODULE_NAME_WINDOW}-tests
 )

+ 1 - 1
README.md

@@ -38,7 +38,7 @@ In Process: It contains the following modules:
 
 | Name                  | Description                                                                                                                                 |
 |-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
-| ls-atlantis-core      | This module provides functionalities like engine setup, game loop logic and engine run time information.                                    |
+| ls-atlantis-cycle     | This module provides functionalities like engine setup, game loop logic and engine run time information.                                    |
 | ls-atlantis-interface | This module provides all interfaces all other engine modules can implement. This would avoid circular dependencies through out the project. |
 | ls-atlantis-window    | This module provides functionalities for window creation and handling.                                                                      |
 

+ 0 - 42
cmake/ls-atlantis-core-tests.cmake

@@ -1,42 +0,0 @@
-################################################################
-################################################################
-# Module-Test: Core
-################################################################
-################################################################
-
-################################
-# Test Files: Core Module
-################################
-
-set(ATLANTIS_CORE_TEST_SOURCES
-        ${CMAKE_CURRENT_SOURCE_DIR}/test/core/StatusCodeOkTest.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/test/core/StatusCodeWindowApiLoadingFailedTest.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/test/core/StatusCodeWindowCreationFailedTest.cpp
-)
-
-################################
-# Test Case Creation: Core Module
-################################
-
-enable_testing()
-
-add_executable(${MODULE_NAME_CORE}-tests ${ATLANTIS_CORE_TEST_SOURCES})
-
-target_link_libraries(${MODULE_NAME_CORE}-tests PRIVATE
-    ${MODULE_NAME_CORE}
-    GTest::gtest_main
-)
-
-include(GoogleTest)
-gtest_discover_tests(${MODULE_NAME_CORE}-tests DISCOVERY_MODE PRE_TEST)
-
-if (WIN32)
-    add_custom_command(TARGET ${MODULE_NAME_CORE}-tests POST_BUILD
-        COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${MODULE_NAME_CORE}-tests>
-            $<TARGET_RUNTIME_DLLS:${MODULE_NAME_CORE}-tests>
-        COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${MODULE_NAME_CORE}-tests>
-            "$<$<CONFIG:Debug>:${LS_STD_DLLS_DEBUG}>"
-            "$<$<CONFIG:Release>:${LS_STD_DLLS_RELEASE}>"
-        COMMAND_EXPAND_LISTS
-    )
-endif ()

+ 42 - 0
cmake/ls-atlantis-cycle-tests.cmake

@@ -0,0 +1,42 @@
+################################################################
+################################################################
+# Module-Test: Cycle
+################################################################
+################################################################
+
+################################
+# Test Files: Cycle Module
+################################
+
+set(ATLANTIS_CYCLE_TEST_SOURCES
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/cycle/StatusCodeOkTest.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/cycle/StatusCodeWindowApiLoadingFailedTest.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/cycle/StatusCodeWindowCreationFailedTest.cpp
+)
+
+################################
+# Test Case Creation: Cycle Module
+################################
+
+enable_testing()
+
+add_executable(${MODULE_NAME_CYCLE}-tests ${ATLANTIS_CYCLE_TEST_SOURCES})
+
+target_link_libraries(${MODULE_NAME_CYCLE}-tests PRIVATE
+    ${MODULE_NAME_CYCLE}
+    GTest::gtest_main
+)
+
+include(GoogleTest)
+gtest_discover_tests(${MODULE_NAME_CYCLE}-tests DISCOVERY_MODE PRE_TEST)
+
+if (WIN32)
+    add_custom_command(TARGET ${MODULE_NAME_CYCLE}-tests POST_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${MODULE_NAME_CYCLE}-tests>
+            $<TARGET_RUNTIME_DLLS:${MODULE_NAME_CYCLE}-tests>
+        COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${MODULE_NAME_CYCLE}-tests>
+            "$<$<CONFIG:Debug>:${LS_STD_DLLS_DEBUG}>"
+            "$<$<CONFIG:Release>:${LS_STD_DLLS_RELEASE}>"
+        COMMAND_EXPAND_LISTS
+    )
+endif ()

+ 9 - 9
cmake/ls-atlantis-core.cmake → cmake/ls-atlantis-cycle.cmake

@@ -1,26 +1,26 @@
 ################################################################
 ################################################################
-# Module: Core
+# Module: Cycle
 ################################################################
 ################################################################
 
 ################################
-# Source Files: Core Module
+# Source Files: Cycle Module
 ################################
 
-set(ATLANTIS_CORE_SOURCES
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/core/StatusCodeOk.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/core/StatusCodeWindowApiLoadingFailed.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/core/StatusCodeWindowCreationFailed.cpp
+set(ATLANTIS_CYCLE_SOURCES
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/cycle/StatusCodeOk.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/cycle/StatusCodeWindowApiLoadingFailed.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/cycle/StatusCodeWindowCreationFailed.cpp
 )
 
 ################################
-# Library Creation: Core Module
+# Library Creation: Cycle Module
 ################################
 
-add_library(${MODULE_NAME_CORE} SHARED ${ATLANTIS_CORE_SOURCES})
+add_library(${MODULE_NAME_CYCLE} SHARED ${ATLANTIS_CYCLE_SOURCES})
 
-target_link_libraries(${MODULE_NAME_CORE} PUBLIC
+target_link_libraries(${MODULE_NAME_CYCLE} PUBLIC
     ${MODULE_NAME_INTERFACE}
     $<$<CONFIG:Debug>:ls-std::ls-std-core-d>
     $<$<CONFIG:Release>:ls-std::ls-std-core>

+ 1 - 1
cmake/ls-atlantis-window.cmake

@@ -20,7 +20,7 @@ set(ATLANTIS_WINDOW_SOURCES
 add_library(${MODULE_NAME_WINDOW} SHARED ${ATLANTIS_WINDOW_SOURCES})
 
 target_link_libraries(${MODULE_NAME_WINDOW} PUBLIC
-    ${MODULE_NAME_CORE}
+    ${MODULE_NAME_CYCLE}
     ${MODULE_NAME_INTERFACE}
     SDL3::SDL3
 )

+ 3 - 3
include/core/StatusCodeOk.hpp → include/cycle/StatusCodeOk.hpp

@@ -3,13 +3,13 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#ifndef LS_ATLANTIS_ENGINE_CORE_STATUS_CODE_HPP
-#define LS_ATLANTIS_ENGINE_CORE_STATUS_CODE_HPP
+#ifndef LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_HPP
+#define LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_HPP
 
 #include <Export.hpp>
 #include <interface/AStatusCode.hpp>
 
-namespace ls::atlantis::core
+namespace ls::atlantis::cycle
 {
   class LS_ATLANTIS_DYNAMIC_GOAL StatusCodeOk : public ls::atlantis::interfaces::AStatusCode
   {

+ 3 - 3
include/core/StatusCodeWindowApiLoadingFailed.hpp → include/cycle/StatusCodeWindowApiLoadingFailed.hpp

@@ -3,13 +3,13 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#ifndef LS_ATLANTIS_ENGINE_WINDOW_STATUS_CODE_WINDOW_API_LOADING_FAILED_HPP
-#define LS_ATLANTIS_ENGINE_WINDOW_STATUS_CODE_WINDOW_API_LOADING_FAILED_HPP
+#ifndef LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_WINDOW_API_LOADING_FAILED_HPP
+#define LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_WINDOW_API_LOADING_FAILED_HPP
 
 #include <Export.hpp>
 #include <interface/AStatusCode.hpp>
 
-namespace ls::atlantis::core
+namespace ls::atlantis::cycle
 {
   class LS_ATLANTIS_DYNAMIC_GOAL StatusCodeWindowApiLoadingFailed : public ls::atlantis::interfaces::AStatusCode
   {

+ 3 - 3
include/core/StatusCodeWindowCreationFailed.hpp → include/cycle/StatusCodeWindowCreationFailed.hpp

@@ -3,13 +3,13 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#ifndef LS_ATLANTIS_ENGINE_CORE_STATUS_CODE_WINDOW_CREATION_FAILED_HPP
-#define LS_ATLANTIS_ENGINE_CORE_STATUS_CODE_WINDOW_CREATION_FAILED_HPP
+#ifndef LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_WINDOW_CREATION_FAILED_HPP
+#define LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODE_WINDOW_CREATION_FAILED_HPP
 
 #include <Export.hpp>
 #include <interface/AStatusCode.hpp>
 
-namespace ls::atlantis::core
+namespace ls::atlantis::cycle
 {
   class LS_ATLANTIS_DYNAMIC_GOAL StatusCodeWindowCreationFailed : public ls::atlantis::interfaces::AStatusCode
   {

+ 3 - 3
include/core/StatusCodes.hpp → include/cycle/StatusCodes.hpp

@@ -3,10 +3,10 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#ifndef LS_ATLANTIS_ENGINE_STATUS_CODES_HPP
-#define LS_ATLANTIS_ENGINE_STATUS_CODES_HPP
+#ifndef LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODES_HPP
+#define LS_ATLANTIS_ENGINE_CYCLE_STATUS_CODES_HPP
 
-namespace ls::atlantis::core
+namespace ls::atlantis::cycle
 {
   enum StatusCodes
   {

+ 4 - 5
source/core/StatusCodeOk.cpp → source/cycle/StatusCodeOk.cpp

@@ -3,13 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeOk.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeOk.hpp>
+#include <cycle/StatusCodes.hpp>
 
-using ls::atlantis::core::StatusCodeOk;
+using ls::atlantis::cycle::StatusCodeOk;
+using ls::atlantis::cycle::StatusCodes;
 using ls::atlantis::interfaces::AStatusCode;
-using ::std::move;
-using ::std::string;
 
 StatusCodeOk::StatusCodeOk() : AStatusCode(StatusCodes::OK, "ok")
 {}

+ 4 - 4
source/core/StatusCodeWindowApiLoadingFailed.cpp → source/cycle/StatusCodeWindowApiLoadingFailed.cpp

@@ -3,12 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeWindowApiLoadingFailed.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeWindowApiLoadingFailed.hpp>
+#include <cycle/StatusCodes.hpp>
 
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodeWindowApiLoadingFailed;
+using ls::atlantis::cycle::StatusCodes;
 using ls::atlantis::interfaces::AStatusCode;
-using ls::atlantis::core::StatusCodeWindowApiLoadingFailed;
 
 StatusCodeWindowApiLoadingFailed::StatusCodeWindowApiLoadingFailed() : AStatusCode(StatusCodes::WINDOW_API_LOADING_FAILED, "window api loading failed")
 {}

+ 4 - 4
source/core/StatusCodeWindowCreationFailed.cpp → source/cycle/StatusCodeWindowCreationFailed.cpp

@@ -3,12 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeWindowCreationFailed.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeWindowCreationFailed.hpp>
+#include <cycle/StatusCodes.hpp>
 
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodeWindowCreationFailed;
+using ls::atlantis::cycle::StatusCodes;
 using ls::atlantis::interfaces::AStatusCode;
-using ls::atlantis::core::StatusCodeWindowCreationFailed;
 
 StatusCodeWindowCreationFailed::StatusCodeWindowCreationFailed() : AStatusCode(StatusCodes::WINDOW_CREATION_FAILED, "window creation failed")
 {}

+ 6 - 6
source/window/SdlWindowApi.cpp

@@ -4,16 +4,16 @@
  */
 
 #include <SDL3/SDL.h>
-#include <core/StatusCodeOk.hpp>
-#include <core/StatusCodeWindowApiLoadingFailed.hpp>
-#include <core/StatusCodeWindowCreationFailed.hpp>
+#include <cycle/StatusCodeOk.hpp>
+#include <cycle/StatusCodeWindowApiLoadingFailed.hpp>
+#include <cycle/StatusCodeWindowCreationFailed.hpp>
 #include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
 #include <window/SdlApi.hpp>
 #include <window/SdlWindowApi.hpp>
 
-using ls::atlantis::core::StatusCodeOk;
-using ls::atlantis::core::StatusCodeWindowApiLoadingFailed;
-using ls::atlantis::core::StatusCodeWindowCreationFailed;
+using ls::atlantis::cycle::StatusCodeOk;
+using ls::atlantis::cycle::StatusCodeWindowApiLoadingFailed;
+using ls::atlantis::cycle::StatusCodeWindowCreationFailed;
 using ls::atlantis::interfaces::AStatusCode;
 using ls::atlantis::interfaces::ISdlApi;
 using ls::std::core::NullPointerArgumentEvaluator;

+ 4 - 4
test/core/StatusCodeOkTest.cpp → test/cycle/StatusCodeOkTest.cpp

@@ -3,12 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeOk.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeOk.hpp>
+#include <cycle/StatusCodes.hpp>
 #include <gtest/gtest.h>
 
-using ls::atlantis::core::StatusCodeOk;
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodeOk;
+using ls::atlantis::cycle::StatusCodes;
 using ::std::string;
 using ::testing::Test;
 

+ 4 - 4
test/core/StatusCodeWindowApiLoadingFailedTest.cpp → test/cycle/StatusCodeWindowApiLoadingFailedTest.cpp

@@ -3,12 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeWindowApiLoadingFailed.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeWindowApiLoadingFailed.hpp>
+#include <cycle/StatusCodes.hpp>
 #include <gtest/gtest.h>
 
-using ls::atlantis::core::StatusCodeWindowApiLoadingFailed;
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodeWindowApiLoadingFailed;
+using ls::atlantis::cycle::StatusCodes;
 using ::std::string;
 using ::testing::Test;
 

+ 4 - 4
test/core/StatusCodeWindowCreationFailedTest.cpp → test/cycle/StatusCodeWindowCreationFailedTest.cpp

@@ -3,12 +3,12 @@
  * e-mail: webmaster@lynarstudios.com
  */
 
-#include <core/StatusCodeWindowCreationFailed.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodeWindowCreationFailed.hpp>
+#include <cycle/StatusCodes.hpp>
 #include <gtest/gtest.h>
 
-using ls::atlantis::core::StatusCodeWindowCreationFailed;
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodeWindowCreationFailed;
+using ls::atlantis::cycle::StatusCodes;
 using ::std::string;
 using ::testing::Test;
 

+ 2 - 2
test/window/SdlWindowApiTest.cpp

@@ -7,12 +7,12 @@
 #include <gtest/gtest.h>
 #include <test/window/mock/SdlApiMock.hpp>
 #include <window/SdlWindowApi.hpp>
-#include <core/StatusCodes.hpp>
+#include <cycle/StatusCodes.hpp>
 #include <ls-std/core/exception/IllegalArgumentException.hpp>
 #include <interface/AStatusCode.hpp>
 #include <string>
 
-using ls::atlantis::core::StatusCodes;
+using ls::atlantis::cycle::StatusCodes;
 using ls::atlantis::interfaces::AStatusCode;
 using ls::atlantis::interfaces::ISdlApi;
 using ls::atlantis::window::SdlWindowApi;