< Home

< Table of Contents

REFERENCE MANUAL

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 ()
 
override bool Equals (System.Object obj)
 
bool Equals (HPS.EventDispatcher in_that)
 Check if the source EventDispatcher is equivalent to this object. More...
 
 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 int GetHashCode ()
 
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...
 
bool IsShutdown ()
 Query whether the asynchronous shutdown has completed. More...
 
override HPS.Type ObjectType ()
 This function returns the type the object, as declared. More...
 
void SetName (string in_name)
 Sets the EventDispatcher's name More...
 
void ShowName (out string out_name)
 Shows the EventDispatcher's name More...
 
void Shutdown ()
 Shutdown this EventDispatcher asynchronously. 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...
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 Indicates whether this object has any values set on it. More...
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
 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...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
HPS.Type Type ()
 This function returns the true type of the underlying object. 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
bool cMemOwn
 
HandleRef cptr
 
HandleRef scptr
 

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 ( )

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

Database::CreateEventDispatcher()

HPS.EventDispatcher.EventDispatcher ( HPS.EventDispatcher  in_that)

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)

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)

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)

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 ( )

Query whether the asynchronous shutdown has completed.

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

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)

Sets the EventDispatcher's name

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

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 ( )

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 
)

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 
)

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)

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)

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: