r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
eng::AScene Class Reference

Abstract class for scene. More...

#include <IScene.hpp>

+ Inheritance diagram for eng::AScene:
+ Collaboration diagram for eng::AScene:

Public Member Functions

 AScene (const id assignedId)
 
 ~AScene () override=default
 
 AScene (const AScene &other)=delete
 
 AScene (AScene &&other)=delete
 
ASceneoperator= (const AScene &other)=delete
 
ASceneoperator= (AScene &&other)=delete
 
std::string & getName () override
 
id getId () const override
 
ecs::RegistrygetRegistry () override
 
void setName (const std::string &newName) override
 
void addSystem (std::unique_ptr< ecs::ISystem > system) override
 
void updateSystems (const float dt) override
 
- Public Member Functions inherited from eng::IScene
virtual ~IScene ()=default
 
virtual void update (float dt, const WindowSize &size)=0
 
virtual void event (const Event &event)=0
 

Protected Attributes

utl::EventBusm_eventBus = utl::EventBus::getInstance()
 
std::uint32_t m_eventComponentId = 0
 

Private Attributes

std::string m_name = "default_name"
 
id m_id = 1
 
ecs::Registry m_registry
 
std::vector< std::unique_ptr< ecs::ISystem > > m_systems
 

Detailed Description

Abstract class for scene.

Definition at line 51 of file IScene.hpp.

Constructor & Destructor Documentation

◆ AScene() [1/3]

eng::AScene::AScene ( const id assignedId)
inlineexplicit

Definition at line 54 of file IScene.hpp.

◆ ~AScene()

eng::AScene::~AScene ( )
overridedefault

◆ AScene() [2/3]

eng::AScene::AScene ( const AScene & other)
delete

◆ AScene() [3/3]

eng::AScene::AScene ( AScene && other)
delete

Member Function Documentation

◆ addSystem()

void eng::AScene::addSystem ( std::unique_ptr< ecs::ISystem > system)
inlineoverridevirtual

Implements eng::IScene.

Definition at line 68 of file IScene.hpp.

References m_systems.

◆ getId()

id eng::AScene::getId ( ) const
inlinenodiscardoverridevirtual

Implements eng::IScene.

Definition at line 63 of file IScene.hpp.

References m_id.

◆ getName()

std::string & eng::AScene::getName ( )
inlinenodiscardoverridevirtual

Implements eng::IScene.

Definition at line 62 of file IScene.hpp.

References m_name.

◆ getRegistry()

ecs::Registry & eng::AScene::getRegistry ( )
inlinenodiscardoverridevirtual

Implements eng::IScene.

Definition at line 64 of file IScene.hpp.

References m_registry.

◆ operator=() [1/2]

AScene & eng::AScene::operator= ( AScene && other)
delete

◆ operator=() [2/2]

AScene & eng::AScene::operator= ( const AScene & other)
delete

◆ setName()

void eng::AScene::setName ( const std::string & newName)
inlineoverridevirtual

Implements eng::IScene.

Definition at line 66 of file IScene.hpp.

References m_name.

◆ updateSystems()

void eng::AScene::updateSystems ( const float dt)
inlineoverridevirtual

Implements eng::IScene.

Definition at line 69 of file IScene.hpp.

References m_registry, and m_systems.

Member Data Documentation

◆ m_eventBus

◆ m_eventComponentId

◆ m_id

id eng::AScene::m_id = 1
private

Definition at line 79 of file IScene.hpp.

Referenced by getId().

◆ m_name

std::string eng::AScene::m_name = "default_name"
private

Definition at line 78 of file IScene.hpp.

Referenced by getName(), and setName().

◆ m_registry

ecs::Registry eng::AScene::m_registry
private

Definition at line 80 of file IScene.hpp.

Referenced by getRegistry(), and updateSystems().

◆ m_systems

std::vector<std::unique_ptr<ecs::ISystem> > eng::AScene::m_systems
private

Definition at line 81 of file IScene.hpp.

Referenced by addSystem(), and updateSystems().


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