Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
SessionInfo Struct Reference

Public Types

enum class  Status { NOT_STARTED , RUNNING , FINISHED }
 

Public Member Functions

 SessionInfo (QString _session_id, QString _game_id, SessionInfo::Status _status, QString _host_id, QVector< Player > _players)
 
void read (const QJsonObject &json)
 
void write (QJsonObject &json) const
 

Public Attributes

QString session_id
 
QString game_id
 
SessionInfo::Status status = Status::FINISHED
 
QString host_id
 
QVector< Playerplayers
 
bool isHost = false
 

Detailed Description

Definition at line 9 of file sessioninfo.h.

Member Enumeration Documentation

◆ Status

enum class SessionInfo::Status
strong

Definition at line 10 of file sessioninfo.h.

Constructor & Destructor Documentation

◆ SessionInfo()

SessionInfo::SessionInfo ( QString  _session_id,
QString  _game_id,
SessionInfo::Status  _status,
QString  _host_id,
QVector< Player _players 
)

Definition at line 4 of file sessioninfo.cpp.

Member Function Documentation

◆ read()

void SessionInfo::read ( const QJsonObject &  json)

Definition at line 15 of file sessioninfo.cpp.

◆ write()

void SessionInfo::write ( QJsonObject &  json) const

Definition at line 49 of file sessioninfo.cpp.

Member Data Documentation

◆ game_id

QString SessionInfo::game_id

Definition at line 24 of file sessioninfo.h.

◆ host_id

QString SessionInfo::host_id

Definition at line 26 of file sessioninfo.h.

◆ isHost

bool SessionInfo::isHost = false

Definition at line 28 of file sessioninfo.h.

◆ players

QVector<Player> SessionInfo::players

Definition at line 27 of file sessioninfo.h.

◆ session_id

QString SessionInfo::session_id

Definition at line 23 of file sessioninfo.h.

◆ status

SessionInfo::Status SessionInfo::status = Status::FINISHED

Definition at line 25 of file sessioninfo.h.


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