cleanup: removed entity/utility.hpp

This commit is contained in:
Michele Caini
2020-01-21 12:33:37 +01:00
parent 8278c8eedd
commit efb2bbe8b2
7 changed files with 37 additions and 52 deletions

1
TODO
View File

@@ -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

View File

@@ -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"

View File

@@ -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.

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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"