SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Delegate_Basic< Args > Class Template Reference

Basic Class of Delegate. Instance inherited from it and use delegate feature. More...

#include <DelegateBasic.h>

Public Types

using Agent = std::function<void(Args...)>
 Agent Function.
 

Public Member Functions

 Delegate_Basic ()
 Constructor Function.
 
virtual ~Delegate_Basic ()=default
 Destructor Function.
 
bool Bind (std::function< void(Args...)> func)
 Bind Function pointer to delegate.
 
bool UnBind (std::function< void(Args...)> func)
 UnBind Function pointer from delegate.
 
size_t size ()
 Get size of Agents.
 
bool empty ()
 Determine if this Delegate is empty;.
 
void Broadcast (Args &&... args)
 Execute all function pointer.
 

Private Attributes

std::shared_ptr< scl::linked_unordered_map< uint64_t, Agent > > m_Agents
 Map of Agent Function Pointer.
 

Detailed Description

template<typename... Args>
class Spices::Delegate_Basic< Args >

Basic Class of Delegate. Instance inherited from it and use delegate feature.

Definition at line 20 of file DelegateBasic.h.


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