galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Registry Class Referencefinal

Wrapper around entt::registry to expand functionality. More...

#include <Registry.hpp>

+ Collaboration diagram for galaxy::Registry:

Public Member Functions

 Registry ()
 Typedef for creating b2 bodies from components.
 
 Registry (Registry &&)
 Move constructor.
 
Registryoperator= (Registry &&)
 Move assignment operator.
 
 ~Registry ()
 Destructor.
 

Public Attributes

entt::registry m_entt
 Function that integrates a box2d construction with entt.
 

Private Member Functions

 Registry (const Registry &)=delete
 Create an entity with some default components.
 
Registryoperator= (const Registry &)=delete
 Copy assignment operator.
 

Detailed Description

Wrapper around entt::registry to expand functionality.

Definition at line 18 of file Registry.hpp.

Constructor & Destructor Documentation

◆ Registry() [1/3]

galaxy::Registry::Registry ( )

Typedef for creating b2 bodies from components.

Constructor.

Definition at line 12 of file Registry.cpp.

◆ Registry() [2/3]

galaxy::Registry::Registry ( Registry && r)

Move constructor.

Definition at line 16 of file Registry.cpp.

◆ ~Registry()

galaxy::Registry::~Registry ( )

Destructor.

Definition at line 31 of file Registry.cpp.

◆ Registry() [3/3]

galaxy::Registry::Registry ( const Registry & )
privatedelete

Create an entity with some default components.

Returns
Created entity, or entt::null if failed. Create an entity from a prefab.
Parameters
nameName of the prefab to load.
Returns
Created entity, or entt::null if failed. Validate an entity to make sure all components have met their requirements as defined by register_dependencies().
Parameters
entityEntity to validate.
Returns
True if entity is valid.

Updates pending component data.

For example, box2d bodies.

Parameters
b2WorldBox2d world data. Clear any pending data. Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

Registry & galaxy::Registry::operator= ( Registry && r)

Move assignment operator.

Definition at line 21 of file Registry.cpp.

◆ operator=() [2/2]

Registry & galaxy::Registry::operator= ( const Registry & )
privatedelete

Copy assignment operator.

Member Data Documentation

◆ m_entt

entt::registry galaxy::Registry::m_entt

Function that integrates a box2d construction with entt.

Parameters
registryRegistry component belongs to.
entityEntity component belongs to. Function that integrates a box2d destruction with entt.
registryRegistry component belongs to.
entityEntity component belongs to. Function that integrates lua init with entt on construct event.
registryRegistry component belongs to.
entityEntity component belongs to. Function that integrates lua destroy with entt on destruction event.
registryRegistry component belongs to.
entityEntity component belongs to. Function that integrates nuklear init with entt on construct event.
registryRegistry component belongs to.
entityEntity component belongs to. Function that integrates nuklear destroy with entt on destruction event.
registryRegistry component belongs to.
entityEntity component belongs to. Function that runs when an entity is enabled.
registryRegistry component belongs to.
entityEntity component belongs to. Function that runs when an entity is disabled.
registryRegistry component belongs to.
entityEntity component belongs to. entt registry.

Definition at line 167 of file Registry.hpp.


The documentation for this class was generated from the following files: