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
145 {
146 return Acore::Find(_elements, handle, (SPECIFIC_TYPE*)nullptr);
147 }
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:70
ContainerUnorderedMap< OBJECT_TYPES, KEY_TYPE > _elements
Definition: TypeContainer.h:161

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
133 {
134 return Acore::Insert(_elements, handle, obj);
135 }
bool Insert(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:34

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
139 {
140 return Acore::Remove(_elements, handle, (SPECIFIC_TYPE*)nullptr);
141 }
bool Remove(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:104

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
151 {
152 std::size_t size = 0;
153 Acore::Size(_elements, &size, (SPECIFIC_TYPE*)nullptr);
154 return size;
155 }
bool Size(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, std::size_t *size, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:131

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

Referenced by debug_commandscript::HandleDebugObjectCountMap().

Member Data Documentation

◆ _elements