TrinityCore
ObjectGuid.h File Reference
#include "Define.h"
#include "EnumFlag.h"
#include <deque>
#include <functional>
#include <list>
#include <set>
#include <string>
#include <type_traits>
#include <vector>
#include <unordered_set>
+ Include dependency graph for ObjectGuid.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ObjectGuidTraits< high >
 
class  ObjectGuidFactory
 
class  ObjectGuid
 
class  ObjectGuidGeneratorBase
 
class  ObjectGuidGenerator< high >
 
struct  std::hash< ObjectGuid >
 

Namespaces

 Trinity
 
 Trinity::Legacy
 

Macros

#define NUM_CLIENT_OBJECT_TYPES   14
 
#define MAKE_GUID_TRAIT(high, sequence, format)
 

Typedefs

using GuidSet = std::set< ObjectGuid >
 
using GuidList = std::list< ObjectGuid >
 
using GuidDeque = std::deque< ObjectGuid >
 
using GuidVector = std::vector< ObjectGuid >
 
using GuidUnorderedSet = std::unordered_set< ObjectGuid >
 

Enumerations

enum  TypeID {
  TYPEID_OBJECT = 0, TYPEID_ITEM = 1, TYPEID_CONTAINER = 2, TYPEID_AZERITE_EMPOWERED_ITEM = 3,
  TYPEID_AZERITE_ITEM = 4, TYPEID_UNIT = 5, TYPEID_PLAYER = 6, TYPEID_ACTIVE_PLAYER = 7,
  TYPEID_GAMEOBJECT = 8, TYPEID_DYNAMICOBJECT = 9, TYPEID_CORPSE = 10, TYPEID_AREATRIGGER = 11,
  TYPEID_SCENEOBJECT = 12, TYPEID_CONVERSATION = 13
}
 
enum  TypeMask {
  TYPEMASK_OBJECT = 0x0001, TYPEMASK_ITEM = 0x0002, TYPEMASK_CONTAINER = 0x0004, TYPEMASK_AZERITE_EMPOWERED_ITEM = 0x0008,
  TYPEMASK_AZERITE_ITEM = 0x0010, TYPEMASK_UNIT = 0x0020, TYPEMASK_PLAYER = 0x0040, TYPEMASK_ACTIVE_PLAYER = 0x0080,
  TYPEMASK_GAMEOBJECT = 0x0100, TYPEMASK_DYNAMICOBJECT = 0x0200, TYPEMASK_CORPSE = 0x0400, TYPEMASK_AREATRIGGER = 0x0800,
  TYPEMASK_SCENEOBJECT = 0x1000, TYPEMASK_CONVERSATION = 0x2000, TYPEMASK_SEER = TYPEMASK_PLAYER | TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
}
 
enum  HighGuid {
  HighGuid::Null = 0, HighGuid::Uniq = 1, HighGuid::Player = 2, HighGuid::Item = 3,
  HighGuid::WorldTransaction = 4, HighGuid::StaticDoor = 5, HighGuid::Transport = 6, HighGuid::Conversation = 7,
  HighGuid::Creature = 8, HighGuid::Vehicle = 9, HighGuid::Pet = 10, HighGuid::GameObject = 11,
  HighGuid::DynamicObject = 12, HighGuid::AreaTrigger = 13, HighGuid::Corpse = 14, HighGuid::LootObject = 15,
  HighGuid::SceneObject = 16, HighGuid::Scenario = 17, HighGuid::AIGroup = 18, HighGuid::DynamicDoor = 19,
  HighGuid::ClientActor = 20, HighGuid::Vignette = 21, HighGuid::CallForHelp = 22, HighGuid::AIResource = 23,
  HighGuid::AILock = 24, HighGuid::AILockTicket = 25, HighGuid::ChatChannel = 26, HighGuid::Party = 27,
  HighGuid::Guild = 28, HighGuid::WowAccount = 29, HighGuid::BNetAccount = 30, HighGuid::GMTask = 31,
  HighGuid::MobileSession = 32, HighGuid::RaidGroup = 33, HighGuid::Spell = 34, HighGuid::Mail = 35,
  HighGuid::WebObj = 36, HighGuid::LFGObject = 37, HighGuid::LFGList = 38, HighGuid::UserRouter = 39,
  HighGuid::PVPQueueGroup = 40, HighGuid::UserClient = 41, HighGuid::PetBattle = 42, HighGuid::UniqUserClient = 43,
  HighGuid::BattlePet = 44, HighGuid::CommerceObj = 45, HighGuid::ClientSession = 46, HighGuid::Cast = 47,
  HighGuid::ClientConnection = 48, HighGuid::ClubFinder = 49, HighGuid::ToolsClient = 50, HighGuid::WorldLayer = 51,
  HighGuid::ArenaTeam = 52, HighGuid::Count
}
 
enum  ObjectGuidSequenceSource { ObjectGuidSequenceSource::None = 0x0, ObjectGuidSequenceSource::Global = 0x1, ObjectGuidSequenceSource::Realm = 0x2, ObjectGuidSequenceSource::Map = 0x4 }
 
enum  ObjectGuidFormatType {
  ObjectGuidFormatType::Null, ObjectGuidFormatType::Uniq, ObjectGuidFormatType::Player, ObjectGuidFormatType::Item,
  ObjectGuidFormatType::WorldObject, ObjectGuidFormatType::Transport, ObjectGuidFormatType::ClientActor, ObjectGuidFormatType::ChatChannel,
  ObjectGuidFormatType::Global, ObjectGuidFormatType::Guild, ObjectGuidFormatType::MobileSession, ObjectGuidFormatType::WebObj,
  ObjectGuidFormatType::LFGObject, ObjectGuidFormatType::LFGList, ObjectGuidFormatType::Client, ObjectGuidFormatType::ClubFinder,
  ObjectGuidFormatType::ToolsClient, ObjectGuidFormatType::WorldLayer
}
 
enum  Trinity::Legacy::TypeID {
  Trinity::Legacy::TypeID::Object = 0, Trinity::Legacy::TypeID::Item = 1, Trinity::Legacy::TypeID::Container = 2, Trinity::Legacy::TypeID::Unit = 3,
  Trinity::Legacy::TypeID::Player = 4, Trinity::Legacy::TypeID::GameObject = 5, Trinity::Legacy::TypeID::DynamicObject = 6, Trinity::Legacy::TypeID::Corpse = 7,
  Trinity::Legacy::TypeID::AreaTrigger = 8, Trinity::Legacy::TypeID::SceneObject = 9, Trinity::Legacy::TypeID::Conversation = 10, Trinity::Legacy::TypeID::Max
}
 

Functions

 DEFINE_ENUM_FLAG (ObjectGuidSequenceSource)
 
 MAKE_GUID_TRAIT (HighGuid::Null, ObjectGuidSequenceSource::None, ObjectGuidFormatType::Null)
 
 MAKE_GUID_TRAIT (HighGuid::Uniq, ObjectGuidSequenceSource::None, ObjectGuidFormatType::Uniq)
 
 MAKE_GUID_TRAIT (HighGuid::Player, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Player)
 
 MAKE_GUID_TRAIT (HighGuid::Item, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Item)
 
 MAKE_GUID_TRAIT (HighGuid::WorldTransaction, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::StaticDoor, ObjectGuidSequenceSource::Global|ObjectGuidSequenceSource::Map, ObjectGuidFormatType::Transport)
 
 MAKE_GUID_TRAIT (HighGuid::Transport, ObjectGuidSequenceSource::Global|ObjectGuidSequenceSource::Map, ObjectGuidFormatType::Transport)
 
 MAKE_GUID_TRAIT (HighGuid::Conversation, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::Creature, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::Vehicle, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::Pet, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::GameObject, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::DynamicObject, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::AreaTrigger, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::Corpse, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::LootObject, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::SceneObject, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::Scenario, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::AIGroup, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::DynamicDoor, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::ClientActor, ObjectGuidSequenceSource::None, ObjectGuidFormatType::ClientActor)
 
 MAKE_GUID_TRAIT (HighGuid::Vignette, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::CallForHelp, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::AIResource, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::AILock, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::AILockTicket, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::ChatChannel, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::ChatChannel)
 
 MAKE_GUID_TRAIT (HighGuid::Party, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::Guild, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Guild)
 
 MAKE_GUID_TRAIT (HighGuid::WowAccount, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::BNetAccount, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::GMTask, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::MobileSession, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::MobileSession)
 
 MAKE_GUID_TRAIT (HighGuid::RaidGroup, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::Spell, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::Mail, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::WebObj, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::WebObj)
 
 MAKE_GUID_TRAIT (HighGuid::LFGObject, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::LFGObject)
 
 MAKE_GUID_TRAIT (HighGuid::LFGList, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::LFGList)
 
 MAKE_GUID_TRAIT (HighGuid::UserRouter, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::PVPQueueGroup, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::UserClient, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::PetBattle, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Client)
 
 MAKE_GUID_TRAIT (HighGuid::UniqUserClient, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Client)
 
 MAKE_GUID_TRAIT (HighGuid::BattlePet, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::CommerceObj, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::Global)
 
 MAKE_GUID_TRAIT (HighGuid::ClientSession, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Client)
 
 MAKE_GUID_TRAIT (HighGuid::Cast, ObjectGuidSequenceSource::Map, ObjectGuidFormatType::WorldObject)
 
 MAKE_GUID_TRAIT (HighGuid::ClientConnection, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Client)
 
 MAKE_GUID_TRAIT (HighGuid::ClubFinder, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::ClubFinder)
 
 MAKE_GUID_TRAIT (HighGuid::ToolsClient, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::ToolsClient)
 
 MAKE_GUID_TRAIT (HighGuid::WorldLayer, ObjectGuidSequenceSource::Global, ObjectGuidFormatType::WorldLayer)
 
 MAKE_GUID_TRAIT (HighGuid::ArenaTeam, ObjectGuidSequenceSource::Realm, ObjectGuidFormatType::Guild)
 
TC_GAME_API ByteBufferoperator<< (ByteBuffer &buf, ObjectGuid const &guid)
 
TC_GAME_API ByteBufferoperator>> (ByteBuffer &buf, ObjectGuid &guid)
 
constexpr ::TypeID Trinity::Legacy::ConvertLegacyTypeID (TypeID legacyTypeID)
 
constexpr TypeMask Trinity::Legacy::ConvertLegacyTypeMask (uint32 legacyTypeMask)
 

Macro Definition Documentation

◆ MAKE_GUID_TRAIT

#define MAKE_GUID_TRAIT (   high,
  sequence,
  format 
)
Value:
template<> struct ObjectGuidTraits<high> \
{ \
static constexpr EnumFlag<ObjectGuidSequenceSource> SequenceSource = sequence; \
using Format = std::integral_constant<ObjectGuidFormatType, format>; \
}
Definition: ObjectGuid.h:163
std::integral_constant< ObjectGuidFormatType, ObjectGuidFormatType::Null > Format
Definition: ObjectGuid.h:166
static constexpr EnumFlag< ObjectGuidSequenceSource > SequenceSource
Definition: ObjectGuid.h:165

◆ NUM_CLIENT_OBJECT_TYPES

#define NUM_CLIENT_OBJECT_TYPES   14

Typedef Documentation

◆ GuidDeque

using GuidDeque = std::deque<ObjectGuid>

◆ GuidList

using GuidList = std::list<ObjectGuid>

◆ GuidSet

using GuidSet = std::set<ObjectGuid>

◆ GuidUnorderedSet

using GuidUnorderedSet = std::unordered_set<ObjectGuid>

◆ GuidVector

using GuidVector = std::vector<ObjectGuid>

Enumeration Type Documentation

◆ HighGuid

enum HighGuid
strong
Enumerator
Null 
Uniq 
Player 
Item 
WorldTransaction 
StaticDoor 
Transport 
Conversation 
Creature 
Vehicle 
Pet 
GameObject 
DynamicObject 
AreaTrigger 
Corpse 
LootObject 
SceneObject 
Scenario 
AIGroup 
DynamicDoor 
ClientActor 
Vignette 
CallForHelp 
AIResource 
AILock 
AILockTicket 
ChatChannel 
Party 
Guild 
WowAccount 
BNetAccount 
GMTask 
MobileSession 
RaidGroup 
Spell 
Mail 
WebObj 
LFGObject 
LFGList 
UserRouter 
PVPQueueGroup 
UserClient 
PetBattle 
UniqUserClient 
BattlePet 
CommerceObj 
ClientSession 
Cast 
ClientConnection 
ClubFinder 
ToolsClient 
WorldLayer 
ArenaTeam 
Count 
72 {
73  Null = 0,
74  Uniq = 1,
75  Player = 2,
76  Item = 3,
77  WorldTransaction = 4,
78  StaticDoor = 5, //NYI
79  Transport = 6,
80  Conversation = 7,
81  Creature = 8,
82  Vehicle = 9,
83  Pet = 10,
84  GameObject = 11,
85  DynamicObject = 12,
86  AreaTrigger = 13,
87  Corpse = 14,
88  LootObject = 15,
89  SceneObject = 16,
90  Scenario = 17,
91  AIGroup = 18,
92  DynamicDoor = 19,
93  ClientActor = 20, //NYI
94  Vignette = 21,
95  CallForHelp = 22,
96  AIResource = 23,
97  AILock = 24,
98  AILockTicket = 25,
99  ChatChannel = 26,
100  Party = 27,
101  Guild = 28,
102  WowAccount = 29,
103  BNetAccount = 30,
104  GMTask = 31,
105  MobileSession = 32, //NYI
106  RaidGroup = 33,
107  Spell = 34,
108  Mail = 35,
109  WebObj = 36, //NYI
110  LFGObject = 37, //NYI
111  LFGList = 38, //NYI
112  UserRouter = 39,
113  PVPQueueGroup = 40,
114  UserClient = 41,
115  PetBattle = 42, //NYI
116  UniqUserClient = 43,
117  BattlePet = 44,
118  CommerceObj = 45,
119  ClientSession = 46,
120  Cast = 47,
121  ClientConnection = 48,
122  ClubFinder = 49,
123  ToolsClient = 50,
124  WorldLayer = 51,
125  ArenaTeam = 52,
126 
127  Count,
128 };
Definition: Corpse.h:51
Definition: Vehicle.h:30
Definition: Transport.h:29
Definition: Creature.h:69
Definition: Mail.h:172
Definition: DynamicObject.h:36
Definition: Scenario.h:50
size_t Count(ContainerMapList< SPECIFIC_TYPE > const &elements, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:156
Definition: Item.h:169
Definition: GameObject.h:125
Definition: ArenaTeam.h:111
Definition: Conversation.h:29
Definition: SceneObject.h:32
Definition: Guild.h:305
Definition: Player.h:1131
Definition: Pet.h:45
Definition: AreaTrigger.h:42
Definition: Spell.h:238

◆ ObjectGuidFormatType

enum ObjectGuidFormatType
strong
Enumerator
Null 
Uniq 
Player 
Item 
WorldObject 
Transport 
ClientActor 
ChatChannel 
Global 
Guild 
MobileSession 
WebObj 
LFGObject 
LFGList 
Client 
ClubFinder 
ToolsClient 
WorldLayer 

◆ ObjectGuidSequenceSource

Enumerator
None 
Global 
Realm 
Map 
131 {
132  None = 0x0,
133  Global = 0x1,
134  Realm = 0x2,
135  Map = 0x4
136 };
Definition: Realm.h:77
Definition: Map.h:264

◆ TypeID

enum TypeID
Enumerator
TYPEID_OBJECT 
TYPEID_ITEM 
TYPEID_CONTAINER 
TYPEID_AZERITE_EMPOWERED_ITEM 
TYPEID_AZERITE_ITEM 
TYPEID_UNIT 
TYPEID_PLAYER 
TYPEID_ACTIVE_PLAYER 
TYPEID_GAMEOBJECT 
TYPEID_DYNAMICOBJECT 
TYPEID_CORPSE 
TYPEID_AREATRIGGER 
TYPEID_SCENEOBJECT 
TYPEID_CONVERSATION 
33 {
34  TYPEID_OBJECT = 0,
35  TYPEID_ITEM = 1,
36  TYPEID_CONTAINER = 2,
39  TYPEID_UNIT = 5,
40  TYPEID_PLAYER = 6,
44  TYPEID_CORPSE = 10,
45  TYPEID_AREATRIGGER = 11,
46  TYPEID_SCENEOBJECT = 12,
48 };
Definition: ObjectGuid.h:36
Definition: ObjectGuid.h:44
Definition: ObjectGuid.h:41
Definition: ObjectGuid.h:39
Definition: ObjectGuid.h:38
Definition: ObjectGuid.h:45
Definition: ObjectGuid.h:37
Definition: ObjectGuid.h:47
Definition: ObjectGuid.h:42
Definition: ObjectGuid.h:34
Definition: ObjectGuid.h:46
Definition: ObjectGuid.h:40
Definition: ObjectGuid.h:43
Definition: ObjectGuid.h:35

◆ TypeMask

enum TypeMask
Enumerator
TYPEMASK_OBJECT 
TYPEMASK_ITEM 
TYPEMASK_CONTAINER 
TYPEMASK_AZERITE_EMPOWERED_ITEM 
TYPEMASK_AZERITE_ITEM 
TYPEMASK_UNIT 
TYPEMASK_PLAYER 
TYPEMASK_ACTIVE_PLAYER 
TYPEMASK_GAMEOBJECT 
TYPEMASK_DYNAMICOBJECT 
TYPEMASK_CORPSE 
TYPEMASK_AREATRIGGER 
TYPEMASK_SCENEOBJECT 
TYPEMASK_CONVERSATION 
TYPEMASK_SEER 
53 {
54  TYPEMASK_OBJECT = 0x0001,
55  TYPEMASK_ITEM = 0x0002,
56  TYPEMASK_CONTAINER = 0x0004,
58  TYPEMASK_AZERITE_ITEM = 0x0010,
59  TYPEMASK_UNIT = 0x0020,
60  TYPEMASK_PLAYER = 0x0040,
61  TYPEMASK_ACTIVE_PLAYER = 0x0080,
62  TYPEMASK_GAMEOBJECT = 0x0100,
63  TYPEMASK_DYNAMICOBJECT = 0x0200,
64  TYPEMASK_CORPSE = 0x0400,
65  TYPEMASK_AREATRIGGER = 0x0800,
66  TYPEMASK_SCENEOBJECT = 0x1000,
67  TYPEMASK_CONVERSATION = 0x2000,
69 };
Definition: ObjectGuid.h:55
Definition: ObjectGuid.h:60
Definition: ObjectGuid.h:58
Definition: ObjectGuid.h:54
Definition: ObjectGuid.h:67
Definition: ObjectGuid.h:59
Definition: ObjectGuid.h:62
Definition: ObjectGuid.h:57
Definition: ObjectGuid.h:68
Definition: ObjectGuid.h:61
Definition: ObjectGuid.h:65
Definition: ObjectGuid.h:56
Definition: ObjectGuid.h:66
Definition: ObjectGuid.h:64
Definition: ObjectGuid.h:63

Function Documentation

◆ DEFINE_ENUM_FLAG()

DEFINE_ENUM_FLAG ( ObjectGuidSequenceSource  )

◆ MAKE_GUID_TRAIT() [1/53]

◆ MAKE_GUID_TRAIT() [2/53]

◆ MAKE_GUID_TRAIT() [3/53]

◆ MAKE_GUID_TRAIT() [4/53]

◆ MAKE_GUID_TRAIT() [5/53]

◆ MAKE_GUID_TRAIT() [6/53]

◆ MAKE_GUID_TRAIT() [7/53]

◆ MAKE_GUID_TRAIT() [8/53]

◆ MAKE_GUID_TRAIT() [9/53]

◆ MAKE_GUID_TRAIT() [10/53]

◆ MAKE_GUID_TRAIT() [11/53]

◆ MAKE_GUID_TRAIT() [12/53]

◆ MAKE_GUID_TRAIT() [13/53]

◆ MAKE_GUID_TRAIT() [14/53]

◆ MAKE_GUID_TRAIT() [15/53]

◆ MAKE_GUID_TRAIT() [16/53]

◆ MAKE_GUID_TRAIT() [17/53]

◆ MAKE_GUID_TRAIT() [18/53]

◆ MAKE_GUID_TRAIT() [19/53]

◆ MAKE_GUID_TRAIT() [20/53]

◆ MAKE_GUID_TRAIT() [21/53]

◆ MAKE_GUID_TRAIT() [22/53]

◆ MAKE_GUID_TRAIT() [23/53]

◆ MAKE_GUID_TRAIT() [24/53]

◆ MAKE_GUID_TRAIT() [25/53]

◆ MAKE_GUID_TRAIT() [26/53]

◆ MAKE_GUID_TRAIT() [27/53]

◆ MAKE_GUID_TRAIT() [28/53]

◆ MAKE_GUID_TRAIT() [29/53]

◆ MAKE_GUID_TRAIT() [30/53]

◆ MAKE_GUID_TRAIT() [31/53]

◆ MAKE_GUID_TRAIT() [32/53]

◆ MAKE_GUID_TRAIT() [33/53]

◆ MAKE_GUID_TRAIT() [34/53]

◆ MAKE_GUID_TRAIT() [35/53]

◆ MAKE_GUID_TRAIT() [36/53]

◆ MAKE_GUID_TRAIT() [37/53]

◆ MAKE_GUID_TRAIT() [38/53]

◆ MAKE_GUID_TRAIT() [39/53]

◆ MAKE_GUID_TRAIT() [40/53]

◆ MAKE_GUID_TRAIT() [41/53]

◆ MAKE_GUID_TRAIT() [42/53]

◆ MAKE_GUID_TRAIT() [43/53]

◆ MAKE_GUID_TRAIT() [44/53]

◆ MAKE_GUID_TRAIT() [45/53]

◆ MAKE_GUID_TRAIT() [46/53]

◆ MAKE_GUID_TRAIT() [47/53]

◆ MAKE_GUID_TRAIT() [48/53]

◆ MAKE_GUID_TRAIT() [49/53]

◆ MAKE_GUID_TRAIT() [50/53]

◆ MAKE_GUID_TRAIT() [51/53]

◆ MAKE_GUID_TRAIT() [52/53]

◆ MAKE_GUID_TRAIT() [53/53]

◆ operator<<()

TC_GAME_API ByteBuffer& operator<< ( ByteBuffer buf,
ObjectGuid const &  guid 
)
726 {
727  uint8 lowMask = 0;
728  uint8 highMask = 0;
729  buf.FlushBits(); // flush any unwritten bits to make wpos return a meaningful value
730  std::size_t pos = buf.wpos();
731  buf << uint8(lowMask);
732  buf << uint8(highMask);
733 
734  uint8 packed[8];
735  if (size_t packedSize = ByteBuffer::PackUInt64(guid._data[0], &lowMask, packed))
736  buf.append(packed, packedSize);
737  if (size_t packedSize = ByteBuffer::PackUInt64(guid._data[1], &highMask, packed))
738  buf.append(packed, packedSize);
739 
740  buf.put(pos, lowMask);
741  buf.put(pos + 1, highMask);
742 
743  return buf;
744 }
size_t wpos() const
Definition: ByteBuffer.h:412
void FlushBits()
Definition: ByteBuffer.h:155
static size_t PackUInt64(uint64 value, uint8 *mask, uint8 *result)
Definition: ByteBuffer.h:607
void append(T value)
Definition: ByteBuffer.h:143
uint8_t uint8
Definition: Define.h:145
void put(std::size_t pos, T value)
Definition: ByteBuffer.h:220
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator>>()

TC_GAME_API ByteBuffer& operator>> ( ByteBuffer buf,
ObjectGuid guid 
)
747 {
748  uint8 lowMask, highMask;
749  buf >> lowMask >> highMask;
750  buf.ReadPackedUInt64(lowMask, guid._data[0]);
751  buf.ReadPackedUInt64(highMask, guid._data[1]);
752  return buf;
753 }
void ReadPackedUInt64(uint64 &guid)
Definition: ByteBuffer.h:485
uint64 _data[2]
Definition: ObjectGuid.h:379
uint8_t uint8
Definition: Define.h:145
+ Here is the call graph for this function:
+ Here is the caller graph for this function: