1 #ifndef GRAIL_DEBUGGER_H
2 #define GRAIL_DEBUGGER_H
4 #include "../AIEntity.hh"
5 #include "../AIManager.hh"
6 #include "ITimestampProvider.h"
7 #include "IDebugSnapshotReceiver.h"
8 #include "ISnapshotGenerator.h"
9 #include "GrailStateSnapshotGenerator.h"
14 #include <unordered_set>
21 GrailDebugger(
const std::shared_ptr<ITimestampProvider>& timestampProvider);
68 void OnEntityRemoved(
const AIManager& manager,
size_t entityId)
override;
71 bool AttachToReasoner(
AIEntity& entity);
73 std::shared_ptr<ITimestampProvider> timestampProvider =
nullptr;
74 std::map<const AIManager*, std::vector<IDebugSnapshotReceiver*>> debugSnapshotReceivers{};
76 std::map<size_t, std::pair<std::unique_ptr<ISnapshotGenerator>, std::unordered_set<const AIManager*>>> reasonerSnapshotGenerators{};
77 std::map<const AIManager*, std::unique_ptr<GrailStateSnapshotGenerator>> grailStateSnapshotGenerators{};
The AIEntity class - Defines a basic object which can execute behaviors.
Definition: AIEntity.hh:39
The AIManager class - Manages registered entities and shared blackboards.
Definition: AIManager.hh:35
Definition: GrailDebugger.h:19
void AddDebugSnapshotReceiver(const AIManager *manager, IDebugSnapshotReceiver *receiver)
AddDebugSnapshotReceiver - registers a debug snapshot receiver that can react to newly produced debug...
Definition: GrailDebugger.cpp:96
void DetachFromEntity(AIEntity &entity)
DetachFromEntity - stops the production of debug data for an entity's reasoner.
Definition: GrailDebugger.cpp:85
void AttachToManager(AIManager *manager, bool attachToAllEntities=true)
AttachToManager - attaches the debugger instance to an AIManager.
Definition: GrailDebugger.cpp:11
void RemoveDebugSnapshotReceiver(const AIManager *manager, IDebugSnapshotReceiver *receiver)
AddDebugSnapshotReceiver - removes a debug snapshot receiver.
Definition: GrailDebugger.cpp:117
void AttachToEntity(AIEntity &entity)
AttachToEntity - starts producing debug data for an entity's reasoner.
Definition: GrailDebugger.cpp:77
void DetachFromManager(AIManager *manager)
DetachFromCurrentlyObservedManager - detaches the debugger from the currently selected AI Manager and...
Definition: GrailDebugger.cpp:47
void Update()
Creates debug data for entities and managers that the debugger is attached to, notifies registered sn...
Definition: GrailDebugger.cpp:139
Definition: IDebugSnapshotReceiver.h:7
Definition: AIManager.hh:18
Definition: AIEntity.hh:27
The Reasoner class - Entity's "brain", assigns them behaviors chosen by user-defined algorithms.
Definition: Reasoner.hh:20