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 >
size_t Count () const
 
template<class SPECIFIC_TYPE >
bool insert (SPECIFIC_TYPE *obj)
 inserts a specific object into the container
 
ContainerMapList< OBJECT_TYPES > & GetElements ()
 Removes the object from the container, and returns the removed object.
 
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 >
size_t TypeMapContainer< OBJECT_TYPES >::Count ( ) const
inline
105{ return Acore::Count(i_elements, (SPECIFIC_TYPE*)nullptr); }
size_t Count(const ContainerMapList< SPECIFIC_TYPE > &elements, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:162
ContainerMapList< OBJECT_TYPES > i_elements
Definition: TypeContainer.h:127

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.

123{ 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

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

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

Member Data Documentation

◆ i_elements