TrinityCore
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjectGuid Class Reference

#include <ObjectGuid.h>

Public Types

typedef uint32 LowType
 

Public Member Functions

 ObjectGuid ()
 
 ObjectGuid (uint64 guid)
 
 ObjectGuid (HighGuid hi, uint32 entry, LowType counter)
 
 ObjectGuid (HighGuid hi, LowType counter)
 
 operator uint64 () const
 
PackedGuidReader ReadAsPacked ()
 
void Set (uint64 guid)
 
void Clear ()
 
PackedGuidWriter WriteAsPacked () const
 
uint64 GetRawValue () const
 
HighGuid GetHigh () const
 
uint32 GetEntry () const
 
LowType GetCounter () const
 
ObjectGuid::LowType GetMaxCounter () const
 
bool IsEmpty () const
 
bool IsCreature () const
 
bool IsPet () const
 
bool IsVehicle () const
 
bool IsCreatureOrPet () const
 
bool IsCreatureOrVehicle () const
 
bool IsAnyTypeCreature () const
 
bool IsPlayer () const
 
bool IsUnit () const
 
bool IsItem () const
 
bool IsGameObject () const
 
bool IsDynamicObject () const
 
bool IsCorpse () const
 
bool IsTransport () const
 
bool IsMOTransport () const
 
bool IsAnyTypeGameObject () const
 
bool IsInstance () const
 
bool IsGroup () const
 
TypeID GetTypeId () const
 
bool operator! () const
 
bool operator== (ObjectGuid const &right) const =default
 
std::strong_ordering operator<=> (ObjectGuid const &right) const =default
 
std::string_view GetTypeName () const
 
std::string ToString () const
 
std::string ToHexString () const
 

Static Public Member Functions

template<HighGuid type>
static std::enable_if< ObjectGuidTraits< type >::Global, ObjectGuid >::type Create (LowType counter)
 
template<HighGuid type>
static std::enable_if< ObjectGuidTraits< type >::MapSpecific, ObjectGuid >::type Create (uint32 entry, LowType counter)
 
static LowType GetMaxCounter (HighGuid high)
 
static TypeID GetTypeId (HighGuid high)
 
static std::string_view GetTypeName (HighGuid high)
 

Static Public Attributes

static ObjectGuid const Empty = ObjectGuid()
 

Private Member Functions

bool HasEntry () const
 
 ObjectGuid (uint32 const &)=delete
 
 ObjectGuid (HighGuid, uint32, uint64 counter)=delete
 
 ObjectGuid (HighGuid, uint64 counter)=delete
 

Static Private Member Functions

static bool HasEntry (HighGuid high)
 
static ObjectGuid Global (HighGuid type, LowType counter)
 
static ObjectGuid MapSpecific (HighGuid type, uint32 entry, LowType counter)
 

Private Attributes

uint64 _guid
 

Detailed Description

Definition at line 129 of file ObjectGuid.h.

Member Typedef Documentation

◆ LowType

Definition at line 134 of file ObjectGuid.h.

Constructor & Destructor Documentation

◆ ObjectGuid() [1/7]

ObjectGuid::ObjectGuid ( )
inline

Definition at line 142 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ ObjectGuid() [2/7]

ObjectGuid::ObjectGuid ( uint64  guid)
inlineexplicit

Definition at line 143 of file ObjectGuid.h.

◆ ObjectGuid() [3/7]

ObjectGuid::ObjectGuid ( HighGuid  hi,
uint32  entry,
LowType  counter 
)
inline

Definition at line 144 of file ObjectGuid.h.

◆ ObjectGuid() [4/7]

ObjectGuid::ObjectGuid ( HighGuid  hi,
LowType  counter 
)
inline

Definition at line 145 of file ObjectGuid.h.

◆ ObjectGuid() [5/7]

ObjectGuid::ObjectGuid ( uint32 const &  )
explicitprivatedelete

◆ ObjectGuid() [6/7]

ObjectGuid::ObjectGuid ( HighGuid  ,
uint32  ,
uint64  counter 
)
privatedelete

◆ ObjectGuid() [7/7]

ObjectGuid::ObjectGuid ( HighGuid  ,
uint64  counter 
)
privatedelete

Member Function Documentation

◆ Clear()

void ObjectGuid::Clear ( )
inline

Definition at line 151 of file ObjectGuid.h.

◆ Create() [1/2]

template<HighGuid type>
static std::enable_if< ObjectGuidTraits< type >::Global, ObjectGuid >::type ObjectGuid::Create ( LowType  counter)
inlinestatic

Definition at line 137 of file ObjectGuid.h.

◆ Create() [2/2]

template<HighGuid type>
static std::enable_if< ObjectGuidTraits< type >::MapSpecific, ObjectGuid >::type ObjectGuid::Create ( uint32  entry,
LowType  counter 
)
inlinestatic

Definition at line 140 of file ObjectGuid.h.

◆ GetCounter()

LowType ObjectGuid::GetCounter ( ) const
inline

Definition at line 158 of file ObjectGuid.h.

◆ GetEntry()

uint32 ObjectGuid::GetEntry ( ) const
inline

Definition at line 157 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetHigh()

HighGuid ObjectGuid::GetHigh ( ) const
inline

Definition at line 156 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetMaxCounter() [1/2]

ObjectGuid::LowType ObjectGuid::GetMaxCounter ( ) const
inline

Definition at line 172 of file ObjectGuid.h.

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

◆ GetMaxCounter() [2/2]

static LowType ObjectGuid::GetMaxCounter ( HighGuid  high)
inlinestatic

Definition at line 165 of file ObjectGuid.h.

◆ GetRawValue()

uint64 ObjectGuid::GetRawValue ( ) const
inline

Definition at line 155 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetTypeId() [1/2]

TypeID ObjectGuid::GetTypeId ( ) const
inline

Definition at line 214 of file ObjectGuid.h.

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

◆ GetTypeId() [2/2]

static TypeID ObjectGuid::GetTypeId ( HighGuid  high)
inlinestatic

Definition at line 193 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetTypeName() [1/2]

std::string_view ObjectGuid::GetTypeName ( ) const
inline

Definition at line 221 of file ObjectGuid.h.

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

◆ GetTypeName() [2/2]

std::string_view ObjectGuid::GetTypeName ( HighGuid  high)
static

Definition at line 89 of file ObjectGuid.cpp.

+ Here is the caller graph for this function:

◆ Global()

ObjectGuid ObjectGuid::Global ( HighGuid  type,
LowType  counter 
)
staticprivate

Definition at line 120 of file ObjectGuid.cpp.

+ Here is the call graph for this function:

◆ HasEntry() [1/2]

bool ObjectGuid::HasEntry ( ) const
inlineprivate

Definition at line 248 of file ObjectGuid.h.

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

◆ HasEntry() [2/2]

static bool ObjectGuid::HasEntry ( HighGuid  high)
inlinestaticprivate

Definition at line 226 of file ObjectGuid.h.

◆ IsAnyTypeCreature()

bool ObjectGuid::IsAnyTypeCreature ( ) const
inline

Definition at line 180 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsAnyTypeGameObject()

bool ObjectGuid::IsAnyTypeGameObject ( ) const
inline

Definition at line 189 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCorpse()

bool ObjectGuid::IsCorpse ( ) const
inline

Definition at line 186 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCreature()

bool ObjectGuid::IsCreature ( ) const
inline

Definition at line 175 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCreatureOrPet()

bool ObjectGuid::IsCreatureOrPet ( ) const
inline

Definition at line 178 of file ObjectGuid.h.

◆ IsCreatureOrVehicle()

bool ObjectGuid::IsCreatureOrVehicle ( ) const
inline

Definition at line 179 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsDynamicObject()

bool ObjectGuid::IsDynamicObject ( ) const
inline

Definition at line 185 of file ObjectGuid.h.

◆ IsEmpty()

bool ObjectGuid::IsEmpty ( ) const
inline

Definition at line 174 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsGameObject()

bool ObjectGuid::IsGameObject ( ) const
inline

Definition at line 184 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsGroup()

bool ObjectGuid::IsGroup ( ) const
inline

Definition at line 191 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsInstance()

bool ObjectGuid::IsInstance ( ) const
inline

Definition at line 190 of file ObjectGuid.h.

◆ IsItem()

bool ObjectGuid::IsItem ( ) const
inline

Definition at line 183 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsMOTransport()

bool ObjectGuid::IsMOTransport ( ) const
inline

Definition at line 188 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsPet()

bool ObjectGuid::IsPet ( ) const
inline

Definition at line 176 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsPlayer()

bool ObjectGuid::IsPlayer ( ) const
inline

Definition at line 181 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsTransport()

bool ObjectGuid::IsTransport ( ) const
inline

Definition at line 187 of file ObjectGuid.h.

◆ IsUnit()

bool ObjectGuid::IsUnit ( ) const
inline

Definition at line 182 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsVehicle()

bool ObjectGuid::IsVehicle ( ) const
inline

Definition at line 177 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ MapSpecific()

ObjectGuid ObjectGuid::MapSpecific ( HighGuid  type,
uint32  entry,
LowType  counter 
)
staticprivate

Definition at line 125 of file ObjectGuid.cpp.

+ Here is the call graph for this function:

◆ operator uint64()

ObjectGuid::operator uint64 ( ) const
inline

Definition at line 147 of file ObjectGuid.h.

◆ operator!()

bool ObjectGuid::operator! ( ) const
inline

Definition at line 216 of file ObjectGuid.h.

◆ operator<=>()

std::strong_ordering ObjectGuid::operator<=> ( ObjectGuid const &  right) const
default

◆ operator==()

bool ObjectGuid::operator== ( ObjectGuid const &  right) const
default

◆ ReadAsPacked()

PackedGuidReader ObjectGuid::ReadAsPacked ( )
inline

Definition at line 148 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ Set()

void ObjectGuid::Set ( uint64  guid)
inline

Definition at line 150 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ ToHexString()

std::string ObjectGuid::ToHexString ( ) const

Definition at line 115 of file ObjectGuid.cpp.

+ Here is the call graph for this function:

◆ ToString()

std::string ObjectGuid::ToString ( ) const

Definition at line 110 of file ObjectGuid.cpp.

+ Here is the call graph for this function:

◆ WriteAsPacked()

PackedGuidWriter ObjectGuid::WriteAsPacked ( ) const
inline

Definition at line 153 of file ObjectGuid.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _guid

uint64 ObjectGuid::_guid
private

Definition at line 257 of file ObjectGuid.h.

◆ Empty

ObjectGuid const ObjectGuid::Empty = ObjectGuid()
static

Definition at line 132 of file ObjectGuid.h.


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