API Search || Global Search

More...

Inheritance diagram for HPS.EventHandler:
HPS.Object

Public Types

enum  HandleResult : uint { HandleResult.Handled = 0x00000000, HandleResult.NotHandled = 0x00000001 }
 Enumeration of the values the EventHandler uses to indicate if it handled an event. More...
 

Public Member Functions

override void Dispose ()
 
delegate void DtorDelegate (IntPtr cPtr)
 
 EventHandler ()
 The default constructor creates an EventHandler object not subscribed to any event. More...
 
 EventHandler (HPS.EventHandler in_that)
 The copy constructor creates a new EventHandler object that points to the same underlying impl as the source EventHandler. More...
 
delegate HPS.Type EventHandlerDelegate_0 (IntPtr cPtr)
 
delegate void EventHandlerDelegate_1 (IntPtr cPtr)
 
delegate
HPS.EventHandler.HandleResult 
EventHandlerDelegate_2 (IntPtr cPtr, IntPtr in_event)
 
delegate HPS.Type EventHandlerDelegate_3 (IntPtr cPtr)
 
delegate bool EventHandlerDelegate_4 (IntPtr cPtr)
 
virtual
HPS.EventHandler.HandleResult 
Handle (HPS.Event in_event)
 Function that gets triggered if this EventHandler receives an event it is subscribed to. This should be overridden by subclasses of EventHandler to perform any custom behavior. More...
 
override HPS.Type ObjectType ()
 
override void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
void Shutdown ()
 Notifies the EventDispatcher that this handler is being invalidated and no further events should be dispatched to it. This method must be called in any derived class destructors. More...
 
bool Subscribe (HPS.EventDispatcher in_dispatcher, IntPtr in_type)
 Add this EventHandler object to the list of subscribers for events of the specified type on the specified EventDispatcher. More...
 
bool UnSubscribe (HPS.EventDispatcher in_dispatcher, IntPtr in_type)
 Remove this EventHandler object from the list of subscribers for events of the specified type on the specified EventDispatcher. More...
 
bool UnSubscribe (HPS.EventDispatcher in_dispatcher)
 Remove this EventHandler object from the list of subscribers for all events on the specified EventDispatcher. More...
 
void UnSubscribeEverything ()
 Remove this EventHandler object from all events on all EventDispatchers. 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 the object's database handle, which can be used to determine which instance of a class the object is. For example, controls are simply aliases for segment keys that group related functions. Therefore, a SegmentKey and all of its controls would return the same instance id. Different keys and controls will return the same value if they are backed by the same database resource. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
 Object (HPS.Object that)
 
virtual 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...
 

Protected Member Functions

override void deleteCptr ()
 
virtual bool DerivedClassHasMethod (string methodName, System.Type[] methodTypes)
 
override IntPtr GetNonDirectorClassID ()
 
virtual bool IsUserDerived ()
 

Static Protected Attributes

static Dictionary< IntPtr,
Dictionary< IntPtr, HashSet
< EventHandler > > > 
cachedObjects = new Dictionary<IntPtr, Dictionary<IntPtr, HashSet<EventHandler>>>()
 
static ReaderWriterLockSlim mapLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion)
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 
- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 

Detailed Description

The EventHandler class is the base class for any event handler that can be created. All custom event handlers should inherit from this.

Member Enumeration Documentation

Enumeration of the values the EventHandler uses to indicate if it handled an event.

Enumerator
Handled 

The event was handled by this EventHandler. Consume the event if possible.

NotHandled 

The event was not handled by this EventHandler. Pass to the next handler if any or if possible.

Constructor & Destructor Documentation

HPS.EventHandler.EventHandler ( )
inline

The default constructor creates an EventHandler object not subscribed to any event.

HPS.EventHandler.EventHandler ( HPS.EventHandler  in_that)
inline

The copy constructor creates a new EventHandler object that points to the same underlying impl as the source EventHandler.

Parameters
in_thatThe source EventHandler to point to.

Member Function Documentation

virtual HPS.EventHandler.HandleResult HPS.EventHandler.Handle ( HPS.Event  in_event)
inlinevirtual

Function that gets triggered if this EventHandler receives an event it is subscribed to. This should be overridden by subclasses of EventHandler to perform any custom behavior.

Parameters
in_eventEvent which was triggered.
Returns
Handled if the event was handled, NotHandled otherwise.
override void HPS.EventHandler.Reset ( )
inlinevirtual

Resets this object to its initial, uninitialized state.

Reimplemented from HPS.Object.

void HPS.EventHandler.Shutdown ( )
inline

Notifies the EventDispatcher that this handler is being invalidated and no further events should be dispatched to it. This method must be called in any derived class destructors.

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

Add this EventHandler object to the list of subscribers for events of the specified type on the specified EventDispatcher.

Parameters
in_dispatcherDispatcher from which to receive events of the given type.
in_typeType of event to receive from the dispatcher.
Returns
true if the subscription was successful, false otherwise.
bool HPS.EventHandler.UnSubscribe ( HPS.EventDispatcher  in_dispatcher,
IntPtr  in_type 
)
inline

Remove this EventHandler object from the list of subscribers for events of the specified type on the specified EventDispatcher.

Parameters
in_dispatcherDispatcher from which to no longer receive events of the given type.
in_typeType of event to no longer receive from the dispatcher.
Returns
true if the unsubscription was successful, false otherwise.
bool HPS.EventHandler.UnSubscribe ( HPS.EventDispatcher  in_dispatcher)
inline

Remove this EventHandler object from the list of subscribers for all events on the specified EventDispatcher.

Parameters
in_dispatcherDispatcher from which to no longer receive events.
Returns
true if the unsubscription was successful, false otherwise.
void HPS.EventHandler.UnSubscribeEverything ( )
inline

Remove this EventHandler object from all events on all EventDispatchers.


The documentation for this class was generated from the following file:
  • internals/hps_core/source/cs/HPS.EventHandler.cs