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::World Class Referencefinal

Scene, Entity and global game management. More...

#include <World.hpp>

+ Inheritance diagram for galaxy::World:
+ Collaboration diagram for galaxy::World:

Public Member Functions

 World () noexcept
 Constructor.
 
 World (World &&)
 Move constructor.
 
Worldoperator= (World &&)
 Move assignment operator.
 
virtual ~World ()
 Destructor.
 
void update () override
 Process events and updates.
 
void render ()
 Render scenes.
 
void clear ()
 Removes all data.
 
- Public Member Functions inherited from galaxy::StateMachine< Scene >
 StateMachine () noexcept
 Constructor.
 
 StateMachine (StateMachine< Stored > &&)
 Move constructor.
 
StateMachine< Stored > & operator= (StateMachine< Stored > &&)
 Move assignment operator.
 
virtual ~StateMachine ()
 Destructor.
 
std::shared_ptr< Stored > add (const std::string &key, Args &&... args)
 Add a new state.
 
std::shared_ptr< Stored > get (const std::string &key) noexcept
 Get a specific state.
 
bool has (const std::string &key) noexcept
 Does a state exist.
 
void remove (const std::string &key)
 Remove a specific state.
 
void push (const std::string &key) noexcept
 Push a state onto the top of stack.
 
void pop () noexcept
 Remove state on top of stack.
 
void pop_all () noexcept
 Remove all states in stack.
 
std::shared_ptr< Stored > top () const noexcept
 Get top state in stack.
 
Stackstack () noexcept
 Get stack.
 
Mapstorage () noexcept
 Get storage.
 

Private Member Functions

 World (const World &)=delete
 Copy constructor.
 
Worldoperator= (const World &)=delete
 Copy assignment operator.
 

Private Attributes

Registry m_registry
 Entity data.
 

Additional Inherited Members

- Protected Attributes inherited from galaxy::StateMachine< Scene >
Stack m_stack
 State stack.
 
Map m_storage
 State cache.
 

Detailed Description

Scene, Entity and global game management.

Definition at line 19 of file World.hpp.

Constructor & Destructor Documentation

◆ World() [1/3]

galaxy::World::World ( )
noexcept

Constructor.

Definition at line 12 of file World.cpp.

◆ World() [2/3]

galaxy::World::World ( World && w)

Move constructor.

Definition at line 17 of file World.cpp.

◆ ~World()

galaxy::World::~World ( )
virtual

Destructor.

Definition at line 32 of file World.cpp.

+ Here is the call graph for this function:

◆ World() [3/3]

galaxy::World::World ( const World & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

World & galaxy::World::operator= ( World && w)

Move assignment operator.

Definition at line 22 of file World.cpp.

+ Here is the call graph for this function:

◆ update()

void galaxy::World::update ( )
overridevirtual

Process events and updates.

Implements galaxy::StateMachine< Scene >.

Definition at line 37 of file World.cpp.

+ Here is the call graph for this function:

◆ render()

void galaxy::World::render ( )

Render scenes.

Definition at line 45 of file World.cpp.

+ Here is the call graph for this function:

◆ clear()

void galaxy::World::clear ( )

Removes all data.

Definition at line 53 of file World.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [2/2]

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

Copy assignment operator.

Member Data Documentation

◆ m_registry

Registry galaxy::World::m_registry
private

Entity data.

Definition at line 72 of file World.hpp.


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