vecs
Fast, flexible ecs in C++ with ergonomic API
Loading...
Searching...
No Matches
vecs.h File Reference

This file contains the core ECS (Entity Component System) framework definitions. More...

#include <cassert>
#include <chrono>
#include <cstdio>
#include <functional>
#include <memory>
#include <typeindex>
#include <unordered_map>
#include <variant>
#include "bundle.h"
#include "dense_map.h"
#include "type_id.h"

Go to the source code of this file.

Classes

struct  vecs::With< T >
 
struct  vecs::Without< T >
 
class  vecs::Filter< Filters >
 
struct  vecs::_traits::function_traits< R(Args...)>
 
struct  vecs::_traits::function_traits< R(*)(Args...)>
 
struct  vecs::_traits::function_traits< R(&)(Args...)>
 
struct  vecs::_traits::function_traits< R(C::*)(Args...)>
 
struct  vecs::_traits::function_traits< R(C::*)(Args...) const >
 
struct  vecs::_traits::function_traits< T >
 
struct  vecs::_traits::contains< T >
 
struct  vecs::_traits::contains< T, U, Ts... >
 
struct  vecs::_traits::contains< T, T, Ts... >
 
struct  vecs::_traits::is_optional< T >
 
struct  vecs::_traits::is_optional< Optional< T > >
 
struct  vecs::_traits::query::QueryTypeTraits< T >
 
struct  vecs::_traits::query::QueryTypeTraits< Entity >
 
struct  vecs::_traits::query::QueryTypeTraits< Optional< T > >
 
struct  vecs::_traits::query::filter_traits< T >
 
struct  vecs::_traits::query::filter_traits< With< T > >
 
struct  vecs::_traits::query::filter_traits< Without< T > >
 
struct  vecs::Parent
 
struct  vecs::TypeErasedResource
 
struct  vecs::Resource< T >
 A non-owning wrapper around a resource of type T. More...
 
class  vecs::TypeErasedObserver
 
class  vecs::Observer< Components >
 Observer class for tracking component changes within a system. More...
 
struct  vecs::Time
 
class  vecs::World
 The ECS world. More...
 
struct  vecs::QueryFilter< Filters >
 
class  vecs::Optional< T >
 Provides an interface for interacting with optional components. More...
 
class  vecs::Test< Filter< Filters... >, Components... >
 
class  vecs::Test< Components >
 
class  vecs::Query< Components >
 Represents a query for components within the ECS world. More...
 
class  vecs::Query< Components >::Iterator
 Iterator for iterating over entities matching the query. More...
 
struct  vecs::Query< Components >::Single
 A container for a single entity and its components, as a result of a query. More...
 
struct  vecs::Query< Components >::Record
 A container for a single record and its components, as a result of a query. More...
 
class  vecs::EntityBuilder
 Provides methods to construct and modify entities within the ECS world. More...
 
class  vecs::EntityCommands
 Provides a deferred command interface for managing a specific entity's state within the ECS world. More...
 
class  vecs::Command
 
class  vecs::Commands
 Provides a deferred command interface to manage entity operations within the ECS world. More...
 
struct  vecs::into_system_param< T >
 A template for converting types into system parameters. More...
 
struct  vecs::into_system_param< T & >
 Partial specialization of into_system_param for lvalue references. More...
 
struct  vecs::into_system_param< const T & >
 Partial specialization of into_system_param for const lvalue references. More...
 
struct  vecs::Local< T >
 A container for local data specific to a system. More...
 
struct  vecs::into_system_param< Local< T > >
 Specialization for converting Local<T> into a system parameter. More...
 
struct  vecs::into_system_param< const Time & >
 
struct  vecs::into_system_param< Resource< T > >
 Specialization for converting Resource<T> into a system parameter. More...
 
struct  vecs::into_system_param< Query< Components... > >
 Specialization for converting Query<Components...> into a system parameter. More...
 
struct  vecs::into_system_param< const Observer< Components... > & >
 Specialization for converting const Observer<Components...>& into a system parameter. More...
 
struct  vecs::into_system_param< Commands & >
 
struct  vecs::get_system_params_helper< std::tuple< Args... > >
 

Enumerations

enum class  vecs::ScheduleLabel {
  Startup , PreUpdate , Update , Validate ,
  PostUpdate , PreStore , Store
}
 Labels for predefined execution phases of systems within the ECS World
 

Functions

template<typename Tuple >
auto vecs::get_system_params (World &world)
 
template<typename... Filters, typename... Components>
 vecs::Test (Filter< Filters... >, Components...) -> Test< Filter< Filters... >, Components... >
 
template<typename... Components>
 vecs::Test (Components...) -> Test< Components... >
 

Detailed Description

This file contains the core ECS (Entity Component System) framework definitions.