North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Properties | List of all members
NSFDataEvent< DataType > Class Template Reference

Represents an event that contains a data payload. More...

Inheritance diagram for NSFDataEvent< DataType >:
NSFEvent NSFTimerAction INSFIdObject INSFNamedObject

Public Member Functions

 NSFDataEvent (NSFString name, INSFEventHandler parent)
 Creates event that can have a data payload. More...
 
 NSFDataEvent (NSFString name, INSFEventHandler parent, DataType data)
 Creates event that can have a data payload. More...
 
 NSFDataEvent (NSFString name, INSFNamedObject source, INSFEventHandler destination)
 Creates event that can have a data payload. More...
 
 NSFDataEvent (NSFString name, INSFNamedObject source, INSFEventHandler destination, DataType data)
 Creates event that can have a data payload. More...
 
 NSFDataEvent (NSFDataEvent< DataType > nsfEvent)
 Creates event that can have a data payload. More...
 
 NSFDataEvent (NSFDataEvent< DataType > nsfEvent, DataType data)
 Creates event that can have a data payload. More...
 
override NSFEvent copy ()
 Creates a deep copy. More...
 
virtual NSFDataEvent< DataType > copy (DataType data)
 Creates a deep copy, replacing the specified parameters. More...
 
NSFDataEvent< DataType > copy (NSFString name, DataType data)
 Creates a deep copy, replacing the specified parameters. More...
 
NSFDataEvent< DataType > copy (INSFNamedObject source, INSFEventHandler destination, DataType data)
 Creates a deep copy, replacing the specified parameters. More...
 
NSFDataEvent< DataType > copy (NSFString name, INSFNamedObject source, INSFEventHandler destination, DataType data)
 Creates a deep copy, replacing the specified parameters. More...
 
- Public Member Functions inherited from NSFEvent
 NSFEvent (NSFString name, INSFEventHandler parent)
 Creates an event. More...
 
 NSFEvent (NSFString name, INSFNamedObject source, INSFEventHandler destination)
 Creates an event. More...
 
 NSFEvent (NSFEvent nsfEvent)
 Creates an event. More...
 
NSFEvent copy (NSFString name)
 Creates a deep copy. More...
 
NSFEvent copy (INSFNamedObject source, INSFEventHandler destination)
 Creates a deep copy, replacing the specified parameters. More...
 
NSFEvent copy (NSFString name, INSFNamedObject source, INSFEventHandler destination)
 Creates a deep copy, replacing the specified parameters. More...
 
void queueEvent ()
 Queues the event to its destination. More...
 
void queueEvent (NSFStateMachineContext context)
 Queues the event to its destination. More...
 
void schedule (INSFNamedObject source, INSFEventHandler destination, NSFTime delayTime, NSFTime repeatTime)
 Schedules the event to execute. More...
 
void setRouting (INSFNamedObject source, INSFEventHandler destination)
 Sets the source and destination of the event. More...
 
- Public Member Functions inherited from NSFTimerAction
bool isScheduled ()
 Checks if the action is already scheduled. More...
 
void schedule ()
 Schedules the action to execute at the previously designated delay and repeat times. More...
 
void schedule (NSFTime delayTime)
 Schedules the action to execute after the specified delay time with zero repeat time. More...
 
void schedule (NSFTime delayTime, NSFTime repeatTime)
 Schedules the action to execute at the specified times. More...
 
void scheduleAbsoluteExecution ()
 Schedules the action to execute at its designated execution time. More...
 
void scheduleAbsoluteExecution (NSFTime executionTime)
 Schedules the action to execute at the specified execution time. More...
 
void scheduleAbsoluteExecution (NSFTime executionTime, NSFTime repeatTime)
 Schedules the action to execute at the specified execution time. More...
 
void unschedule ()
 Unschedules the action. More...
 

Properties

DataType Data [get, set]
 Gets or sets the data payload. More...
 
- Properties inherited from NSFEvent
INSFEventHandler Destination [get, set]
 Gets or sets the event destination. More...
 
NSFId Id [get, set]
 Gets or sets the event id. More...
 
INSFNamedObject Source [get, set]
 Gets or sets the event source. More...
 
- Properties inherited from NSFTimerAction
NSFTime DelayTime [get, set]
 Gets or sets the delay time of the action. More...
 
NSFTime ExecutionTime [get, set]
 Gets or sets the execution time of the action. More...
 
NSFString Name [get, set]
 Gets or sets the name of the action. More...
 
NSFTime RepeatTime [get, set]
 Gets or sets the repeat time for periodic actions, 0 if non-periodic. More...
 
- Properties inherited from INSFNamedObject
NSFString Name [get]
 Gets the name of the object. More...
 
- Properties inherited from INSFIdObject
NSFId Id [get]
 Gets or sets the id number of the object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from NSFTimerAction
 NSFTimerAction (NSFString name)
 Creates a timer action. More...
 

Detailed Description

Represents an event that contains a data payload.

Constructor & Destructor Documentation

NSFDataEvent ( NSFString  name,
INSFEventHandler  parent 
)

Creates event that can have a data payload.

Parameters
nameThe name of the event.
parentThe parent of the event.

The event source and destination will be set to the parent.

NSFDataEvent ( NSFString  name,
INSFEventHandler  parent,
DataType  data 
)

Creates event that can have a data payload.

Parameters
nameThe name of the event.
parentThe parent of the event.
dataThe data of the event.

The event source and destination will be set to the parent.

NSFDataEvent ( NSFString  name,
INSFNamedObject  source,
INSFEventHandler  destination 
)

Creates event that can have a data payload.

Parameters
nameThe name of the event.
sourceThe source of the event.
destinationThe destination of event.
NSFDataEvent ( NSFString  name,
INSFNamedObject  source,
INSFEventHandler  destination,
DataType  data 
)

Creates event that can have a data payload.

Parameters
nameThe name of the event.
sourceThe source of the event.
destinationThe destination of the event.
dataThe data of the event.
NSFDataEvent ( NSFDataEvent< DataType >  nsfEvent)

Creates event that can have a data payload.

Parameters
nsfEventThe event to copy.
NSFDataEvent ( NSFDataEvent< DataType >  nsfEvent,
DataType  data 
)

Creates event that can have a data payload.

Parameters
nsfEventThe event to copy.
dataThe data of the event.

Member Function Documentation

override NSFEvent copy ( )
virtual

Creates a deep copy.

Returns
The copy of the event.

A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.

Reimplemented from NSFEvent.

virtual NSFDataEvent<DataType> copy ( DataType  data)
virtual

Creates a deep copy, replacing the specified parameters.

Parameters
dataThe new data for the copy.
Returns
A copy of the event.

A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.

NSFDataEvent<DataType> copy ( NSFString  name,
DataType  data 
)

Creates a deep copy, replacing the specified parameters.

Parameters
nameThe new name for the copy.
dataThe new data for the copy.
Returns
A copy of the event.

A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.

NSFDataEvent<DataType> copy ( INSFNamedObject  source,
INSFEventHandler  destination,
DataType  data 
)

Creates a deep copy, replacing the specified parameters.

Parameters
sourceThe new source for the copy.
destinationThe new destination for the copy.
dataThe new data for the copy.
Returns
A copy of the event.

A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.

NSFDataEvent<DataType> copy ( NSFString  name,
INSFNamedObject  source,
INSFEventHandler  destination,
DataType  data 
)

Creates a deep copy, replacing the specified parameters.

Parameters
nameThe new name for the copy.
sourceThe new source for the copy.
destinationThe new destination for the copy.
dataThe new data for the copy.
Returns
A copy of the event.

A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.

Property Documentation

DataType Data
getset

Gets or sets the data payload.




Copyright 2004-2014, North State Software, LLC. All rights reserved.