Просмотр исходного кода

cleanup: removed entity/utility.hpp

Michele Caini 6 лет назад
Родитель
Сommit
efb2bbe8b2

+ 0 - 1
TODO

@@ -19,7 +19,6 @@
 * any-of rule for views/groups (eg entity has A and any of B/C/D)
   - get -> all, exclude -> none
 * deprecate sigh::publish, use operator()
-* merge entity/helper and entt/utility
 
 * WIP: snapshot rework/deprecation
  - remove snapshot/loader from registry, make them external (faster) tools

+ 1 - 1
src/entt/entity/group.hpp

@@ -9,7 +9,7 @@
 #include "../core/type_traits.hpp"
 #include "sparse_set.hpp"
 #include "storage.hpp"
-#include "utility.hpp"
+#include "helper.hpp"
 #include "fwd.hpp"
 
 

+ 34 - 1
src/entt/entity/helper.hpp

@@ -3,13 +3,46 @@
 
 
 #include <type_traits>
+#include "../core/type_traits.hpp"
 #include "../config/config.h"
-#include "registry.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
+/**
+ * @brief Alias for exclusion lists.
+ * @tparam Type List of types.
+ */
+template<typename... Type>
+struct exclude_t: type_list<Type...> {};
+
+
+/**
+ * @brief Variable template for exclusion lists.
+ * @tparam Type List of types.
+ */
+template<typename... Type>
+constexpr exclude_t<Type...> exclude{};
+
+
+/**
+ * @brief Alias for lists of observed components.
+ * @tparam Type List of types.
+ */
+template<typename... Type>
+struct get_t: type_list<Type...>{};
+
+
+/**
+ * @brief Variable template for lists of observed components.
+ * @tparam Type List of types.
+ */
+template<typename... Type>
+constexpr get_t<Type...> get{};
+
+
 /**
  * @brief Converts a registry to a view.
  * @tparam Const Constness of the accepted registry.

+ 1 - 1
src/entt/entity/registry.hpp

@@ -19,7 +19,7 @@
 #include "sparse_set.hpp"
 #include "snapshot.hpp"
 #include "storage.hpp"
-#include "utility.hpp"
+#include "helper.hpp"
 #include "entity.hpp"
 #include "group.hpp"
 #include "view.hpp"

+ 0 - 46
src/entt/entity/utility.hpp

@@ -1,46 +0,0 @@
-#ifndef ENTT_ENTITY_UTILITY_HPP
-#define ENTT_ENTITY_UTILITY_HPP
-
-
-#include "../core/type_traits.hpp"
-
-
-namespace entt {
-
-
-/**
- * @brief Alias for exclusion lists.
- * @tparam Type List of types.
- */
-template<typename... Type>
-struct exclude_t: type_list<Type...> {};
-
-
-/**
- * @brief Variable template for exclusion lists.
- * @tparam Type List of types.
- */
-template<typename... Type>
-constexpr exclude_t<Type...> exclude{};
-
-
-/**
- * @brief Alias for lists of observed components.
- * @tparam Type List of types.
- */
-template<typename... Type>
-struct get_t: type_list<Type...>{};
-
-
-/**
- * @brief Variable template for lists of observed components.
- * @tparam Type List of types.
- */
-template<typename... Type>
-constexpr get_t<Type...> get{};
-
-
-}
-
-
-#endif

+ 1 - 1
src/entt/entity/view.hpp

@@ -12,7 +12,7 @@
 #include "../core/type_traits.hpp"
 #include "sparse_set.hpp"
 #include "storage.hpp"
-#include "utility.hpp"
+#include "helper.hpp"
 #include "entity.hpp"
 #include "fwd.hpp"
 

+ 0 - 1
src/entt/entt.hpp

@@ -17,7 +17,6 @@
 #include "entity/snapshot.hpp"
 #include "entity/sparse_set.hpp"
 #include "entity/storage.hpp"
-#include "entity/utility.hpp"
 #include "entity/view.hpp"
 #include "locator/locator.hpp"
 #include "meta/factory.hpp"