class MAGES::DriverEvent¶
Overview¶
Represents a driver event. More…
class DriverEvent { public: // enums enum Feature; enum Kind; enum SourceDevice; enum ValueType; // properties IDriver Driver; Kind EventKind; SourceDevice EventSource; Feature EventSourceFeature; ValueType EventValueType; object EventValue; // methods static DriverEvent GetFromPool(); static void ReturnToPool(DriverEvent evt); void ReturnToPool(); override string ToString(); T Value< T >(); };
Detailed Documentation¶
Represents a driver event.
Properties¶
IDriver Driver
Gets or sets the driver that generated the event.
Kind EventKind
Gets or sets the event kind.
SourceDevice EventSource
Gets or sets the event source.
Feature EventSourceFeature
Gets or sets the event source feature.
ValueType EventValueType
Gets or sets the value type.
object EventValue
Gets or sets the event value.
Methods¶
static DriverEvent GetFromPool()
Gets a new event from the pool.
Returns:
The event.
static void ReturnToPool(DriverEvent evt)
Returns an event to the pool, after being used.
Parameters:
evt |
The event to return to the pool. |
void ReturnToPool()
Returns the event to the pool, if it is a pooled event.
T Value< T >()
Attempts to cast the value to the given type.
Parameters:
T |
The type to cast to. |
Returns:
The object if casted, otherwise default.