cubos::core::ecs namespace

ECS module.

Namespaces

namespace impl
Contains functions used internally by the implementation of the ECS.

Classes

class Blueprint
Collection of entities and their respective components and relations.
class CommandBuffer
Stores commands to execute them later.
struct DeltaTime
Resource which stores the time since the last iteration of the main loop started.
struct ShouldQuit
Resource used as a flag to indicate whether the main loop should stop running.
struct Arguments
Resource which stores the command-line arguments.
class Cubos
Represents the engine itself, and exposes the interface with which the game developer interacts with. Ties up all the different parts of the engine together.
class DynamicPlugin
Manages the loading and unloading of a plugin from a shared library.
class ArchetypeGraph
Stores which column types each archetype holds and the edges which connect them.
struct ArchetypeId
Identifies an archetype.
struct ArchetypeIdHash
Hash functor for ArchetypeId.
struct Entity
Identifies an entity.
struct EntityHash
Used to hash Entity objects.
class EntityPool
Manages the creation and destruction of entity identifiers, as well as storing their archetype identifiers.
struct Name
Component which stores the name of an entity.
struct ObserverId
Identifies an observer.
class Observers
Stores and manages all of the observers associated with a world.
struct PluginQueue
Stores plugin operations to be executed later.
template<typename... Ts>
class QueryData
Holds the data necessary to execute a query.
template<typename T>
class QueryFetcher
Type meant to be specialized which implements for each argument type the necessary logic to extract it from the tables.
class QueryFilter
Used to find matches for the given query terms. Essentially contains the non-templated part of the query logic.
class QueryArchetypeNode
Node which forces a given target to belong to a set of archetypes.
class QueryNode
Query filter step, which receives an iterator and advances it until it points to a valid match.
class QueryRelatedNode
Node which forces two given targets to be related with a given relation.
struct QueryTerm
Describes a term in a query.
struct SymmetricTrait
Trait used to identify symmetric relations.
struct TreeTrait
Trait used to identify tree relations.
struct EphemeralTrait
Trait used to identify types which are ephemeral and should not be persisted.
template<typename T>
class TypeBuilder
Builder for reflection::Type objects which represent ECS types.
struct SystemAccess
Describes the types of data a system accesses.
class Commands
System argument used to write ECS commands and execute them at a later time.
template<typename T>
class EventPipe
Resource which stores events of type T.
template<typename T, unsigned int M = DEFAULT_FILTER_MASK>
class EventReader
System arguments used to read events of type T.
template<typename T>
class EventWriter
System argument which allows the system to send events of type T to other systems.
class Plugins
System argument used to add or remove Cubos plugins at runtime.
template<typename... Ts>
class Query
System argument which holds the result of a query over all entities in world which match the given arguments.
struct SystemContext
Context passed by the system caller to the fetchers.
template<typename T>
class SystemFetcher
Type meant to be specialized which implements for each argument type the necessary logic to extract it from the world.
struct SystemOptions
Contains extra options for a specific system argument.
class Planner
Layer on top of Schedule, used to build them with added abstractions such as tags.
struct SystemId
Identifies a system.
struct ConditionId
Identifies a condition.
class SystemRegistry
Stores known systems and conditions.
class Schedule
Stores schedule nodes and the restrictions that must be met for them to run.
template<typename T>
class System
Holds a system with a return type T.
class Tag
Represents a tag to be used with the Cubos class.
struct ColumnId
Identifies a data column type.
struct ColumnIdHash
Used to hash ColumnId objects.
class DenseTableRegistry
Stores the dense tables of a given world.
class DenseTable
Stores the dense data associated to entities of a given archetype.
struct SparseRelationTableId
Identifies a sparse relation table.
struct SparseRelationTableIdHash
Hash functor for SparseRelationTableId.
class SparseRelationTableRegistry
Stores all of the sparse relation tables.
class SparseRelationTable
A table which stores relations. Allows for quick insertion, deletion and iteration.
class Tables
Stores the tables of a given world.
struct DataTypeId
Identifies a data type registered in the world.
struct DataTypeIdHash
Hash functor for DataTypeId.
class Types
Registry of all data types used in an ECS world.
class World
Holds entities, their components and resources.

Enums

enum class Traversal { Random, Down, Up }
Possible traversal types for tree relation terms.

Typedefs

using Plugin = void(*)(Cubos&)
Function pointer type representing a plugin.

Functions

auto convertEntities(const std::unordered_map<Entity, Entity, EntityHash>& map, const reflection::Type& type, void* value) -> CUBOS_CORE_API void
Converts entities in a value to their respective new entities. If an entity is not found in the map, it is left unchanged.

Enum documentation

enum class cubos::core::ecs::Traversal

Possible traversal types for tree relation terms.

Enumerators
Random

Default traversal order. No specific ordering is required.

Down

Starts in the topmost entity and traverses down the relation.

Up

Starts in the bottommost entity and traverses up the relation.