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

One possible implementation of IContext. More...

Inheritance diagram for TenPN.DecisionFlex.FastContextDictionary:

Public Member Functions

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. Passed to every UtilityConsideration in the decision in turn.

faster than regular ContextDictionary, but makes some small allocs for basic-type values.

Think of it as a blackboard, or dynamic storage.

Member Function Documentation

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

Implements TenPN.DecisionFlex.IContext.

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

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: