r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
cli::Client Class Reference

Class for the client. More...

#include <Client.hpp>

+ Collaboration diagram for cli::Client:

Public Member Functions

 Client (const ArgsConfig &cfg)
 
 ~Client ()=default
 
 Client (const Client &)=delete
 
Clientoperator= (const Client &)=delete
 
 Client (Client &&)=delete
 
Clientoperator= (Client &&)=delete
 
void run ()
 
void stop () const
 

Private Member Functions

void handleEvents (eng::Event &event)
 
void updateKeyboardInput (ecs::Registry &registry)
 
void setupScenes ()
 

Static Private Member Functions

static utl::cli::AppConfig setupConfig (const ArgsConfig &cfg)
 

Private Attributes

std::unique_ptr< utl::PluginLoaderm_pluginLoader
 
std::unique_ptr< eng::Enginem_engine
 
std::shared_ptr< gme::IGameClientm_gameSolo
 
std::shared_ptr< gme::IGameClientm_gameMulti
 
std::unordered_map< eng::Key, bool > m_keysPressed
 
utl::cli::AppConfig m_config
 
bool m_showDebug = false
 

Detailed Description

Class for the client.

Definition at line 25 of file Client.hpp.

Constructor & Destructor Documentation

◆ Client() [1/3]

◆ ~Client()

cli::Client::~Client ( )
default

◆ Client() [2/3]

cli::Client::Client ( const Client & )
delete

◆ Client() [3/3]

cli::Client::Client ( Client && )
delete

Member Function Documentation

◆ handleEvents()

void cli::Client::handleEvents ( eng::Event & event)
private

◆ operator=() [1/2]

Client & cli::Client::operator= ( Client && )
delete

◆ operator=() [2/2]

Client & cli::Client::operator= ( const Client & )
delete

◆ run()

void cli::Client::run ( )

Definition at line 69 of file client.cpp.

References utl::Config::Color::DARK, and eng::RUN.

Referenced by main().

+ Here is the caller graph for this function:

◆ setupConfig()

◆ setupScenes()

void cli::Client::setupScenes ( )
private

Definition at line 90 of file client.cpp.

◆ stop()

void cli::Client::stop ( ) const

Definition at line 84 of file client.cpp.

Referenced by main().

+ Here is the caller graph for this function:

◆ updateKeyboardInput()

void cli::Client::updateKeyboardInput ( ecs::Registry & registry)
private

Definition at line 38 of file event.cpp.

References ecs::Registry::createEntity(), eng::Down, ecs::Registry::getAll(), ecs::Registry::getComponent(), eng::Left, eng::Right, eng::Space, eng::Up, and ecs::Registry::EntityBuilder::with().

Referenced by handleEvents().

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

Member Data Documentation

◆ m_config

utl::cli::AppConfig cli::Client::m_config
private

Definition at line 52 of file Client.hpp.

◆ m_engine

std::unique_ptr<eng::Engine> cli::Client::m_engine
private

Definition at line 47 of file Client.hpp.

Referenced by handleEvents().

◆ m_gameMulti

std::shared_ptr<gme::IGameClient> cli::Client::m_gameMulti
private

Definition at line 49 of file Client.hpp.

◆ m_gameSolo

std::shared_ptr<gme::IGameClient> cli::Client::m_gameSolo
private

Definition at line 48 of file Client.hpp.

◆ m_keysPressed

std::unordered_map<eng::Key, bool> cli::Client::m_keysPressed
private

Definition at line 50 of file Client.hpp.

Referenced by handleEvents().

◆ m_pluginLoader

std::unique_ptr<utl::PluginLoader> cli::Client::m_pluginLoader
private

Definition at line 46 of file Client.hpp.

◆ m_showDebug

bool cli::Client::m_showDebug = false
private

Definition at line 53 of file Client.hpp.

Referenced by handleEvents().


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