#include <C4Client.h>
Public Member Functions | |
C4ClientList () | |
~C4ClientList () | |
C4ClientList & | operator= (const C4ClientList &List) |
void | Clear () |
C4Client * | getClient (const C4Client *pAfter=nullptr) const |
C4Client * | getLocal () const |
C4Client * | getClientByID (int32_t iID) const |
C4Client * | getHost () const |
C4Client * | getNextClientByID (int32_t iAfterID) const |
C4Client * | getClientByName (const char *szName) const |
int32_t | getClientCnt () const |
const C4ClientCore & | getLocalCore () const |
const char * | getLocalName () const |
int32_t | getLocalID () const |
StdStrBuf | GetAllClientNames () const |
bool | Init (int32_t iLocalClientID=C4ClientIDHost) |
void | InitNetwork (class C4Network2ClientList *pNetClients) |
void | ClearNetwork () |
bool | Remove (C4Client *pClient, bool fTemporary=false) |
C4Client * | Add (const C4ClientCore &Core) |
C4Client * | AddLocal (int32_t iID, bool fActivated, bool fObserver) |
void | SetLocalID (int32_t iID) |
void | CtrlRemove (const C4Client *pClient, const char *szReason) |
void | RemoveRemote () |
void | CompileFunc (StdCompiler *pComp) |
Protected Member Functions | |
void | Add (C4Client *pClient) |
Protected Attributes | |
C4Client * | pFirst {nullptr} |
C4Client * | pLocal {nullptr} |
class C4Network2ClientList * | pNetClients {nullptr} |
Definition at line 137 of file C4Client.h.
|
default |
C4ClientList::~C4ClientList | ( | ) |
Definition at line 165 of file C4Client.cpp.
References Clear().
|
protected |
Definition at line 181 of file C4Client.cpp.
References getClientByID(), C4Client::getID(), C4Client::isLocal(), pFirst, pLocal, pNetClients, and C4Network2ClientList::RegClient().
Referenced by Add(), AddLocal(), CompileFunc(), C4Network2::HostConnect(), operator=(), and SetLocalID().
C4Client * C4ClientList::Add | ( | const C4ClientCore & | Core | ) |
Definition at line 297 of file C4Client.cpp.
References Add(), getClientByID(), C4ClientCore::getID(), and Log().
C4Client * C4ClientList::AddLocal | ( | int32_t | iID, |
bool | fActivated, | ||
bool | fObserver | ||
) |
Definition at line 308 of file C4Client.cpp.
References Add(), pLocal, C4Client::SetLocal(), and C4ClientCore::SetLocal().
Referenced by Init().
void C4ClientList::Clear | ( | ) |
Definition at line 170 of file C4Client.cpp.
References ClearNetwork(), pFirst, and Remove().
Referenced by C4GameParameters::Clear(), CompileFunc(), Init(), and ~C4ClientList().
void C4ClientList::ClearNetwork | ( | ) |
Definition at line 262 of file C4Client.cpp.
References C4Network2ClientList::Clear(), and pNetClients.
Referenced by Clear(), and C4Network2ClientList::Clear().
void C4ClientList::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 393 of file C4Client.cpp.
References Add(), Clear(), getClientCnt(), StdCompiler::isDeserializer(), mkNamingAdapt(), mkNamingCountAdapt(), pFirst, and StdCompiler::Value().
void C4ClientList::CtrlRemove | ( | const C4Client * | pClient, |
const char * | szReason | ||
) |
Definition at line 333 of file C4Client.cpp.
References CDT_Sync, CID_ClientRemove, Control, C4GameControl::DoInput(), C4Client::getID(), C4Client::getNetClient(), C4Client::isHost(), NCS_Remove, pLocal, and C4Network2Client::SetStatus().
Referenced by ConsoleDlgProc(), C4MainMenu::MenuCommand(), C4Network2::OnClientDisconnect(), C4Network2::OnGameSynchronized(), and C4MessageInput::ProcessCommand().
StdStrBuf C4ClientList::GetAllClientNames | ( | ) | const |
Definition at line 232 of file C4Client.cpp.
References StdStrBuf::Append(), StdStrBuf::getSize(), and pFirst.
Referenced by C4StartupNetListEntry::SetReference().
Definition at line 160 of file C4Client.h.
References pFirst.
Referenced by C4MainMenu::ActivateMain(), C4GameControlNetwork::CopyClientList(), and C4Network2ClientListBox::Update().
C4Client * C4ClientList::getClientByID | ( | int32_t | iID | ) | const |
Definition at line 200 of file C4Client.cpp.
References pFirst.
Referenced by Add(), ConsoleDlgProc(), C4Network2Players::GetClientChatColor(), C4ControlVote::getDesc(), getHost(), C4Network2::HandleJoinData(), C4Network2Players::HandlePlayerInfo(), C4Game::InitNetworkFromReference(), C4MainMenu::MenuCommand(), C4Network2Players::OnStatusGoReached(), C4Network2::OpenVoteDialog(), operator=(), C4ControlJoinPlayer::PreExecute(), C4PlayerInfoList::RecreatePlayers(), C4PlayerInfoList::SetAsRestoreInfos(), and C4Network2ClientDlg::UpdateText().
C4Client * C4ClientList::getClientByName | ( | const char * | szName | ) | const |
Definition at line 216 of file C4Client.cpp.
References pFirst, and SEqual().
Referenced by C4MessageInput::ProcessCommand().
int32_t C4ClientList::getClientCnt | ( | ) | const |
Definition at line 224 of file C4Client.cpp.
Referenced by CompileFunc(), and C4StartupNetListEntry::SetReference().
|
inline |
Definition at line 163 of file C4Client.h.
References C4ClientIDHost, and getClientByID().
Referenced by C4StartupNetListEntry::IsSameHost(), C4StartupNetListEntry::KeywordMatch(), and C4StartupNetListEntry::SetReference().
|
inline |
Definition at line 161 of file C4Client.h.
References pLocal.
Referenced by C4GameControl::ChangeToLocal(), C4GameControlNetwork::DecideControlDelivery(), getLocalCore(), C4Game::InitControl(), C4Game::InitNetworkFromReference(), C4Game::InitNetworkHost(), C4Network2Players::JoinLocalPlayer(), C4GameControl::Prepare(), and C4Network2::RequestActivate().
|
inline |
Definition at line 169 of file C4Client.h.
References C4Client::getCore(), and getLocal().
Referenced by getLocalID(), getLocalName(), and C4Network2::InitNetIO().
|
inline |
Definition at line 171 of file C4Client.h.
References C4ClientIDUnknown, C4ClientCore::getID(), getLocalCore(), and pLocal.
Referenced by C4Network2::EndVote(), C4Network2Players::GetLocalPlayerInfoPacket(), C4Network2::InitHost(), C4GameLobby::MainDlg::OnClientAddPlayer(), C4GameLobby::MainDlg::OnMessage(), C4GameLobby::MainDlg::OnReadyCheck(), C4Network2::OpenVoteDialog(), C4Network2::RetrieveScenario(), C4Console::UpdateNetMenu(), and C4Network2::Vote().
|
inline |
Definition at line 170 of file C4Client.h.
References getLocalCore(), C4ClientCore::getName(), and pLocal.
Referenced by C4PlayerList::FileInUse(), and C4Console::UpdateNetMenu().
C4Client * C4ClientList::getNextClientByID | ( | int32_t | iAfterID | ) | const |
bool C4ClientList::Init | ( | int32_t | iLocalClientID = C4ClientIDHost | ) |
Definition at line 243 of file C4Client.cpp.
References AddLocal(), and Clear().
Referenced by C4Game::InitNetworkFromReference(), and C4Game::InitNetworkHost().
void C4ClientList::InitNetwork | ( | class C4Network2ClientList * | pNetClients | ) |
Definition at line 251 of file C4Client.cpp.
References C4Network2ClientList::Clear(), pFirst, pNetClients, and C4Network2ClientList::RegClient().
Referenced by C4Network2ClientList::Init().
C4ClientList & C4ClientList::operator= | ( | const C4ClientList & | List | ) |
Definition at line 361 of file C4Client.cpp.
References Add(), getClientByID(), C4Client::getCore(), C4Client::getID(), pFirst, Remove(), and C4Client::SetCore().
bool C4ClientList::Remove | ( | C4Client * | pClient, |
bool | fTemporary = false |
||
) |
Definition at line 270 of file C4Client.cpp.
References C4Network2ClientList::DeleteClient(), C4Client::getNetClient(), pFirst, pLocal, pNetClients, and C4Client::Remove().
Referenced by Clear(), operator=(), RemoveRemote(), and SetLocalID().
void C4ClientList::RemoveRemote | ( | ) |
Definition at line 346 of file C4Client.cpp.
References pFirst, and Remove().
Referenced by C4GameControl::ChangeToLocal().
void C4ClientList::SetLocalID | ( | int32_t | iID | ) |
Definition at line 324 of file C4Client.cpp.
References Add(), pLocal, Remove(), and C4Client::SetID().
Referenced by C4Network2::HandleJoinData().
|
protected |
Definition at line 149 of file C4Client.h.
Referenced by Add(), Clear(), CompileFunc(), GetAllClientNames(), getClient(), getClientByID(), getClientByName(), getClientCnt(), getNextClientByID(), InitNetwork(), operator=(), Remove(), and RemoveRemote().
|
protected |
Definition at line 152 of file C4Client.h.
Referenced by Add(), AddLocal(), CtrlRemove(), getLocal(), getLocalID(), getLocalName(), Remove(), and SetLocalID().
|
protected |
Definition at line 155 of file C4Client.h.
Referenced by Add(), ClearNetwork(), InitNetwork(), and Remove().