DecisionFlex
Utilty AI for Unity
 All Classes Namespaces Functions Variables Events Pages
Public Member Functions | List of all members
TenPN.DecisionFlex.ContextDictionary Class Reference

One possible implementation of IContext. More...

Inheritance diagram for TenPN.DecisionFlex.ContextDictionary:
TenPN.DecisionFlex.IContext

Public Member Functions

void SetContext (object key, int value)
 
void SetContext (object key, float value)
 
void SetContext (object key, bool flag)
 
void SetContext< T > (object key, T obj)
 
bool HasContext< T > (object key)
 
GetContext< T > (object key)
 

Detailed Description

One possible implementation of IContext.

You are responsible for populating this, in your implementation of ContextFactory. It will be passed to every Consideration in the decision in turn.

Will not allocate, as long as you only store floats, ints, bools or objects.

Think of it as a blackboard, or dynamic storage.

Member Function Documentation

T TenPN.DecisionFlex.ContextDictionary.GetContext< T > ( object  key)
inline
Exceptions
ApplicationExceptionif this key isn't in the context

Implements TenPN.DecisionFlex.IContext.

bool TenPN.DecisionFlex.ContextDictionary.HasContext< T > ( object  key)
inline

T is type of value we expect for this context

Implements TenPN.DecisionFlex.IContext.


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