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

#include <ObjectGuid.h>

Public Types

typedef uint32 LowType
 

Public Member Functions

constexpr ObjectGuid ()=default
 
PackedGuidReader ReadAsPacked ()
 
uint64 GetRawValue () const
 
void SetRawValue (uint64 guid)
 
void Clear ()
 
PackedGuidWriter WriteAsPacked () const
 
HighGuid GetHigh () const
 
uint32 GetEntry () const
 
LowType GetCounter () const
 
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

static LowType GetMaxCounter (HighGuid high)
 
static TypeID GetTypeId (HighGuid high)
 
static std::string_view GetTypeName (HighGuid high)
 
template<HighGuid type, std::enable_if_t< ObjectGuidTraits< type >::Format::value==ObjectGuidFormatType::OnlyCounter, int32 > = 0>
static constexpr ObjectGuid Create (LowType counter)
 
template<HighGuid type, std::enable_if_t< ObjectGuidTraits< type >::Format::value==ObjectGuidFormatType::CounterAndEntry, int32 > = 0>
static constexpr ObjectGuid Create (uint32 entry, LowType counter)
 

Static Public Attributes

static ObjectGuid const Empty = ObjectGuid()
 

Private Member Functions

bool HasEntry () const
 
 ObjectGuid (uint64 guid)
 

Static Private Member Functions

static constexpr bool HasEntry (HighGuid high)
 

Private Attributes

uint64 _guid = 0
 

Detailed Description

Definition at line 137 of file ObjectGuid.h.

Member Typedef Documentation

◆ LowType

Definition at line 142 of file ObjectGuid.h.

Constructor & Destructor Documentation

◆ ObjectGuid() [1/2]

constexpr ObjectGuid::ObjectGuid ( )
constexprdefault

◆ ObjectGuid() [2/2]

ObjectGuid::ObjectGuid ( uint64  guid)
inlineexplicitprivate

Definition at line 254 of file ObjectGuid.h.

Member Function Documentation

◆ Clear()

void ObjectGuid::Clear ( )
inline

Definition at line 150 of file ObjectGuid.h.

◆ Create() [1/2]

template<HighGuid type, std::enable_if_t< ObjectGuidTraits< type >::Format::value==ObjectGuidFormatType::OnlyCounter, int32 > = 0>
static constexpr ObjectGuid ObjectGuid::Create ( LowType  counter)
inlinestaticconstexpr

Definition at line 224 of file ObjectGuid.h.

◆ Create() [2/2]

template<HighGuid type, std::enable_if_t< ObjectGuidTraits< type >::Format::value==ObjectGuidFormatType::CounterAndEntry, int32 > = 0>
static constexpr ObjectGuid ObjectGuid::Create ( uint32  entry,
LowType  counter 
)
inlinestaticconstexpr

Definition at line 227 of file ObjectGuid.h.

◆ GetCounter()

LowType ObjectGuid::GetCounter ( ) const
inline

Definition at line 156 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetEntry()

uint32 ObjectGuid::GetEntry ( ) const
inline

Definition at line 155 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetHigh()

HighGuid ObjectGuid::GetHigh ( ) const
inline

Definition at line 154 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetMaxCounter() [1/2]

LowType ObjectGuid::GetMaxCounter ( ) const
inline

Definition at line 170 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 163 of file ObjectGuid.h.

◆ GetRawValue()

uint64 ObjectGuid::GetRawValue ( ) const
inline

Definition at line 148 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ GetTypeId() [1/2]

TypeID ObjectGuid::GetTypeId ( ) const
inline

Definition at line 212 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 191 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 219 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:

◆ HasEntry() [1/2]

bool ObjectGuid::HasEntry ( ) const
inlineprivate

Definition at line 252 of file ObjectGuid.h.

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

◆ HasEntry() [2/2]

static constexpr bool ObjectGuid::HasEntry ( HighGuid  high)
inlinestaticconstexprprivate

Definition at line 230 of file ObjectGuid.h.

◆ IsAnyTypeCreature()

bool ObjectGuid::IsAnyTypeCreature ( ) const
inline

Definition at line 178 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsAnyTypeGameObject()

bool ObjectGuid::IsAnyTypeGameObject ( ) const
inline

Definition at line 187 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCorpse()

bool ObjectGuid::IsCorpse ( ) const
inline

Definition at line 184 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCreature()

bool ObjectGuid::IsCreature ( ) const
inline

Definition at line 173 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsCreatureOrPet()

bool ObjectGuid::IsCreatureOrPet ( ) const
inline

Definition at line 176 of file ObjectGuid.h.

◆ IsCreatureOrVehicle()

bool ObjectGuid::IsCreatureOrVehicle ( ) const
inline

Definition at line 177 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsDynamicObject()

bool ObjectGuid::IsDynamicObject ( ) const
inline

Definition at line 183 of file ObjectGuid.h.

◆ IsEmpty()

bool ObjectGuid::IsEmpty ( ) const
inline

Definition at line 172 of file ObjectGuid.h.

◆ IsGameObject()

bool ObjectGuid::IsGameObject ( ) const
inline

Definition at line 182 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsGroup()

bool ObjectGuid::IsGroup ( ) const
inline

Definition at line 189 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsInstance()

bool ObjectGuid::IsInstance ( ) const
inline

Definition at line 188 of file ObjectGuid.h.

◆ IsItem()

bool ObjectGuid::IsItem ( ) const
inline

Definition at line 181 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsMOTransport()

bool ObjectGuid::IsMOTransport ( ) const
inline

Definition at line 186 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsPet()

bool ObjectGuid::IsPet ( ) const
inline

Definition at line 174 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsPlayer()

bool ObjectGuid::IsPlayer ( ) const
inline

Definition at line 179 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsTransport()

bool ObjectGuid::IsTransport ( ) const
inline

Definition at line 185 of file ObjectGuid.h.

◆ IsUnit()

bool ObjectGuid::IsUnit ( ) const
inline

Definition at line 180 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ IsVehicle()

bool ObjectGuid::IsVehicle ( ) const
inline

Definition at line 175 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ operator!()

bool ObjectGuid::operator! ( ) const
inline

Definition at line 214 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 146 of file ObjectGuid.h.

+ Here is the caller graph for this function:

◆ SetRawValue()

void ObjectGuid::SetRawValue ( uint64  guid)
inline

Definition at line 149 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 152 of file ObjectGuid.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _guid

uint64 ObjectGuid::_guid = 0
private

Definition at line 256 of file ObjectGuid.h.

◆ Empty

ObjectGuid const ObjectGuid::Empty = ObjectGuid()
static

Definition at line 140 of file ObjectGuid.h.


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