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

#include "TypeContainer.h"

Public Member Functions

template<class SPECIFIC_TYPE >
std::size_t Count () const
 
template<class SPECIFIC_TYPE >
bool insert (SPECIFIC_TYPE *obj)
 inserts a specific object into the container More...
 
ContainerMapList< OBJECT_TYPES > & GetElements ()
 Removes the object from the container, and returns the removed object. More...
 
const ContainerMapList< OBJECT_TYPES > & GetElements () const
 

Private Attributes

ContainerMapList< OBJECT_TYPES > i_elements
 

Detailed Description

template<class OBJECT_TYPES>
class TypeMapContainer< OBJECT_TYPES >

Member Function Documentation

◆ Count()

template<class OBJECT_TYPES >
template<class SPECIFIC_TYPE >
std::size_t TypeMapContainer< OBJECT_TYPES >::Count ( ) const
inline
102{ return Acore::Count(i_elements, (SPECIFIC_TYPE*)nullptr); }
std::size_t Count(const ContainerMapList< SPECIFIC_TYPE > &elements, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:159
ContainerMapList< OBJECT_TYPES > i_elements
Definition: TypeContainer.h:124

References Acore::Count(), and TypeMapContainer< OBJECT_TYPES >::i_elements.

◆ GetElements() [1/2]

template<class OBJECT_TYPES >
ContainerMapList< OBJECT_TYPES > & TypeMapContainer< OBJECT_TYPES >::GetElements ( )
inline

Removes the object from the container, and returns the removed object.

120{ return i_elements; }

References TypeMapContainer< OBJECT_TYPES >::i_elements.

Referenced by VisitorHelper().

◆ GetElements() [2/2]

template<class OBJECT_TYPES >
const ContainerMapList< OBJECT_TYPES > & TypeMapContainer< OBJECT_TYPES >::GetElements ( ) const
inline

◆ insert()

template<class OBJECT_TYPES >
template<class SPECIFIC_TYPE >
bool TypeMapContainer< OBJECT_TYPES >::insert ( SPECIFIC_TYPE *  obj)
inline

inserts a specific object into the container

107 {
108 SPECIFIC_TYPE* t = Acore::Insert(i_elements, obj);
109 return (t != nullptr);
110 }
bool Insert(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:34

References TypeMapContainer< OBJECT_TYPES >::i_elements, and Acore::Insert().

Member Data Documentation

◆ i_elements