Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
HPS.EventDispatcher Class Reference

The EventDispatcher class is used for injecting any events and dealing with event handlers which handle those events. More...

Inheritance diagram for HPS.EventDispatcher:
HPS.Object

Public Member Functions

override void Dispose ()
 
 EventDispatcher ()
 The default constructor creates an uninitialized EventDispatcher object which cannot be subscribed to. More...
 
 EventDispatcher (HPS.EventDispatcher in_that)
 The copy constructor creates an EventDispatcher object that points to the same underlying impl as the source EventDispatcher. More...
 
override HPS.Type ObjectType ()
 This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object. More...
 
override bool Equals (System.Object obj)
 
override int GetHashCode ()
 
bool Equals (HPS.EventDispatcher in_that)
 Check if the source EventDispatcher is equivalent to this object. More...
 
bool Subscribe (HPS.EventHandler in_handler, IntPtr in_type)
 Add the specified event handler to the list of subscribers for events of the specified type on this EventDispatcher. More...
 
bool UnSubscribe (HPS.EventHandler in_handler, IntPtr in_type)
 Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher. More...
 
bool UnSubscribe (HPS.EventHandler in_handler)
 Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher. More...
 
bool UnSubscribe (IntPtr in_type)
 Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher. More...
 
bool InjectEvent (HPS.Event in_event)
 Inject the specified event and propagate it to all subscribed handlers in the order of subscription. More...
 
HPS.EventNotifier InjectEventWithNotifier (HPS.Event in_event)
 Inject the specified event and propagate it to all subscribed handlers in the order of subscription and return an EventNotifier associated with the injected event. More...
 
void Shutdown ()
 Shutdown this EventDispatcher asynchronously. Any pending events injected into this EventDispatcher will be processed prior to shutdown, but no new events can be injected. More...
 
bool IsShutdown ()
 Query whether the asynchronous shutdown has completed. More...
 
void SetName (string in_name)
 Sets the EventDispatcher's name More...
 
void ShowName (out string out_name)
 Shows the EventDispatcher's name More...
 
- Public Member Functions inherited from HPS.Object
IntPtr GetClassID ()
 
 Object (HPS.Object in_that)
 The move constructor creates an Object by transferring the underlying impl of the rvalue reference to this Object thereby avoiding a copy and allocation. More...
 
HPS.Type Type ()
 This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types. More...
 
virtual bool Empty ()
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
IntPtr GetInstanceID ()
 Returns an identifier that can be used to identify which instance of a class an object is. Different keys and controls will return the same value if they are backed by the same database resource. More...
 

Static Public Member Functions

static bool operator== (HPS.EventDispatcher a, HPS.EventDispatcher b)
 
static bool operator!= (HPS.EventDispatcher a, HPS.EventDispatcher b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 

Protected Member Functions

override void deleteCptr ()
 
- Protected Member Functions inherited from HPS.Object
virtual IntPtr GetNonDirectorClassID ()
 

Additional Inherited Members

- Protected Attributes inherited from HPS.Object
HandleRef cptr
 
HandleRef scptr
 
bool cMemOwn
 

Detailed Description

The EventDispatcher class is used for injecting any events and dealing with event handlers which handle those events.

Constructor & Destructor Documentation

HPS.EventDispatcher.EventDispatcher ( )
inline

The default constructor creates an uninitialized EventDispatcher object which cannot be subscribed to.

Database::CreateEventDispatcher()

HPS.EventDispatcher.EventDispatcher ( HPS.EventDispatcher  in_that)
inline

The copy constructor creates an EventDispatcher object that points to the same underlying impl as the source EventDispatcher.

Parameters
in_thatThe source <ref refid="class_h_p_s_1_1_event_handler" kindref="compound">EventHandler</ref> to point to.

Member Function Documentation

bool HPS.EventDispatcher.Equals ( HPS.EventDispatcher  in_that)
inline

Check if the source EventDispatcher is equivalent to this object.

Parameters
in_thatThe source <ref refid="class_h_p_s_1_1_event_dispatcher" kindref="compound">EventDispatcher</ref> to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
bool HPS.EventDispatcher.InjectEvent ( HPS.Event  in_event)
inline

Inject the specified event and propagate it to all subscribed handlers in the order of subscription.

Parameters
in_event<ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> to inject and propagate.
Returns
true if the event injection was successful, false otherwise.
HPS.EventNotifier HPS.EventDispatcher.InjectEventWithNotifier ( HPS.Event  in_event)
inline

Inject the specified event and propagate it to all subscribed handlers in the order of subscription and return an EventNotifier associated with the injected event.

Parameters
in_event<ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> to inject and propagate.
Returns
An event notifier associated with the injected event.
bool HPS.EventDispatcher.IsShutdown ( )
inline

Query whether the asynchronous shutdown has completed.

Returns
true if the event dispatcher has shutdown, false otherwise.
override HPS.Type HPS.EventDispatcher.ObjectType ( )
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS.Object.

void HPS.EventDispatcher.SetName ( string  in_name)
inline

Sets the EventDispatcher's name

Parameters
in_nameName to set.
void HPS.EventDispatcher.ShowName ( out string  out_name)
inline

Shows the EventDispatcher's name

Parameters
out_nameCurrent name of this <ref refid="class_h_p_s_1_1_event_dispatcher" kindref="compound">EventDispatcher</ref>.
void HPS.EventDispatcher.Shutdown ( )
inline

Shutdown this EventDispatcher asynchronously. Any pending events injected into this EventDispatcher will be processed prior to shutdown, but no new events can be injected.

bool HPS.EventDispatcher.Subscribe ( HPS.EventHandler  in_handler,
IntPtr  in_type 
)
inline

Add the specified event handler to the list of subscribers for events of the specified type on this EventDispatcher.

Parameters
in_handler<ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> handler to add to the subscriber list for events of the given type.
in_typeType of event to add the handler for.
Returns
true if the subscription was successful, false otherwise.
bool HPS.EventDispatcher.UnSubscribe ( HPS.EventHandler  in_handler,
IntPtr  in_type 
)
inline

Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher.

Parameters
in_handler<ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> handler to remove from the subscriber list for events of the given type.
in_typeType of event to remove the handler for.
Returns
true if the unsubscription was successful, false otherwise.
bool HPS.EventDispatcher.UnSubscribe ( HPS.EventHandler  in_handler)
inline

Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher.

Parameters
in_handler<ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> handler to remove from the subscriber list for events of the given type.
Returns
true if the unsubscription was successful, false otherwise.
bool HPS.EventDispatcher.UnSubscribe ( IntPtr  in_type)
inline

Remove the specified event handler from the list of subscribers for events of the specified type on this EventDispatcher.

Parameters
in_typeType of event to remove the handler for.
Returns
true if the unsubscription was successful, false otherwise.

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