RType
Public Member Functions | List of all members
ClientCore Class Reference

#include <ClientCore.hpp>

Public Member Functions

 ClientCore ()
 ClientCore, constructor of ClientCore. More...
 
 ~ClientCore ()=default
 ~ClientCore, destructor of ClientCore More...
 
bool init_socket (const std::string &ip, int port)
 init_socket, init the socket More...
 
void run ()
 run, run the client More...
 
std::shared_ptr< IScenegetSceneByName (const std::string &name)
 getSocket, get the socket More...
 
void setCurrentScene (const std::string &name)
 setCurrentScene, set the current scene More...
 
std::shared_ptr< IScenegetCurrentScene () const
 getCurrentScene, get the current scene More...
 
void sendHeartBeat (sf::RenderWindow &window)
 sendHeartBeat, send the heart beat More...
 
void startHeartBeat ()
 startHeartBeat, start the heart beat More...
 

Detailed Description

Definition at line 21 of file ClientCore.hpp.

Constructor & Destructor Documentation

◆ ClientCore()

ClientCore::ClientCore ( )

ClientCore, constructor of ClientCore.

Construct a new Client Core:: Client Core object.

Definition at line 14 of file ClientCore.cpp.

◆ ~ClientCore()

ClientCore::~ClientCore ( )
default

~ClientCore, destructor of ClientCore

Member Function Documentation

◆ getCurrentScene()

std::shared_ptr< IScene > ClientCore::getCurrentScene ( ) const

getCurrentScene, get the current scene

Returns
std::shared_ptr<IScene>

Definition at line 113 of file ClientCore.cpp.

◆ getSceneByName()

std::shared_ptr< IScene > ClientCore::getSceneByName ( const std::string &  name)

getSocket, get the socket

getSceneByName, get the scene by name

Returns
std::shared_ptr<ClientSocket>
Parameters
name
Returns
std::shared_ptr<IScene>

Definition at line 69 of file ClientCore.cpp.

◆ init_socket()

bool ClientCore::init_socket ( const std::string &  ip,
int  port 
)

init_socket, init the socket

init_socket, initialize the socket with the ip and the port

Parameters
ip
port
Returns
true if the socket is init
Parameters
ip
port

Definition at line 29 of file ClientCore.cpp.

◆ run()

void ClientCore::run ( )

run, run the client

Definition at line 43 of file ClientCore.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ sendHeartBeat()

void ClientCore::sendHeartBeat ( sf::RenderWindow &  window)

sendHeartBeat, send the heart beat

Parameters
window

Definition at line 93 of file ClientCore.cpp.

◆ setCurrentScene()

void ClientCore::setCurrentScene ( const std::string &  name)

setCurrentScene, set the current scene

Parameters
name

Definition at line 79 of file ClientCore.cpp.

Referenced by ButtonComponent::handleClickAccessGame(), ButtonComponent::handleClickMainScene(), GameScene::handleEvent(), and MenuScene::handleEvent().

Here is the caller graph for this function:

◆ startHeartBeat()

void ClientCore::startHeartBeat ( )

startHeartBeat, start the heart beat

Definition at line 122 of file ClientCore.cpp.

Referenced by MenuScene::receiveData().

Here is the caller graph for this function:

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