BGC Tools
Public Member Functions | Protected Member Functions | Protected Attributes
BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum > Class Template Referenceabstract

Defines a class that must be implemented which is for defining when transitions should occur. It also allows for work to be done when a transition cocurs More...

Inheritance diagram for BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >:
Inheritance graph
[legend]
Collaboration diagram for BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >:
Collaboration graph
[legend]

Public Member Functions

void SetStateMachineFunctions (ITransitionDataRetriever< TBoolEnum, TTriggerEnum > stateMachine)
 Sets the required functions for the transition that it has received from the state machine. More...
 
abstract void OnTransition ()
 Called before the transition for anything useful to be done such as consumeing triggers More...
 
abstract bool ShouldTransition ()
 Returns whether or not the condition has been met and a transition should occur More...
 

Protected Member Functions

abstract void StateMachineFunctionsSet ()
 A transition receives information from the state machine on construction, however, the transition condition will send the functions to all it contains More...
 

Protected Attributes

ITransitionDataRetriever< TBoolEnum, TTriggerEnum > stateMachine
 

Detailed Description

Defines a class that must be implemented which is for defining when transitions should occur. It also allows for work to be done when a transition cocurs

Type Constraints
TBoolEnum :Enum 
TTriggerEnum :Enum 

Definition at line 12 of file TransitionCondition.cs.

Member Function Documentation

◆ OnTransition()

abstract void BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >.OnTransition ( )
pure virtual

◆ SetStateMachineFunctions()

void BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >.SetStateMachineFunctions ( ITransitionDataRetriever< TBoolEnum, TTriggerEnum >  stateMachine)
inline

Sets the required functions for the transition that it has received from the state machine.

Definition at line 22 of file TransitionCondition.cs.

23  {
24  Assert.IsNotNull(stateMachine);
25 
28  }
ITransitionDataRetriever< TBoolEnum, TTriggerEnum > stateMachine
abstract void StateMachineFunctionsSet()
A transition receives information from the state machine on construction, however, the transition condition will send the functions to all it contains

◆ ShouldTransition()

abstract bool BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >.ShouldTransition ( )
pure virtual

◆ StateMachineFunctionsSet()

abstract void BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >.StateMachineFunctionsSet ( )
protectedpure virtual

A transition receives information from the state machine on construction, however, the transition condition will send the functions to all it contains

Implemented in BGC.StateMachine.OrConjunction< TBoolEnum, TTriggerEnum >, BGC.StateMachine.BoolCondition< TBoolEnum, TTriggerEnum >, and BGC.StateMachine.TriggerCondition< TBoolEnum, TTriggerEnum >.

Field Documentation

◆ stateMachine

ITransitionDataRetriever<TBoolEnum, TTriggerEnum> BGC.StateMachine.TransitionCondition< TBoolEnum, TTriggerEnum >.stateMachine
protected

Definition at line 16 of file TransitionCondition.cs.


The documentation for this class was generated from the following file: