R-Type  2
Doom but in better
Loading...
Searching...
No Matches
GUI::Network::ThreadCapsule Class Reference

#include <ThreadCapsule.hpp>

Inheritance diagram for GUI::Network::ThreadCapsule:
Inheritance graph
Collaboration diagram for GUI::Network::ThreadCapsule:
Collaboration graph

Public Member Functions

 ThreadCapsule (const std::uint32_t nodeId=0)
 
 ~ThreadCapsule ()
 
void initialize ()
 
void startThread ()
 
void stopThread ()
 
void startGame ()
 
void sendMessage (const MessageNode &message)
 
const std::vector< GUI::Network::MessageNodegetReceivedMessages ()
 
void setPort (const unsigned int port)
 
void setIp (const std::string &ip)
 
void setPlayerName (const std::string &name)
 
void setAddress (const std::string &ip, const unsigned int port)
 
const bool isConnected () const
 
const bool isThreadAlive () const
 
const float bytesToFloat (const uint8_t *bytes)
 
const std::string bytesToHex (const std::vector< uint8_t > &bytes)
 
const GUI::Network::MessageNode translateMessage (const std::vector< uint8_t > &message)
 
void receiveMessage ()
 
- Public Member Functions inherited from GUI::ECS::EntityNode
 EntityNode (const size_t entityId=0)
 
virtual ~EntityNode ()=default
 
virtual size_t getEntityNodeId () const
 

Additional Inherited Members

- Protected Attributes inherited from GUI::ECS::EntityNode
size_t _entityID
 

Detailed Description

Definition at line 29 of file ThreadCapsule.hpp.

Constructor & Destructor Documentation

◆ ThreadCapsule()

GUI::Network::ThreadCapsule::ThreadCapsule ( const std::uint32_t nodeId = 0)

Definition at line 10 of file ThreadCapsule.cpp.

◆ ~ThreadCapsule()

GUI::Network::ThreadCapsule::~ThreadCapsule ( )

Definition at line 15 of file ThreadCapsule.cpp.

Member Function Documentation

◆ bytesToFloat()

const float GUI::Network::ThreadCapsule::bytesToFloat ( const uint8_t * bytes)

Definition at line 102 of file ThreadCapsule.cpp.

◆ bytesToHex()

const std::string GUI::Network::ThreadCapsule::bytesToHex ( const std::vector< uint8_t > & bytes)

Definition at line 109 of file ThreadCapsule.cpp.

◆ getReceivedMessages()

const std::vector< GUI::Network::MessageNode > GUI::Network::ThreadCapsule::getReceivedMessages ( )

Definition at line 60 of file ThreadCapsule.cpp.

◆ initialize()

void GUI::Network::ThreadCapsule::initialize ( )

Definition at line 25 of file ThreadCapsule.cpp.

◆ isConnected()

const bool GUI::Network::ThreadCapsule::isConnected ( ) const

Definition at line 88 of file ThreadCapsule.cpp.

◆ isThreadAlive()

const bool GUI::Network::ThreadCapsule::isThreadAlive ( ) const

Definition at line 96 of file ThreadCapsule.cpp.

◆ receiveMessage()

void GUI::Network::ThreadCapsule::receiveMessage ( )

Definition at line 121 of file ThreadCapsule.cpp.

◆ sendMessage()

void GUI::Network::ThreadCapsule::sendMessage ( const MessageNode & message)

Definition at line 54 of file ThreadCapsule.cpp.

◆ setAddress()

void GUI::Network::ThreadCapsule::setAddress ( const std::string & ip,
const unsigned int port )

Definition at line 81 of file ThreadCapsule.cpp.

◆ setIp()

void GUI::Network::ThreadCapsule::setIp ( const std::string & ip)

Definition at line 71 of file ThreadCapsule.cpp.

◆ setPlayerName()

void GUI::Network::ThreadCapsule::setPlayerName ( const std::string & name)

Definition at line 76 of file ThreadCapsule.cpp.

◆ setPort()

void GUI::Network::ThreadCapsule::setPort ( const unsigned int port)

Definition at line 66 of file ThreadCapsule.cpp.

◆ startGame()

void GUI::Network::ThreadCapsule::startGame ( )

Definition at line 48 of file ThreadCapsule.cpp.

◆ startThread()

void GUI::Network::ThreadCapsule::startThread ( )

Definition at line 37 of file ThreadCapsule.cpp.

◆ stopThread()

void GUI::Network::ThreadCapsule::stopThread ( )

Definition at line 43 of file ThreadCapsule.cpp.

◆ translateMessage()

const GUI::Network::MessageNode GUI::Network::ThreadCapsule::translateMessage ( const std::vector< uint8_t > & message)

Definition at line 115 of file ThreadCapsule.cpp.


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