TrinityCore
FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE > Class Template Reference

#include <Object.h>

Public Member Functions

 FlaggedValuesArray32 ()
 
T_FLAGS GetFlags () const
 
bool HasFlag (FLAG_TYPE flag) const
 
void AddFlag (FLAG_TYPE flag)
 
void DelFlag (FLAG_TYPE flag)
 
T_VALUES GetValue (FLAG_TYPE flag) const
 
void SetValue (FLAG_TYPE flag, T_VALUES value)
 
void AddValue (FLAG_TYPE flag, T_VALUES value)
 

Private Attributes

T_VALUES m_values [ARRAY_SIZE]
 
T_FLAGS m_flags
 

Constructor & Destructor Documentation

◆ FlaggedValuesArray32()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::FlaggedValuesArray32 ( )
inline
390  {
391  for (uint32 i = 0; i < ARRAY_SIZE; ++i)
392  m_values[i] = T_VALUES(0);
393  m_flags = 0;
394  }
uint32_t uint32
Definition: Define.h:152
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:406
T_FLAGS m_flags
Definition: Object.h:407

Member Function Documentation

◆ AddFlag()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::AddFlag ( FLAG_TYPE  flag)
inline
398 { m_flags |= (1 << flag); }
T_FLAGS m_flags
Definition: Object.h:407
+ Here is the caller graph for this function:

◆ AddValue()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::AddValue ( FLAG_TYPE  flag,
T_VALUES  value 
)
inline
403 { m_values[flag] += value; }
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:406
+ Here is the caller graph for this function:

◆ DelFlag()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::DelFlag ( FLAG_TYPE  flag)
inline
399 { m_flags &= ~(1 << flag); }
T_FLAGS m_flags
Definition: Object.h:407
+ Here is the caller graph for this function:

◆ GetFlags()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
T_FLAGS FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::GetFlags ( ) const
inline
396 { return m_flags; }
T_FLAGS m_flags
Definition: Object.h:407
+ Here is the caller graph for this function:

◆ GetValue()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
T_VALUES FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::GetValue ( FLAG_TYPE  flag) const
inline
401 { return m_values[flag]; }
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:406
+ Here is the caller graph for this function:

◆ HasFlag()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
bool FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::HasFlag ( FLAG_TYPE  flag) const
inline
397 { return m_flags & (1 << flag); }
T_FLAGS m_flags
Definition: Object.h:407

◆ SetValue()

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::SetValue ( FLAG_TYPE  flag,
T_VALUES  value 
)
inline
402 { m_values[flag] = value; }
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:406
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_flags

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
T_FLAGS FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::m_flags
private

◆ m_values

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, size_t ARRAY_SIZE>
T_VALUES FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::m_values[ARRAY_SIZE]
private

The documentation for this class was generated from the following file: