TrinityCore
Loading...
Searching...
No Matches
RealmList Class Reference

Storage object for the list of realms on the server. More...

#include <RealmList.h>

Public Types

typedef std::map< RealmHandle, RealmRealmMap
 

Public Member Functions

 ~RealmList ()
 
void Initialize (Trinity::Asio::IoContext &ioContext, uint32 updateInterval)
 
void Close ()
 
RealmMap const & GetRealms () const
 
Realm const * GetRealm (RealmHandle const &id) const
 

Static Public Member Functions

static RealmListInstance ()
 

Private Member Functions

 RealmList ()
 
void UpdateRealms (boost::system::error_code const &error)
 
void UpdateRealm (RealmHandle const &id, uint32 build, std::string const &name, boost::asio::ip::address &&address, boost::asio::ip::address &&localAddr, boost::asio::ip::address &&localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population)
 

Private Attributes

RealmMap _realms
 
uint32 _updateInterval
 
std::unique_ptr< Trinity::Asio::DeadlineTimer_updateTimer
 
std::unique_ptr< Trinity::Asio::Resolver_resolver
 

Detailed Description

Storage object for the list of realms on the server.

Definition at line 34 of file RealmList.h.

Member Typedef Documentation

◆ RealmMap

Definition at line 37 of file RealmList.h.

Constructor & Destructor Documentation

◆ ~RealmList()

RealmList::~RealmList ( )
default

◆ RealmList()

RealmList::RealmList ( )
private

Definition at line 28 of file RealmList.cpp.

Member Function Documentation

◆ Close()

void RealmList::Close ( )

Definition at line 52 of file RealmList.cpp.

◆ GetRealm()

Realm const * RealmList::GetRealm ( RealmHandle const &  id) const

Definition at line 175 of file RealmList.cpp.

◆ GetRealms()

RealmMap const & RealmList::GetRealms ( ) const
inline

Definition at line 46 of file RealmList.h.

◆ Initialize()

void RealmList::Initialize ( Trinity::Asio::IoContext ioContext,
uint32  updateInterval 
)

Definition at line 41 of file RealmList.cpp.

+ Here is the call graph for this function:

◆ Instance()

RealmList * RealmList::Instance ( )
static

Definition at line 34 of file RealmList.cpp.

◆ UpdateRealm()

void RealmList::UpdateRealm ( RealmHandle const &  id,
uint32  build,
std::string const &  name,
boost::asio::ip::address &&  address,
boost::asio::ip::address &&  localAddr,
boost::asio::ip::address &&  localSubmask,
uint16  port,
uint8  icon,
RealmFlags  flag,
uint8  timezone,
AccountTypes  allowedSecurityLevel,
float  population 
)
private

Definition at line 57 of file RealmList.cpp.

+ Here is the caller graph for this function:

◆ UpdateRealms()

void RealmList::UpdateRealms ( boost::system::error_code const &  error)
private

Definition at line 81 of file RealmList.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _realms

RealmMap RealmList::_realms
private

Definition at line 57 of file RealmList.h.

◆ _resolver

std::unique_ptr<Trinity::Asio::Resolver> RealmList::_resolver
private

Definition at line 60 of file RealmList.h.

◆ _updateInterval

uint32 RealmList::_updateInterval
private

Definition at line 58 of file RealmList.h.

◆ _updateTimer

std::unique_ptr<Trinity::Asio::DeadlineTimer> RealmList::_updateTimer
private

Definition at line 59 of file RealmList.h.


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