Skip to content

Commit

Permalink
refactor(ecs): move registry.hpp to component dir
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Oct 2, 2023
1 parent c6f8ad6 commit 7e88b23
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ set(CUBOS_CORE_SOURCE
"src/cubos/core/ecs/entity/entity.cpp"
"src/cubos/core/ecs/entity/hash.cpp"
"src/cubos/core/ecs/entity/manager.cpp"
"src/cubos/core/ecs/component/registry.cpp"
"src/cubos/core/ecs/component/manager.cpp"
"src/cubos/core/ecs/commands.cpp"
"src/cubos/core/ecs/blueprint.cpp"
"src/cubos/core/ecs/world.cpp"
"src/cubos/core/ecs/system.cpp"
"src/cubos/core/ecs/dispatcher.cpp"
"src/cubos/core/ecs/registry.cpp"
)

# Create core library
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// @file
/// @brief Class @ref cubos::core::ecs::Registry and registration macro.
/// @ingroup core-ecs
/// @ingroup core-ecs-component

#pragma once

Expand All @@ -17,7 +17,7 @@ namespace cubos::core::ecs
/// It stores information regarding the components so that they can be handled in a type-erased
/// manner.
///
/// @ingroup core-ecs
/// @ingroup core-ecs-component
class Registry final
{
public:
Expand Down Expand Up @@ -119,7 +119,7 @@ namespace cubos::core::ecs
/// @warning Care must be taken to ensure that this macro is included from at least one translation
/// unit (think of it as a .cpp file) in the executable, otherwise the component type may not be
/// registered. E.g.: keeping it hidden in a .cpp file on a library may not work.
/// @ingroup core-ecs
/// @ingroup core-ecs-component
#define CUBOS_REGISTER_COMPONENT(type, storageType, name) \
namespace cubos::core::ecs::impl \
{ \
Expand Down
2 changes: 1 addition & 1 deletion core/samples/ecs/general/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include <cubos/core/ecs/blueprint.hpp>
#include <cubos/core/ecs/commands.hpp>
#include <cubos/core/ecs/component/registry.hpp>
#include <cubos/core/ecs/dispatcher.hpp>
#include <cubos/core/ecs/map_storage.hpp>
#include <cubos/core/ecs/null_storage.hpp>
#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/system.hpp>
#include <cubos/core/ecs/vec_storage.hpp>
#include <cubos/core/ecs/world.hpp>
Expand Down
2 changes: 1 addition & 1 deletion core/src/cubos/core/ecs/blueprint.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <cubos/core/ecs/blueprint.hpp>
#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/component/registry.hpp>

using namespace cubos::core::ecs;

Expand Down
2 changes: 1 addition & 1 deletion core/src/cubos/core/ecs/component/manager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <cubos/core/ecs/component/manager.hpp>
#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/component/registry.hpp>

using namespace cubos::core;
using namespace cubos::core::ecs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/component/registry.hpp>

using namespace cubos::core;
using namespace cubos::core::ecs;
Expand Down
2 changes: 1 addition & 1 deletion core/src/cubos/core/ecs/world.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/component/registry.hpp>
#include <cubos/core/ecs/world.hpp>

using namespace cubos::core;
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ecs/registry.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <doctest/doctest.h>

#include <cubos/core/ecs/registry.hpp>
#include <cubos/core/ecs/component/registry.hpp>
#include <cubos/core/ecs/vec_storage.hpp>

#include "utils.hpp"
Expand Down
2 changes: 1 addition & 1 deletion tools/quadrados-gen/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ static bool generate(const GenerateOptions& options)
file << "/// This file was generated by quadrados-gen." << std::endl;
file << "/// Do not edit this file." << std::endl;
file << std::endl;
file << "#include <cubos/core/ecs/registry.hpp>" << std::endl;
file << "#include <cubos/core/ecs/component/registry.hpp>" << std::endl;
file << "#include <cubos/core/ecs/vec_storage.hpp>" << std::endl;
file << "#include <cubos/core/ecs/map_storage.hpp>" << std::endl;
file << "#include <cubos/core/ecs/null_storage.hpp>" << std::endl;
Expand Down

0 comments on commit 7e88b23

Please sign in to comment.