AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ObjectGuidGeneratorBase Class Referenceabstract

#include "ObjectGuid.h"

Inheritance diagram for ObjectGuidGeneratorBase:
ObjectGuidGenerator< high >

Public Member Functions

 ObjectGuidGeneratorBase (ObjectGuid::LowType start=1)
 
virtual void Set (ObjectGuid::LowType val)
 
virtual ObjectGuid::LowType Generate ()=0
 
ObjectGuid::LowType GetNextAfterMaxUsed () const
 
virtual ~ObjectGuidGeneratorBase ()=default
 

Static Protected Member Functions

static void HandleCounterOverflow (HighGuid high)
 

Protected Attributes

ObjectGuid::LowType _nextGuid
 

Detailed Description

Constructor & Destructor Documentation

◆ ObjectGuidGeneratorBase()

ObjectGuidGeneratorBase::ObjectGuidGeneratorBase ( ObjectGuid::LowType  start = 1)
inline
283: _nextGuid(start) { }
ObjectGuid::LowType _nextGuid
Definition: ObjectGuid.h:292

◆ ~ObjectGuidGeneratorBase()

virtual ObjectGuidGeneratorBase::~ObjectGuidGeneratorBase ( )
virtualdefault

Member Function Documentation

◆ Generate()

virtual ObjectGuid::LowType ObjectGuidGeneratorBase::Generate ( )
pure virtual

Implemented in ObjectGuidGenerator< high >.

◆ GetNextAfterMaxUsed()

ObjectGuid::LowType ObjectGuidGeneratorBase::GetNextAfterMaxUsed ( ) const
inline
287{ return _nextGuid; }

References _nextGuid.

◆ HandleCounterOverflow()

void ObjectGuidGeneratorBase::HandleCounterOverflow ( HighGuid  high)
staticprotected
94{
95 LOG_ERROR("entities.object", "{} guid overflow!! Can't continue, shutting down server. ", ObjectGuid::GetTypeName(high));
97}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
@ ERROR_EXIT_CODE
Definition: World.h:55
char const * GetTypeName() const
Definition: ObjectGuid.h:211
static void StopNow(uint8 exitcode)
Definition: World.h:254

References ERROR_EXIT_CODE, ObjectGuid::GetTypeName(), LOG_ERROR, and World::StopNow().

Referenced by ObjectGuidGenerator< high >::Generate().

◆ Set()

virtual void ObjectGuidGeneratorBase::Set ( ObjectGuid::LowType  val)
inlinevirtual
285{ _nextGuid = val; }

References _nextGuid.

Member Data Documentation

◆ _nextGuid

ObjectGuid::LowType ObjectGuidGeneratorBase::_nextGuid
protected