A class in Root.Township, Alta.Intelligence.
A store of known events and rule definitions for the creature knowledge system. It can have a parent, whose knowledge also counts.
Constructors
Fields
2 private and internal fields
| Member | What it is |
|---|
private Dictionary<BaseAtom, List<IAtomDefinition>> definitions | Facts this holder knows, grouped by atom (functor). Definitions also returns the parent's. |
private Dictionary<Day, List<Event>> knownEvents | Events this holder knows about, grouped by day. KnowsAbout also checks the parent. |
Properties
| Member | What it is |
|---|
KnowledgeHolder Parent { get; private set; } | The holder whose knowledge this one also uses, or null. |
Methods
| Member | What it is |
|---|
IEnumerable<IAtomDefinition> Definitions(BaseAtom atom) (iterator) | Every definition for an atom, from this holder and then its parents. |
void Inform(IAtomDefinition definition) | Adds a definition, or adds an event and all the knowledge it carries. Already known items are skipped. |
void Inform(Event newEvent) | Adds a definition, or adds an event and all the knowledge it carries. Already known items are skipped. |
bool KnowsAbout(Event event) | True if this holder or a parent already knows the event. |
IEnumerable<Result> Query(Compound query) | Evaluates a compound query against this holder's knowledge. |
Used in
Members of other types that take, return or hold a KnowledgeHolder:
Character.Character, Character.Knowledge, Compound.EvaluateInternal, Intelligence.GetLastSeen, Intelligence.GetLastSeen2, Not.EvaluateInternal, Operator.EvaluateInternal, Or.EvaluateInternal, Predicate.Evaluate, Predicate.EvaluateInternal, True.EvaluateInternal.