Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
cServer::cTickThread Class Reference

The server tick thread takes care of the players who aren't yet spawned in a world. More...

Inheritance diagram for cServer::cTickThread:
Inheritance graph
[legend]
Collaboration diagram for cServer::cTickThread:
Collaboration graph
[legend]

Public Member Functions

 cTickThread (cServer &a_Server)
 
- Public Member Functions inherited from cIsThread
 cIsThread (AString &&a_ThreadName)
 
bool IsCurrentThread (void) const
 Returns true if the thread calling this function is the thread contained within this object. More...
 
void Start (void)
 Starts the thread; returns without waiting for the actual start. More...
 
void Stop (void)
 Signals the thread to terminate and waits until it's finished. More...
 
virtual ~cIsThread ()
 

Protected Member Functions

virtual void Execute (void) override
 This function, overloaded by the descendants, is called in the new thread. More...
 

Protected Attributes

cServerm_Server
 
- Protected Attributes inherited from cIsThread
std::atomic< bool > m_ShouldTerminate
 The overriden Execute() method should check this value periodically and terminate if this is true. More...
 

Private Types

using Super = cIsThread
 

Detailed Description

The server tick thread takes care of the players who aren't yet spawned in a world.

Definition at line 176 of file Server.h.

Member Typedef Documentation

◆ Super

Definition at line 179 of file Server.h.

Constructor & Destructor Documentation

◆ cTickThread()

cServer::cTickThread::cTickThread ( cServer a_Server)

Definition at line 67 of file Server.cpp.

Member Function Documentation

◆ Execute()

void cServer::cTickThread::Execute ( void  )
overrideprotectedvirtual

This function, overloaded by the descendants, is called in the new thread.

Implements cIsThread.

Definition at line 77 of file Server.cpp.

Member Data Documentation

◆ m_Server

cServer& cServer::cTickThread::m_Server
protected

Definition at line 186 of file Server.h.


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