TrinityCore
UF::UpdateFieldHolder Class Reference

#include <UpdateField.h>

Public Member Functions

 UpdateFieldHolder (Object *owner)
 
template<typename Derived , typename T , int32 BlockBit, uint32 Bit>
MutableFieldReference< T, false > ModifyValue (UpdateField< T, BlockBit, Bit >(Derived::*field))
 
template<typename Derived , typename T , int32 BlockBit, uint32 Bit>
void ClearChangesMask (UpdateField< T, BlockBit, Bit >(Derived::*field))
 
uint32 GetChangedObjectTypeMask () const
 
bool HasChanged (uint32 index) const
 

Private Attributes

UpdateMask< NUM_CLIENT_OBJECT_TYPES_changesMask
 
Object_owner
 

Detailed Description

Definition at line 675 of file UpdateField.h.

Constructor & Destructor Documentation

◆ UpdateFieldHolder()

UF::UpdateFieldHolder::UpdateFieldHolder ( Object owner)
inlineexplicit

Definition at line 678 of file UpdateField.h.

678 : _owner(owner)
679 {
680 }

Member Function Documentation

◆ ClearChangesMask()

template<typename Derived , typename T , int32 BlockBit, uint32 Bit>
void UF::UpdateFieldHolder::ClearChangesMask ( UpdateField< T, BlockBit, Bit >Derived::*  field)
inline

Definition at line 690 of file UpdateField.h.

691 {
692 _changesMask.Reset(Bit);
693 (static_cast<Derived*>(_owner)->*field)._value.ClearChangesMask();
694 }
UpdateMask< NUM_CLIENT_OBJECT_TYPES > _changesMask
Definition: UpdateField.h:707
void Reset(uint32 index)
Definition: UpdateMask.h:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChangedObjectTypeMask()

uint32 UF::UpdateFieldHolder::GetChangedObjectTypeMask ( ) const
inline

Definition at line 696 of file UpdateField.h.

697 {
698 return _changesMask.GetBlock(0);
699 }
uint32 GetBlock(uint32 index) const
Definition: UpdateMask.h:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasChanged()

bool UF::UpdateFieldHolder::HasChanged ( uint32  index) const
inline

Definition at line 701 of file UpdateField.h.

702 {
703 return _changesMask[index];
704 }
+ Here is the caller graph for this function:

◆ ModifyValue()

template<typename Derived , typename T , int32 BlockBit, uint32 Bit>
MutableFieldReference< T, false > UF::UpdateFieldHolder::ModifyValue ( UpdateField< T, BlockBit, Bit >Derived::*  field)
inline

Definition at line 683 of file UpdateField.h.

684 {
685 _changesMask.Set(Bit);
686 return { (static_cast<Derived*>(_owner)->*field)._value };
687 }
void Set(uint32 index)
Definition: UpdateMask.h:84
+ Here is the call graph for this function:

Member Data Documentation

◆ _changesMask

UpdateMask<NUM_CLIENT_OBJECT_TYPES> UF::UpdateFieldHolder::_changesMask
private

Definition at line 707 of file UpdateField.h.

◆ _owner

Object* UF::UpdateFieldHolder::_owner
private

Definition at line 708 of file UpdateField.h.


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