AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE > Class Template Reference

#include "TypeContainer.h"

Public Member Functions

template<class SPECIFIC_TYPE >
bool Insert (KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
 
template<class SPECIFIC_TYPE >
bool Remove (KEY_TYPE const &handle)
 
template<class SPECIFIC_TYPE >
SPECIFIC_TYPE * Find (KEY_TYPE const &handle)
 
template<class SPECIFIC_TYPE >
std::size_t Size () const
 
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > & GetElements ()
 
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > const & GetElements () const
 

Private Attributes

ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > _elements
 

Detailed Description

template<class OBJECT_TYPES, class KEY_TYPE>
class TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >

Member Function Documentation

◆ Find()

template<class OBJECT_TYPES , class KEY_TYPE >
template<class SPECIFIC_TYPE >
SPECIFIC_TYPE * TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Find ( KEY_TYPE const &  handle)
inline
148 {
149 return Acore::Find(_elements, handle, (SPECIFIC_TYPE*)nullptr);
150 }
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:73
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > _elements
Definition: TypeContainer.h:164

References TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::_elements, and Acore::Find().

Referenced by Map::GetCorpse(), Map::GetCreature(), Map::GetDynamicObject(), Map::GetGameObject(), and Map::GetPet().

◆ GetElements() [1/2]

template<class OBJECT_TYPES , class KEY_TYPE >
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > & TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::GetElements ( )
inline

◆ GetElements() [2/2]

template<class OBJECT_TYPES , class KEY_TYPE >
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > const & TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::GetElements ( ) const
inline

◆ Insert()

template<class OBJECT_TYPES , class KEY_TYPE >
template<class SPECIFIC_TYPE >
bool TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Insert ( KEY_TYPE const &  handle,
SPECIFIC_TYPE *  obj 
)
inline
136 {
137 return Acore::Insert(_elements, handle, obj);
138 }
bool Insert(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:37

References TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::_elements, and Acore::Insert().

Referenced by Corpse::AddToWorld(), Creature::AddToWorld(), DynamicObject::AddToWorld(), GameObject::AddToWorld(), and Pet::AddToWorld().

◆ Remove()

template<class OBJECT_TYPES , class KEY_TYPE >
template<class SPECIFIC_TYPE >
bool TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Remove ( KEY_TYPE const &  handle)
inline
142 {
143 return Acore::Remove(_elements, handle, (SPECIFIC_TYPE*)nullptr);
144 }
bool Remove(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:107

References TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::_elements, and Acore::Remove().

Referenced by Corpse::RemoveFromWorld(), Creature::RemoveFromWorld(), DynamicObject::RemoveFromWorld(), GameObject::RemoveFromWorld(), and Pet::RemoveFromWorld().

◆ Size()

template<class OBJECT_TYPES , class KEY_TYPE >
template<class SPECIFIC_TYPE >
std::size_t TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Size ( ) const
inline
154 {
155 std::size_t size = 0;
156 Acore::Size(_elements, &size, (SPECIFIC_TYPE*)nullptr);
157 return size;
158 }
bool Size(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, std::size_t *size, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:134

References TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::_elements, and Acore::Size().

Referenced by debug_commandscript::HandleDebugObjectCountMap().

Member Data Documentation

◆ _elements