Module |
|
Header |
/Engine/Source/Runtime/CoreUObject/Public/UObject/SparseDelegate.h |
Include |
#include "UObject/SparseDelegate.h" |
struct FSparseDelegateStorage
Sparse delegates can be used for infrequently bound dynamic delegates so that the object uses only 1 byte of storage instead of having the full overhead of the delegate invocation list. The cost to invoke, add, remove, etc. from the delegate is higher than using the delegate directly and thus the memory savings benefit should be traded off against the frequency with which you would expect the delegate to be bound.Helper class for handling sparse delegate bindings
Name | Description | ||
---|---|---|---|
|
Add ( |
Binds a sparse delegate to the owner. Returns if the delegate was successfully bound. |
|
|
AddUnique ( |
Binds a sparse delegate to the owner, verifying first that the delegate is not already bound. |
|
|
Clear |
Clear all of the named sparse delegate bindings from the owner. |
|
|
Contains ( |
Returns whether a sparse delegate is bound to the owner. |
|
|
Contains |
Returns whether a sparse delegate is bound to the owner. |
|
|
FMulticastSc... |
GetMulticastDelegate |
Acquires the actual Multicast Delegate from the annotation if any delegates are bound to it. |
|
TSharedPtr< ... |
GetSharedMulticastDelegate |
Acquires the actual Multicast Delegate from the annotation if any delegates are bound to it as a shared pointer. |
|
RegisterDelegateOffset |
Registers the sparse delegate so that the offset can be determined. |
|
|
Remove ( |
Removes a delegate binding from the owner's sparse delegate storage. |
|
|
Remove |
Removes a delegate binding from the owner's sparse delegate storage. |
|
|
RemoveAll |
Removes all sparse delegate binding from the owner for a given object. |
|
|
FSparseDeleg... |
ResolveSparseDelegate |
Using the registry of sparse delegates recover the FSparseDelegate address from the UObject and name. |
|
UObject *... |
ResolveSparseOwner ( |
Using the registry of sparse delegates recover the UObject owner from the FSparseDelegate address owning class and delegate names. |
|
SetMulticastDelegate ( |
Directly sets the Multicast Delegate for this object/delegatename pair. |
|
|
SparseDelegateReport ( |
Outputs a report about which delegates are bound. |
Name |
Description |
---|---|
FSparseDelegateMap |
Delegate map is a map of Delegate names to a shared pointer of the multicast script delegate |
Name |
Description |
---|---|
SparseDelegateMapCritical |
Critical Section for locking access to the sparse delegate map |
SparseDelegateObjectListener |
A listener to get notified when objects have been deleted and remove them from the map |
SparseDelegateObjectOffsets |
Sparse delegate offsets are indexed by ActorClass/DelegateName pair |
SparseDelegates |
Map of objects to the map of delegates that are bound to that object |