TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjectGuidGenerator< high > Class Template Reference

#include <ObjectGuid.h>

Public Member Functions

 ObjectGuidGenerator (ObjectGuid::LowType start=UI64LIT(1))
 
ObjectGuid::LowType Generate () override
 
- Public Member Functions inherited from ObjectGuidGeneratorBase
 ObjectGuidGeneratorBase (ObjectGuid::LowType start=UI64LIT(1))
 
virtual void Set (uint64 val)
 
ObjectGuid::LowType GetNextAfterMaxUsed () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from ObjectGuidGeneratorBase
static void HandleCounterOverflow (HighGuid high)
 
- Protected Attributes inherited from ObjectGuidGeneratorBase
uint64 _nextGuid
 

Constructor & Destructor Documentation

template<HighGuid high>
ObjectGuidGenerator< high >::ObjectGuidGenerator ( ObjectGuid::LowType  start = UI64LIT(1))
inlineexplicit
375 : ObjectGuidGeneratorBase(start) { }
ObjectGuidGeneratorBase(ObjectGuid::LowType start=UI64LIT(1))
Definition: ObjectGuid.h:360

Member Function Documentation

template<HighGuid high>
ObjectGuid::LowType ObjectGuidGenerator< high >::Generate ( )
inlineoverridevirtual

Implements ObjectGuidGeneratorBase.

378  {
379  if (_nextGuid >= ObjectGuid::GetMaxCounter(high) - 1)
380  HandleCounterOverflow(high);
381  return _nextGuid++;
382  }
uint64 _nextGuid
Definition: ObjectGuid.h:368
static void HandleCounterOverflow(HighGuid high)
Definition: ObjectGuid.cpp:193
LowType GetMaxCounter() const
Definition: ObjectGuid.h:228

+ Here is the call graph for this function:


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