North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
NSFTransition Class Referenceabstract

Represents a state transition. More...

Inheritance diagram for NSFTransition:
NSFTaggedObject NSFUniquelyNumberedObject INSFNamedObject NSFExternalTransition NSFInternalTransition NSFLocalTransition NSFForkJoinTransition

Public Member Functions

void addTrigger (NSFEvent trigger)
 Adds a trigger to the list of trigger events. More...
 
- Public Member Functions inherited from NSFTaggedObject
 NSFTaggedObject (NSFString name)
 Creates an object with a unique id and a name. More...
 
- Public Member Functions inherited from NSFUniquelyNumberedObject
 NSFUniquelyNumberedObject ()
 Creates a uniquely numbered object. More...
 
bool isSameObject (NSFUniquelyNumberedObject other)
 Checks if this object is the same as another object. More...
 

Public Attributes

NSFVoidActions
< NSFStateMachineContext
Actions = new NSFVoidActions<NSFStateMachineContext>()
 Actions to be executed whenever the transition is taken. More...
 
NSFBoolGuards
< NSFStateMachineContext
Guards = new NSFBoolGuards<NSFStateMachineContext>()
 Guards to be evaluated to determine if the transition can be taken. More...
 

Protected Member Functions

abstract void fireTransition (NSFStateMachineContext context)
 Fires the transition. More...
 
 NSFTransition (NSFString name, NSFState source, NSFState target, NSFEvent trigger, NSFBoolGuard< NSFStateMachineContext > guard, NSFVoidAction< NSFStateMachineContext > action)
 Creates a transition. More...
 

Properties

virtual NSFState Source [get, set]
 Gets or sets the source of the transition. More...
 
NSFState Target [get, set]
 Gets or sets the target of the transition. More...
 
List< NSFEventTriggers [get]
 Gets the list of trigger events for the transition. More...
 
- Properties inherited from NSFTaggedObject
NSFString Name [get, set]
 
- Properties inherited from NSFUniquelyNumberedObject
NSFId UniqueId [get]
 Gets or sets the unique id of the object. More...
 
- Properties inherited from INSFNamedObject
NSFString Name [get]
 Gets the name of the object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from NSFUniquelyNumberedObject
static NSFId getNextUniqueId ()
 Gets the next unique id. More...
 

Detailed Description

Represents a state transition.

This class implements common behaviors for the concrete transition types: NSFInternalTransition, NSFLocalTransition, NSFExternalTransition. Transitions may specify event triggers, guards, and/or actions.

Constructor & Destructor Documentation

NSFTransition ( NSFString  name,
NSFState  source,
NSFState  target,
NSFEvent  trigger,
NSFBoolGuard< NSFStateMachineContext guard,
NSFVoidAction< NSFStateMachineContext action 
)
protected

Creates a transition.

Parameters
nameUser assigned name for transition.
sourceTransition source.
targetTransition target.
triggerTransition trigger.
guardTransition guard.
actionTransition action.

Deprecated - Use NSFExternalTransition or NSFLocalTransition

Member Function Documentation

void addTrigger ( NSFEvent  trigger)

Adds a trigger to the list of trigger events.

abstract void fireTransition ( NSFStateMachineContext  context)
protectedpure virtual

Fires the transition.

Parameters
contextThe state machine context associated with the transition firing.

This method is for use only by the North State Framework's internal logic.

Implemented in NSFLocalTransition, NSFExternalTransition, and NSFInternalTransition.

Member Data Documentation

NSFVoidActions<NSFStateMachineContext> Actions = new NSFVoidActions<NSFStateMachineContext>()

Actions to be executed whenever the transition is taken.

NSFBoolGuards<NSFStateMachineContext> Guards = new NSFBoolGuards<NSFStateMachineContext>()

Guards to be evaluated to determine if the transition can be taken.

Property Documentation

virtual NSFState Source
getset

Gets or sets the source of the transition.

NSFState Target
getset

Gets or sets the target of the transition.

List<NSFEvent> Triggers
get

Gets the list of trigger events for the transition.

Returns a copy of the internally used list. Use addTrigger to add a new trigger.




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