Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
query.hpp File Reference
#include <helios/core_pch.hpp>
#include <helios/core/app/access_policy.hpp>
#include <helios/core/assert.hpp>
#include <helios/core/ecs/component.hpp>
#include <helios/core/ecs/details/archetype.hpp>
#include <helios/core/ecs/details/components_manager.hpp>
#include <helios/core/ecs/details/query_cache.hpp>
#include <helios/core/ecs/entity.hpp>
#include <helios/core/ecs/world.hpp>
#include <helios/core/logger.hpp>
#include <helios/core/utils/common_traits.hpp>
#include <helios/core/utils/functional_adapters.hpp>
#include <algorithm>
#include <array>
#include <concepts>
#include <cstddef>
#include <functional>
#include <iterator>
#include <memory>
#include <optional>
#include <span>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  helios::ecs::details::ComponentTypeExtractor< T >
 Type trait to extract the underlying component type from const/reference wrappers. More...
 
class  helios::ecs::details::QueryIterator< Components >
 Iterator for query results without entity information. More...
 
class  helios::ecs::details::QueryWithEntityIterator< Components >
 Iterator for query results with entity information. More...
 
class  helios::ecs::BasicQueryWithEntity< WorldT, Allocator, Components >
 Wrapper for queries that include entity in iteration. More...
 
class  helios::ecs::BasicQuery< WorldT, Allocator, Components >
 
class  helios::ecs::BasicQueryBuilder< WorldT, Allocator >
 

Namespaces

namespace  helios
 
namespace  helios::ecs
 
namespace  helios::ecs::details
 

Concepts

concept  helios::ecs::details::ValidWorldComponentAccess
 Concept for valid World/Component access combinations.
 
concept  helios::ecs::details::AllocatorFor
 Concept for STL-compatible allocators.
 

Typedefs

template<typename T >
using helios::ecs::details::ComponentTypeExtractor_t = typename ComponentTypeExtractor< T >::type
 
template<typename T >
using helios::ecs::details::ComponentAccessType = std::conditional_t< std::is_reference_v< T >, T, std::conditional_t< std::is_const_v< T >, const ComponentTypeExtractor_t< T > &, ComponentTypeExtractor_t< T > & > >
 Helper to determine the proper return type for component access.
 
template<typename Allocator = std::allocator<ComponentTypeId>>
using helios::ecs::QueryBuilder = BasicQueryBuilder< World, Allocator >
 Type alias for query builder with mutable world access.
 
template<typename Allocator = std::allocator<ComponentTypeId>>
using helios::ecs::ReadOnlyQueryBuilder = BasicQueryBuilder< const World, Allocator >
 Type alias for query builder with read-only world access.
 
template<typename Allocator , ComponentTrait... Components>
using helios::ecs::Query = BasicQuery< World, Allocator, Components... >
 Type alias for query with mutable world access.
 
template<typename Allocator , ComponentTrait... Components>
using helios::ecs::ReadOnlyQuery = BasicQuery< const World, Allocator, Components... >
 Type alias for query with read-only world access.
 
template<typename Allocator , ComponentTrait... Components>
using helios::ecs::QueryWithEntity = BasicQueryWithEntity< World, Allocator, Components... >
 Type alias for query with entity with mutable world access.
 
template<typename Allocator , ComponentTrait... Components>
using helios::ecs::ReadOnlyQueryWithEntity = BasicQueryWithEntity< const World, Allocator, Components... >
 Type alias for query with entity with read-only world access.
 

Functions

template<WorldType WorldT>
 helios::ecs::BasicQueryBuilder (WorldT &) -> BasicQueryBuilder< WorldT, std::allocator< ComponentTypeId > >
 
template<WorldType WorldT>
 helios::ecs::BasicQueryBuilder (WorldT &, const app::AccessPolicy &) -> BasicQueryBuilder< WorldT, std::allocator< ComponentTypeId > >
 
template<WorldType WorldT, typename Allocator >
 helios::ecs::BasicQueryBuilder (WorldT &, Allocator) -> BasicQueryBuilder< WorldT, Allocator >
 
template<WorldType WorldT, typename Allocator >
 helios::ecs::BasicQueryBuilder (WorldT &, const app::AccessPolicy &, Allocator) -> BasicQueryBuilder< WorldT, Allocator >
 

Variables

template<typename T >
constexpr bool helios::ecs::details::IsConstComponent = std::is_const_v<std::remove_reference_t<T>>
 Helper to check if a type represents a const-qualified component access.
 
template<typename... Components>
constexpr bool helios::ecs::details::AllComponentsConst = (IsConstComponent<Components> && ...)
 Helper to check if all component types are const-qualified.
 
template<typename T >
constexpr bool helios::ecs::details::IsConstWorld = WorldType<T> && std::is_const_v<std::remove_reference_t<T>>
 Helper to detect if World type is const.