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

#include <GroupMgr.h>

Public Types

typedef std::map< ObjectGuid::LowType, Group * > GroupContainer
 
typedef std::vector< Group * > GroupDbContainer
 

Public Member Functions

 GroupMgr (GroupMgr const &)=delete
 
 GroupMgr (GroupMgr &&)=delete
 
GroupMgr & operator= (GroupMgr const &)=delete
 
GroupMgr & operator= (GroupMgr &&)=delete
 
Group * GetGroupByGUID (ObjectGuid const &guid) const
 
uint32 GenerateNewGroupDbStoreId ()
 
void RegisterGroupDbStoreId (uint32 storageId, Group *group)
 
void FreeGroupDbStoreId (Group *group)
 
void SetNextGroupDbStoreId (uint32 storageId)
 
Group * GetGroupByDbStoreId (uint32 storageId) const
 
void SetGroupDbStoreSize (uint32 newSize)
 
void Update (uint32 diff)
 
void LoadGroups ()
 
ObjectGuid::LowType GenerateGroupId ()
 
void AddGroup (Group *group)
 
void RemoveGroup (Group *group)
 

Static Public Member Functions

static GroupMgr * instance ()
 

Protected Attributes

ObjectGuid::LowType NextGroupId
 
uint32 NextGroupDbStoreId
 
GroupContainer GroupStore
 
GroupDbContainer GroupDbStore
 

Private Member Functions

 GroupMgr ()
 
 ~GroupMgr ()
 

Detailed Description

Definition at line 26 of file GroupMgr.h.

Member Typedef Documentation

◆ GroupContainer

Definition at line 40 of file GroupMgr.h.

◆ GroupDbContainer

typedef std::vector<Group*> GroupMgr::GroupDbContainer

Definition at line 41 of file GroupMgr.h.

Constructor & Destructor Documentation

◆ GroupMgr() [1/3]

GroupMgr::GroupMgr ( )
private

Definition at line 25 of file GroupMgr.cpp.

References NextGroupDbStoreId, NextGroupId, and UI64LIT.

◆ ~GroupMgr()

GroupMgr::~GroupMgr ( )
private

Definition at line 31 of file GroupMgr.cpp.

References GroupStore.

◆ GroupMgr() [2/3]

GroupMgr::GroupMgr ( GroupMgr const &  )
delete

◆ GroupMgr() [3/3]

GroupMgr::GroupMgr ( GroupMgr &&  )
delete

Member Function Documentation

◆ AddGroup()

void GroupMgr::AddGroup ( Group *  group)

Definition at line 122 of file GroupMgr.cpp.

References ObjectGuid::GetCounter(), Group::GetGUID(), and GroupStore.

Referenced by LoadGroups().

◆ FreeGroupDbStoreId()

void GroupMgr::FreeGroupDbStoreId ( Group *  group)

Definition at line 68 of file GroupMgr.cpp.

References Group::GetDbStoreId(), GroupDbStore, and NextGroupDbStoreId.

◆ GenerateGroupId()

ObjectGuid::LowType GroupMgr::GenerateGroupId ( )

Definition at line 91 of file GroupMgr.cpp.

References ERROR_EXIT_CODE, NextGroupId, World::StopNow(), and TC_LOG_ERROR.

◆ GenerateNewGroupDbStoreId()

uint32 GroupMgr::GenerateNewGroupDbStoreId ( )

◆ GetGroupByDbStoreId()

Group * GroupMgr::GetGroupByDbStoreId ( uint32  storageId) const

Definition at line 78 of file GroupMgr.cpp.

References GroupDbStore.

Referenced by LoadGroups().

◆ GetGroupByGUID()

Group * GroupMgr::GetGroupByGUID ( ObjectGuid const &  guid) const

Definition at line 107 of file GroupMgr.cpp.

References ObjectGuid::GetCounter(), and GroupStore.

◆ instance()

GroupMgr * GroupMgr::instance ( )
static

Definition at line 101 of file GroupMgr.cpp.

References instance().

Referenced by instance().

◆ LoadGroups()

◆ operator=() [1/2]

GroupMgr & GroupMgr::operator= ( GroupMgr &&  )
delete

◆ operator=() [2/2]

GroupMgr & GroupMgr::operator= ( GroupMgr const &  )
delete

◆ RegisterGroupDbStoreId()

void GroupMgr::RegisterGroupDbStoreId ( uint32  storageId,
Group *  group 
)

Definition at line 59 of file GroupMgr.cpp.

References GroupDbStore.

Referenced by LoadGroups().

◆ RemoveGroup()

void GroupMgr::RemoveGroup ( Group *  group)

Definition at line 127 of file GroupMgr.cpp.

References ObjectGuid::GetCounter(), Group::GetGUID(), and GroupStore.

◆ SetGroupDbStoreSize()

void GroupMgr::SetGroupDbStoreSize ( uint32  newSize)

Definition at line 86 of file GroupMgr.cpp.

References GroupDbStore.

◆ SetNextGroupDbStoreId()

void GroupMgr::SetNextGroupDbStoreId ( uint32  storageId)
inline

Definition at line 48 of file GroupMgr.h.

◆ Update()

void GroupMgr::Update ( uint32  diff)

Definition at line 116 of file GroupMgr.cpp.

References GroupStore, and Group::Update().

Member Data Documentation

◆ GroupDbStore

◆ GroupStore

GroupContainer GroupMgr::GroupStore
protected

Definition at line 62 of file GroupMgr.h.

Referenced by AddGroup(), GetGroupByGUID(), RemoveGroup(), Update(), and ~GroupMgr().

◆ NextGroupDbStoreId

uint32 GroupMgr::NextGroupDbStoreId
protected

Definition at line 61 of file GroupMgr.h.

Referenced by FreeGroupDbStoreId(), GenerateNewGroupDbStoreId(), GroupMgr(), and LoadGroups().

◆ NextGroupId

ObjectGuid::LowType GroupMgr::NextGroupId
protected

Definition at line 60 of file GroupMgr.h.

Referenced by GenerateGroupId(), and GroupMgr().


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