瀏覽代碼

Move public headers into include folder

Kajetan Johannes Hammerle 3 月之前
父節點
當前提交
44a697dbe8
共有 90 個文件被更改,包括 176 次插入124 次删除
  1. 44 0
      CMakeLists.txt
  2. 1 1
      include/core/data/Array.hpp
  3. 2 2
      include/core/data/ArrayList.hpp
  4. 1 1
      include/core/data/BitArray.hpp
  5. 1 1
      include/core/data/Components.hpp
  6. 3 3
      include/core/data/HashMap.hpp
  7. 1 1
      include/core/data/LinkedList.hpp
  8. 3 3
      include/core/data/List.hpp
  9. 5 5
      include/core/data/ProbingHashMap.hpp
  10. 2 2
      include/core/data/RingBuffer.hpp
  11. 2 2
      include/core/data/Stack.hpp
  12. 1 1
      include/core/io/File.hpp
  13. 1 1
      include/core/io/FileReader.hpp
  14. 2 2
      include/core/math/Box.hpp
  15. 1 1
      include/core/math/BufferedValue.hpp
  16. 3 3
      include/core/math/Frustum.hpp
  17. 1 1
      include/core/math/Math.hpp
  18. 2 2
      include/core/math/Matrix.hpp
  19. 2 2
      include/core/math/MatrixStack.hpp
  20. 2 2
      include/core/math/Plane.hpp
  21. 2 2
      include/core/math/Quaternion.hpp
  22. 2 2
      include/core/math/Vector.hpp
  23. 1 1
      include/core/math/View.hpp
  24. 3 3
      include/core/thread/Thread.hpp
  25. 0 0
      include/core/utils/AlignedData.hpp
  26. 4 4
      include/core/utils/ArrayString.hpp
  27. 2 2
      include/core/utils/Buffer.hpp
  28. 0 0
      include/core/utils/Check.hpp
  29. 3 3
      include/core/utils/Clock.hpp
  30. 0 0
      include/core/utils/Color.hpp
  31. 0 0
      include/core/utils/Error.hpp
  32. 1 1
      include/core/utils/HashCode.hpp
  33. 1 1
      include/core/utils/Logger.hpp
  34. 0 0
      include/core/utils/Meta.hpp
  35. 0 0
      include/core/utils/New.hpp
  36. 1 1
      include/core/utils/Random.hpp
  37. 0 0
      include/core/utils/Types.hpp
  38. 0 0
      include/core/utils/UniquePointer.hpp
  39. 2 2
      include/core/utils/Utility.hpp
  40. 2 2
      src/data/BitArray.cpp
  41. 2 2
      src/io/FileReader.cpp
  42. 1 1
      src/math/Box.cpp
  43. 1 1
      src/math/Frustum.cpp
  44. 1 1
      src/math/Math.cpp
  45. 2 2
      src/math/Matrix.cpp
  46. 1 1
      src/math/Plane.cpp
  47. 1 1
      src/math/Quaternion.cpp
  48. 1 1
      src/math/Vector.cpp
  49. 1 1
      src/math/View.cpp
  50. 4 4
      src/performance/Main.cpp
  51. 2 2
      src/test/Main.cpp
  52. 3 3
      src/test/Test.hpp
  53. 1 1
      src/tests/ArrayListTests.cpp
  54. 2 2
      src/tests/ArrayStringTests.cpp
  55. 1 1
      src/tests/ArrayTests.cpp
  56. 1 1
      src/tests/BitArrayTests.cpp
  57. 1 1
      src/tests/BoxTests.cpp
  58. 1 1
      src/tests/BufferTests.cpp
  59. 2 2
      src/tests/BufferedValueTests.cpp
  60. 1 1
      src/tests/ClockTests.cpp
  61. 1 1
      src/tests/ColorTests.cpp
  62. 1 1
      src/tests/ComponentsTests.cpp
  63. 1 1
      src/tests/FileReaderTests.cpp
  64. 1 1
      src/tests/FrustumTests.cpp
  65. 1 1
      src/tests/HashMapTests.cpp
  66. 1 1
      src/tests/LinkedListTests.cpp
  67. 1 1
      src/tests/ListTests.cpp
  68. 1 1
      src/tests/MathTests.cpp
  69. 1 1
      src/tests/MatrixStackTests.cpp
  70. 1 1
      src/tests/MatrixTests.cpp
  71. 1 1
      src/tests/PlaneTests.cpp
  72. 1 1
      src/tests/ProbingHashMapTests.cpp
  73. 1 1
      src/tests/QuaternionTests.cpp
  74. 2 2
      src/tests/RandomTests.cpp
  75. 1 1
      src/tests/RingBufferTests.cpp
  76. 1 1
      src/tests/StackTests.cpp
  77. 1 1
      src/tests/ThreadTests.cpp
  78. 1 1
      src/tests/UniquePointerTests.cpp
  79. 1 1
      src/tests/UtilityTests.cpp
  80. 1 1
      src/tests/VectorTests.cpp
  81. 1 1
      src/tests/ViewTests.cpp
  82. 1 1
      src/thread/Thread.cpp
  83. 3 3
      src/utils/Buffer.cpp
  84. 1 1
      src/utils/Clock.cpp
  85. 1 1
      src/utils/Error.cpp
  86. 1 1
      src/utils/Logger.cpp
  87. 1 1
      src/utils/New.cpp
  88. 1 1
      src/utils/Random.cpp
  89. 1 1
      src/utils/Utility.cpp
  90. 10 2
      tasks

+ 44 - 0
CMakeLists.txt

@@ -164,6 +164,50 @@ target_compile_options(core PUBLIC
 )
 target_compile_definitions(core PUBLIC CORE_LOG_LEVEL=4)
 target_link_libraries(core PUBLIC -nodefaultlibs c m)
+target_sources(core PUBLIC 
+    FILE_SET HEADERS
+    BASE_DIRS include
+    FILES 
+        ./include/core/data/Stack.hpp
+        ./include/core/data/HashMap.hpp
+        ./include/core/data/Components.hpp
+        ./include/core/data/ArrayList.hpp
+        ./include/core/data/ProbingHashMap.hpp
+        ./include/core/data/List.hpp
+        ./include/core/data/LinkedList.hpp
+        ./include/core/data/BitArray.hpp
+        ./include/core/data/Array.hpp
+        ./include/core/data/RingBuffer.hpp
+        ./include/core/thread/Thread.hpp
+        ./include/core/utils/HashCode.hpp
+        ./include/core/utils/New.hpp
+        ./include/core/utils/Check.hpp
+        ./include/core/utils/Buffer.hpp
+        ./include/core/utils/Random.hpp
+        ./include/core/utils/UniquePointer.hpp
+        ./include/core/utils/Types.hpp
+        ./include/core/utils/Color.hpp
+        ./include/core/utils/Logger.hpp
+        ./include/core/utils/ArrayString.hpp
+        ./include/core/utils/Utility.hpp
+        ./include/core/utils/Meta.hpp
+        ./include/core/utils/AlignedData.hpp
+        ./include/core/utils/Clock.hpp
+        ./include/core/utils/Error.hpp
+        ./include/core/math/Quaternion.hpp
+        ./include/core/math/Box.hpp
+        ./include/core/math/Frustum.hpp
+        ./include/core/math/Vector.hpp
+        ./include/core/math/Matrix.hpp
+        ./include/core/math/View.hpp
+        ./include/core/math/BufferedValue.hpp
+        ./include/core/math/Plane.hpp
+        ./include/core/math/MatrixStack.hpp
+        ./include/core/math/Math.hpp
+        ./include/core/io/File.hpp
+        ./include/core/io/FileReader.hpp
+)
+install(TARGETS core FILE_SET HEADERS)
 
 add_executable(test ${SRC_TESTS})
 target_link_libraries(test PRIVATE core)

+ 1 - 1
src/data/Array.hpp → include/core/data/Array.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_ARRAY_HPP
 #define CORE_ARRAY_HPP
 
-#include "utils/ArrayString.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     template<typename T, int N>

+ 2 - 2
src/data/ArrayList.hpp → include/core/data/ArrayList.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_ARRAYLIST_HPP
 #define CORE_ARRAYLIST_HPP
 
-#include "utils/AlignedData.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/utils/AlignedData.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     template<typename T, int N>

+ 1 - 1
src/data/BitArray.hpp → include/core/data/BitArray.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_BIT_ARRAY_HPP
 #define CORE_BIT_ARRAY_HPP
 
-#include "utils/ArrayString.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     class BitArray final {

+ 1 - 1
src/data/Components.hpp → include/core/data/Components.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_COMPONENTS_HPP
 #define CORE_COMPONENTS_HPP
 
-#include "data/HashMap.hpp"
+#include "core/data/HashMap.hpp"
 
 namespace Core {
     using Entity = int;

+ 3 - 3
src/data/HashMap.hpp → include/core/data/HashMap.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_HPPASHMAP_HPP
 #define CORE_HPPASHMAP_HPP
 
-#include "data/LinkedList.hpp"
-#include "data/List.hpp"
-#include "utils/HashCode.hpp"
+#include "core/data/LinkedList.hpp"
+#include "core/data/List.hpp"
+#include "core/utils/HashCode.hpp"
 
 namespace Core {
     template<typename K, typename V>

+ 1 - 1
src/data/LinkedList.hpp → include/core/data/LinkedList.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_LINKED_LIST_HPP
 #define CORE_LINKED_LIST_HPP
 
-#include "utils/ArrayString.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     template<typename T>

+ 3 - 3
src/data/List.hpp → include/core/data/List.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_LIST_HPP
 #define CORE_LIST_HPP
 
-#include "utils/AlignedData.hpp"
-#include "utils/ArrayString.hpp"
-#include "utils/New.hpp"
+#include "core/utils/AlignedData.hpp"
+#include "core/utils/ArrayString.hpp"
+#include "core/utils/New.hpp"
 
 namespace Core {
     template<typename T>

+ 5 - 5
src/data/ProbingHashMap.hpp → include/core/data/ProbingHashMap.hpp

@@ -1,11 +1,11 @@
 #ifndef CORE_PROBING_HPPASHMAP_HPP
 #define CORE_PROBING_HPPASHMAP_HPP
 
-#include "data/List.hpp"
-#include "utils/AlignedData.hpp"
-#include "utils/ArrayString.hpp"
-#include "utils/HashCode.hpp"
-#include "utils/Logger.hpp"
+#include "core/data/List.hpp"
+#include "core/utils/AlignedData.hpp"
+#include "core/utils/ArrayString.hpp"
+#include "core/utils/HashCode.hpp"
+#include "core/utils/Logger.hpp"
 
 namespace Core {
     template<typename K, typename V>

+ 2 - 2
src/data/RingBuffer.hpp → include/core/data/RingBuffer.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_RINGBUFFER_HPP
 #define CORE_RINGBUFFER_HPP
 
-#include "utils/AlignedData.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/utils/AlignedData.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     template<typename T, int N>

+ 2 - 2
src/data/Stack.hpp → include/core/data/Stack.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_STACK_HPP
 #define CORE_STACK_HPP
 
-#include "data/ArrayList.hpp"
-#include "data/List.hpp"
+#include "core/data/ArrayList.hpp"
+#include "core/data/List.hpp"
 
 namespace Core {
     namespace Internal {

+ 1 - 1
src/io/File.hpp → include/core/io/File.hpp

@@ -3,7 +3,7 @@
 
 #include <limits.h>
 
-#include "utils/ArrayString.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     using Path = String8<PATH_MAX>;

+ 1 - 1
src/io/FileReader.hpp → include/core/io/FileReader.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_FILE_READER_HPP
 #define CORE_FILE_READER_HPP
 
-#include "io/File.hpp"
+#include "core/io/File.hpp"
 
 namespace Core {
     using Path = String8<PATH_MAX>;

+ 2 - 2
src/math/Box.hpp → include/core/math/Box.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_BOX_HPP
 #define CORE_BOX_HPP
 
-#include "math/Vector.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/math/Vector.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     class Box final {

+ 1 - 1
src/math/BufferedValue.hpp → include/core/math/BufferedValue.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_BUFFERED_VALUE_HPP
 #define CORE_BUFFERED_VALUE_HPP
 
-#include "math/Math.hpp"
+#include "core/math/Math.hpp"
 
 namespace Core {
     template<typename T>

+ 3 - 3
src/math/Frustum.hpp → include/core/math/Frustum.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_FRUSTUM_HPP
 #define CORE_FRUSTUM_HPP
 
-#include "data/Array.hpp"
-#include "math/Matrix.hpp"
-#include "math/Plane.hpp"
+#include "core/data/Array.hpp"
+#include "core/math/Matrix.hpp"
+#include "core/math/Plane.hpp"
 
 namespace Core {
     class Frustum final {

+ 1 - 1
src/math/Math.hpp → include/core/math/Math.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_MATH_HPP
 #define CORE_MATH_HPP
 
-#include "utils/Meta.hpp"
+#include "core/utils/Meta.hpp"
 
 namespace Core::Math {
     template<typename T>

+ 2 - 2
src/math/Matrix.hpp → include/core/math/Matrix.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_MATRIX_HPP
 #define CORE_MATRIX_HPP
 
-#include "math/Quaternion.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/math/Quaternion.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     class Matrix final {

+ 2 - 2
src/math/MatrixStack.hpp → include/core/math/MatrixStack.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_MATRIX_STACK_HPP
 #define CORE_MATRIX_STACK_HPP
 
-#include "data/ArrayList.hpp"
-#include "math/Matrix.hpp"
+#include "core/data/ArrayList.hpp"
+#include "core/math/Matrix.hpp"
 
 namespace Core {
     template<int N>

+ 2 - 2
src/math/Plane.hpp → include/core/math/Plane.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_PLANE_HPP
 #define CORE_PLANE_HPP
 
-#include "math/Vector.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/math/Vector.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     class Plane final {

+ 2 - 2
src/math/Quaternion.hpp → include/core/math/Quaternion.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_QUATERNION_HPP
 #define CORE_QUATERNION_HPP
 
-#include "math/Vector.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/math/Vector.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     class Quaternion final {

+ 2 - 2
src/math/Vector.hpp → include/core/math/Vector.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_VECTOR_HPP
 #define CORE_VECTOR_HPP
 
-#include "math/Math.hpp"
-#include "utils/ArrayString.hpp"
+#include "core/math/Math.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core {
     template<int N, typename T>

+ 1 - 1
src/math/View.hpp → include/core/math/View.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_VIEW_HPP
 #define CORE_VIEW_HPP
 
-#include "math/Matrix.hpp"
+#include "core/math/Matrix.hpp"
 
 namespace Core {
     class View final {

+ 3 - 3
src/thread/Thread.hpp → include/core/thread/Thread.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_THREAD_HPP
 #define CORE_THREAD_HPP
 
-#include "utils/AlignedData.hpp"
-#include "utils/Check.hpp"
-#include "utils/Error.hpp"
+#include "core/utils/AlignedData.hpp"
+#include "core/utils/Check.hpp"
+#include "core/utils/Error.hpp"
 
 namespace Core {
     class Thread final {

+ 0 - 0
src/utils/AlignedData.hpp → include/core/utils/AlignedData.hpp


+ 4 - 4
src/utils/ArrayString.hpp → include/core/utils/ArrayString.hpp

@@ -1,10 +1,10 @@
 #ifndef CORE_ARRAY_STRING_HPP
 #define CORE_ARRAY_STRING_HPP
 
-#include "math/Math.hpp"
-#include "utils/Check.hpp"
-#include "utils/Types.hpp"
-#include "utils/Utility.hpp"
+#include "core/math/Math.hpp"
+#include "core/utils/Check.hpp"
+#include "core/utils/Types.hpp"
+#include "core/utils/Utility.hpp"
 
 namespace Core {
     template<typename T>

+ 2 - 2
src/utils/Buffer.hpp → include/core/utils/Buffer.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_BUFFER_HPP
 #define CORE_BUFFER_HPP
 
-#include "utils/Check.hpp"
-#include "utils/Error.hpp"
+#include "core/utils/Check.hpp"
+#include "core/utils/Error.hpp"
 
 namespace Core {
     class Buffer final {

+ 0 - 0
src/utils/Check.hpp → include/core/utils/Check.hpp


+ 3 - 3
src/utils/Clock.hpp → include/core/utils/Clock.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_CLOCK_HPP
 #define CORE_CLOCK_HPP
 
-#include "data/Array.hpp"
-#include "utils/Check.hpp"
-#include "utils/Types.hpp"
+#include "core/data/Array.hpp"
+#include "core/utils/Check.hpp"
+#include "core/utils/Types.hpp"
 
 namespace Core {
     struct Clock final {

+ 0 - 0
src/utils/Color.hpp → include/core/utils/Color.hpp


+ 0 - 0
src/utils/Error.hpp → include/core/utils/Error.hpp


+ 1 - 1
src/utils/HashCode.hpp → include/core/utils/HashCode.hpp

@@ -3,7 +3,7 @@
 
 #include <limits.h>
 
-#include "utils/Types.hpp"
+#include "core/utils/Types.hpp"
 
 namespace Core {
     template<typename H>

+ 1 - 1
src/utils/Logger.hpp → include/core/utils/Logger.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_LOGGER_HPP
 #define CORE_LOGGER_HPP
 
-#include "utils/ArrayString.hpp"
+#include "core/utils/ArrayString.hpp"
 
 namespace Core::Logger {
     enum class Level { ERROR, WARNING, INFO, DEBUG };

+ 0 - 0
src/utils/Meta.hpp → include/core/utils/Meta.hpp


+ 0 - 0
src/utils/New.hpp → include/core/utils/New.hpp


+ 1 - 1
src/utils/Random.hpp → include/core/utils/Random.hpp

@@ -1,7 +1,7 @@
 #ifndef CORE_RANDOM_HPP
 #define CORE_RANDOM_HPP
 
-#include "utils/Types.hpp"
+#include "core/utils/Types.hpp"
 
 namespace Core {
     struct Random final {

+ 0 - 0
src/utils/Types.hpp → include/core/utils/Types.hpp


+ 0 - 0
src/utils/UniquePointer.hpp → include/core/utils/UniquePointer.hpp


+ 2 - 2
src/utils/Utility.hpp → include/core/utils/Utility.hpp

@@ -1,8 +1,8 @@
 #ifndef CORE_UTILITY_HPP
 #define CORE_UTILITY_HPP
 
-#include "utils/Check.hpp"
-#include "utils/Error.hpp"
+#include "core/utils/Check.hpp"
+#include "core/utils/Error.hpp"
 
 #define CORE_SIZE(t) static_cast<int>(sizeof(t))
 

+ 2 - 2
src/data/BitArray.cpp

@@ -1,6 +1,6 @@
-#include "data/BitArray.hpp"
+#include "core/data/BitArray.hpp"
 
-#include "math/Math.hpp"
+#include "core/math/Math.hpp"
 
 static int roundUpDivide(int a, int b) {
     if(a % b == 0) {

+ 2 - 2
src/io/FileReader.cpp

@@ -1,8 +1,8 @@
-#include "io/FileReader.hpp"
+#include "core/io/FileReader.hpp"
 
 #include <stdio.h>
 
-#include "utils/Logger.hpp"
+#include "core/utils/Logger.hpp"
 
 Core::FileReader::FileReader() : file(nullptr), path() {
 }

+ 1 - 1
src/math/Box.cpp

@@ -1,4 +1,4 @@
-#include "math/Box.hpp"
+#include "core/math/Box.hpp"
 
 Core::Box::Box(const Vector3& min_, const Vector3& max_)
     : min(min_), max(max_) {

+ 1 - 1
src/math/Frustum.cpp

@@ -1,4 +1,4 @@
-#include "math/Frustum.hpp"
+#include "core/math/Frustum.hpp"
 
 Core::Frustum::Frustum(float fieldOfView, float nearClip_, float farClip_)
     : projection(), planes(),

+ 1 - 1
src/math/Math.cpp

@@ -1,4 +1,4 @@
-#include "math/Math.hpp"
+#include "core/math/Math.hpp"
 
 #include <math.h>
 

+ 2 - 2
src/math/Matrix.cpp

@@ -1,6 +1,6 @@
-#include "math/Matrix.hpp"
+#include "core/math/Matrix.hpp"
 
-#include "math/Math.hpp"
+#include "core/math/Math.hpp"
 
 Core::Matrix::Matrix() {
     unit();

+ 1 - 1
src/math/Plane.cpp

@@ -1,4 +1,4 @@
-#include "math/Plane.hpp"
+#include "core/math/Plane.hpp"
 
 Core::Plane::Plane() : abc(), d(0) {
 }

+ 1 - 1
src/math/Quaternion.cpp

@@ -1,4 +1,4 @@
-#include "math/Quaternion.hpp"
+#include "core/math/Quaternion.hpp"
 
 Core::Quaternion::Quaternion() : xyz(), w(1.0f) {
 }

+ 1 - 1
src/math/Vector.cpp

@@ -1,4 +1,4 @@
-#include "math/Vector.hpp"
+#include "core/math/Vector.hpp"
 
 template<>
 Core::Vector3& Core::Vector3::setAngles(float lengthAngle, float widthAngle) {

+ 1 - 1
src/math/View.cpp

@@ -1,4 +1,4 @@
-#include "math/View.hpp"
+#include "core/math/View.hpp"
 
 void Core::View::updateDirections(float lengthAngle, float widthAngle) {
     back.setAngles(lengthAngle, widthAngle);

+ 4 - 4
src/performance/Main.cpp

@@ -1,8 +1,8 @@
-#include "data/HashMap.hpp"
-#include "data/ProbingHashMap.hpp"
+#include "core/data/HashMap.hpp"
+#include "core/data/ProbingHashMap.hpp"
+#include "core/utils/Clock.hpp"
+#include "core/utils/Random.hpp"
 #include "test/Test.hpp"
-#include "utils/Clock.hpp"
-#include "utils/Random.hpp"
 
 using Millis = Core::Clock::Nanos;
 

+ 2 - 2
src/test/Main.cpp

@@ -1,3 +1,5 @@
+#include "core/utils/ArrayString.hpp"
+#include "core/utils/Utility.hpp"
 #include "test/Test.hpp"
 #include "tests/ArrayListTests.hpp"
 #include "tests/ArrayStringTests.hpp"
@@ -28,8 +30,6 @@
 #include "tests/UtilityTests.hpp"
 #include "tests/VectorTests.hpp"
 #include "tests/ViewTests.hpp"
-#include "utils/ArrayString.hpp"
-#include "utils/Utility.hpp"
 
 static void onExit(int code, void* data) {
     unsigned int i = *static_cast<unsigned int*>(data);

+ 3 - 3
src/test/Test.hpp

@@ -1,9 +1,9 @@
 #ifndef CORE_TEST_HPP
 #define CORE_TEST_HPP
 
-#include "data/HashMap.hpp"
-#include "math/Vector.hpp"
-#include "utils/Logger.hpp"
+#include "core/data/HashMap.hpp"
+#include "core/math/Vector.hpp"
+#include "core/utils/Logger.hpp"
 
 namespace Core::Test {
     namespace Internal {

+ 1 - 1
src/tests/ArrayListTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/ArrayListTests.hpp"
 
-#include "data/ArrayList.hpp"
+#include "core/data/ArrayList.hpp"
 #include "test/Test.hpp"
 
 using IntList = Core::ArrayList<int, 20>;

+ 2 - 2
src/tests/ArrayStringTests.cpp

@@ -1,8 +1,8 @@
 #include "tests/ArrayStringTests.hpp"
 
-#include "data/HashMap.hpp"
+#include "core/data/HashMap.hpp"
+#include "core/utils/ArrayString.hpp"
 #include "test/Test.hpp"
-#include "utils/ArrayString.hpp"
 
 using String8 = Core::String8<128>;
 using String32 = Core::String32<128>;

+ 1 - 1
src/tests/ArrayTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/ArrayTests.hpp"
 
-#include "data/Array.hpp"
+#include "core/data/Array.hpp"
 #include "test/Test.hpp"
 
 static void testToString1() {

+ 1 - 1
src/tests/BitArrayTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/BitArrayTests.hpp"
 
-#include "data/BitArray.hpp"
+#include "core/data/BitArray.hpp"
 #include "test/Test.hpp"
 
 static void testSetRead() {

+ 1 - 1
src/tests/BoxTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/BoxTests.hpp"
 
-#include "math/Box.hpp"
+#include "core/math/Box.hpp"
 #include "test/Test.hpp"
 
 static void testInit() {

+ 1 - 1
src/tests/BufferTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/BufferTests.hpp"
 
+#include "core/utils/Buffer.hpp"
 #include "test/Test.hpp"
-#include "utils/Buffer.hpp"
 
 static constexpr int SIZE_TYPES =
     sizeof(int) + sizeof(long) + sizeof(float) + sizeof(double);

+ 2 - 2
src/tests/BufferedValueTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/BufferedValueTests.hpp"
 
-#include "math/BufferedValue.hpp"
-#include "math/Vector.hpp"
+#include "core/math/BufferedValue.hpp"
+#include "core/math/Vector.hpp"
 #include "test/Test.hpp"
 
 const float eps = 0.0001f;

+ 1 - 1
src/tests/ClockTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/ClockTests.hpp"
 
+#include "core/utils/Clock.hpp"
 #include "test/Test.hpp"
-#include "utils/Clock.hpp"
 
 static void testUpdate() {
     Core::Clock c;

+ 1 - 1
src/tests/ColorTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/ColorTests.hpp"
 
+#include "core/utils/Color.hpp"
 #include "test/Test.hpp"
-#include "utils/Color.hpp"
 
 const float eps = 0.0001f;
 

+ 1 - 1
src/tests/ComponentsTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/ComponentsTests.hpp"
 
-#include "data/Components.hpp"
+#include "core/data/Components.hpp"
 #include "test/Test.hpp"
 
 using IntComponent = Core::Components<int>;

+ 1 - 1
src/tests/FileReaderTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/FileReaderTests.hpp"
 
-#include "io/FileReader.hpp"
+#include "core/io/FileReader.hpp"
 #include "test/Test.hpp"
 
 static constexpr const char* TEST_FILE = "../src/tests/resources/test";

+ 1 - 1
src/tests/FrustumTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/FrustumTests.hpp"
 
-#include "math/Frustum.hpp"
+#include "core/math/Frustum.hpp"
 #include "test/Test.hpp"
 
 using V3 = Core::Vector3;

+ 1 - 1
src/tests/HashMapTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/HashMapTests.hpp"
 
-#include "data/HashMap.hpp"
+#include "core/data/HashMap.hpp"
 #include "test/Test.hpp"
 
 using IntMap = Core::HashMap<int, int>;

+ 1 - 1
src/tests/LinkedListTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/LinkedListTests.hpp"
 
-#include "data/LinkedList.hpp"
+#include "core/data/LinkedList.hpp"
 #include "test/Test.hpp"
 
 struct LinkedListTester final {

+ 1 - 1
src/tests/ListTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/ListTests.hpp"
 
-#include "data/List.hpp"
+#include "core/data/List.hpp"
 #include "test/Test.hpp"
 
 using IntList = Core::List<int>;

+ 1 - 1
src/tests/MathTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/MathTests.hpp"
 
-#include "math/Math.hpp"
+#include "core/math/Math.hpp"
 #include "test/Test.hpp"
 
 constexpr float eps = 0.0001f;

+ 1 - 1
src/tests/MatrixStackTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/MatrixStackTests.hpp"
 
-#include "math/MatrixStack.hpp"
+#include "core/math/MatrixStack.hpp"
 #include "test/Test.hpp"
 
 using Matrices = Core::MatrixStack<5>;

+ 1 - 1
src/tests/MatrixTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/MatrixTests.hpp"
 
-#include "math/Matrix.hpp"
+#include "core/math/Matrix.hpp"
 #include "test/Test.hpp"
 
 using V3 = Core::Vector3;

+ 1 - 1
src/tests/PlaneTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/PlaneTests.hpp"
 
-#include "math/Plane.hpp"
+#include "core/math/Plane.hpp"
 #include "test/Test.hpp"
 
 const float eps = 0.0001f;

+ 1 - 1
src/tests/ProbingHashMapTests.cpp

@@ -2,7 +2,7 @@
 
 #include <stdio.h>
 
-#include "data/ProbingHashMap.hpp"
+#include "core/data/ProbingHashMap.hpp"
 #include "test/Test.hpp"
 
 using IntMap = Core::ProbingHashMap<int, int>;

+ 1 - 1
src/tests/QuaternionTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/QuaternionTests.hpp"
 
-#include "math/Quaternion.hpp"
+#include "core/math/Quaternion.hpp"
 #include "test/Test.hpp"
 
 using V3 = Core::Vector3;

+ 2 - 2
src/tests/RandomTests.cpp

@@ -1,8 +1,8 @@
 #include "tests/RandomTests.hpp"
 
-#include "data/Array.hpp"
+#include "core/data/Array.hpp"
+#include "core/utils/Random.hpp"
 #include "test/Test.hpp"
-#include "utils/Random.hpp"
 
 static void testAverage() {
     Core::Random r(553);

+ 1 - 1
src/tests/RingBufferTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/RingBufferTests.hpp"
 
-#include "data/RingBuffer.hpp"
+#include "core/data/RingBuffer.hpp"
 #include "test/Test.hpp"
 
 struct Tester final {

+ 1 - 1
src/tests/StackTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/StackTests.hpp"
 
-#include "data/Stack.hpp"
+#include "core/data/Stack.hpp"
 #include "test/Test.hpp"
 
 template<typename T>

+ 1 - 1
src/tests/ThreadTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/ThreadTests.hpp"
 
+#include "core/thread/Thread.hpp"
 #include "test/Test.hpp"
-#include "thread/Thread.hpp"
 
 static int runDone = 0;
 

+ 1 - 1
src/tests/UniquePointerTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/UniquePointerTests.hpp"
 
+#include "core/utils/UniquePointer.hpp"
 #include "test/Test.hpp"
-#include "utils/UniquePointer.hpp"
 
 struct B final {
     static int instances;

+ 1 - 1
src/tests/UtilityTests.cpp

@@ -1,7 +1,7 @@
 #include "tests/UtilityTests.hpp"
 
+#include "core/utils/Utility.hpp"
 #include "test/Test.hpp"
-#include "utils/Utility.hpp"
 
 static void testPopCount() {
     CORE_TEST_EQUAL(4, Core::popCount(0xF));

+ 1 - 1
src/tests/VectorTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/VectorTests.hpp"
 
-#include "math/Vector.hpp"
+#include "core/math/Vector.hpp"
 #include "test/Test.hpp"
 
 const float eps = 0.0001f;

+ 1 - 1
src/tests/ViewTests.cpp

@@ -1,6 +1,6 @@
 #include "tests/ViewTests.hpp"
 
-#include "math/View.hpp"
+#include "core/math/View.hpp"
 #include "test/Test.hpp"
 
 using V3 = Core::Vector3;

+ 1 - 1
src/thread/Thread.cpp

@@ -1,4 +1,4 @@
-#include "thread/Thread.hpp"
+#include "core/thread/Thread.hpp"
 
 #include <threads.h>
 

+ 3 - 3
src/utils/Buffer.cpp

@@ -1,7 +1,7 @@
-#include "utils/Buffer.hpp"
+#include "core/utils/Buffer.hpp"
 
-#include "math/Math.hpp"
-#include "utils/Utility.hpp"
+#include "core/math/Math.hpp"
+#include "core/utils/Utility.hpp"
 
 Core::Buffer::Buffer(int initialSize)
     : length(0), capacity(initialSize <= 0 ? 1 : initialSize), buffer(nullptr) {

+ 1 - 1
src/utils/Clock.cpp

@@ -1,4 +1,4 @@
-#include "utils/Clock.hpp"
+#include "core/utils/Clock.hpp"
 
 #include <threads.h>
 #include <time.h>

+ 1 - 1
src/utils/Error.cpp

@@ -1,4 +1,4 @@
-#include "utils/Error.hpp"
+#include "core/utils/Error.hpp"
 
 const char* Core::getErrorName(Error e) {
     switch(e) {

+ 1 - 1
src/utils/Logger.cpp

@@ -1,4 +1,4 @@
-#include "utils/Logger.hpp"
+#include "core/utils/Logger.hpp"
 
 Core::Logger::Level Core::Logger::level = Core::Logger::Level::DEBUG;
 

+ 1 - 1
src/utils/New.cpp

@@ -1,4 +1,4 @@
-#include "utils/New.hpp"
+#include "core/utils/New.hpp"
 
 #include <stdlib.h>
 

+ 1 - 1
src/utils/Random.cpp

@@ -1,4 +1,4 @@
-#include "utils/Random.hpp"
+#include "core/utils/Random.hpp"
 
 Core::Random::Random(Seed seed) : index(0) {
     for(int i = 0; i < N; i++) {

+ 1 - 1
src/utils/Utility.cpp

@@ -1,4 +1,4 @@
-#include "utils/Utility.hpp"
+#include "core/utils/Utility.hpp"
 
 #include <stdio.h>
 #include <stdlib.h>

+ 10 - 2
tasks

@@ -6,6 +6,7 @@ cd $(dirname $0)
 printHelpExit() {
     echo "$0 clean       | remove build results"
     echo "$0 build       | build everything"
+    echo "$0 install     | move build results into the install folder"
     echo "$0 test        | run the tests"
     echo "$0 performance | run the performance tests"
     echo "$0 final       | find classes / structs which are not final"
@@ -25,13 +26,17 @@ build=false
 test=false
 performance=false
 time=false
+install=false
 
 # parsing
 if [ "$task" = "clean" ]; then
-    rm -rf build
+    rm -rf build install
     exit 0
 elif [ "$task" = "build" ]; then
     build=true
+elif [ "$task" = "install" ]; then
+    build=true
+    install=true
 elif [ "$task" = "test" ]; then
     build=true
     test=true
@@ -59,10 +64,13 @@ fi
 # task execution
 if $build; then
     if [ ! -e build ]; then 
-        cmake -B build -S . -G Ninja
+        cmake -B build -S . -G Ninja -DCMAKE_INSTALL_PREFIX=./install
     fi
     ninja -C build
 fi
+if $install; then
+    ninja -C build install
+fi
 if $test; then
     cd build
     ./test