Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::GrailDebugger Class Reference
Inheritance diagram for grail::GrailDebugger:
Collaboration diagram for grail::GrailDebugger:

Classes

struct  DebuggerData
 

Public Member Functions

 GrailDebugger (const std::shared_ptr< ITimestampProvider > &timestampProvider)
 
void AttachToManager (AIManager *manager, bool attachToAllEntities=true)
 AttachToManager - attaches the debugger instance to an AIManager. More...
 
void DetachFromManager (AIManager *manager)
 DetachFromCurrentlyObservedManager - detaches the debugger from the currently selected AI Manager and its entities.
 
void AttachToEntity (AIEntity &entity)
 AttachToEntity - starts producing debug data for an entity's reasoner. More...
 
void DetachFromEntity (AIEntity &entity)
 DetachFromEntity - stops the production of debug data for an entity's reasoner. More...
 
void AddDebugSnapshotReceiver (const AIManager *manager, IDebugSnapshotReceiver *receiver)
 AddDebugSnapshotReceiver - registers a debug snapshot receiver that can react to newly produced debug data.
 
void RemoveDebugSnapshotReceiver (const AIManager *manager, IDebugSnapshotReceiver *receiver)
 AddDebugSnapshotReceiver - removes a debug snapshot receiver.
 
void Update () const
 Creates debug data for entities and managers that the debugger is attached to, notifies registered snapshot receivers.
 
virtual void OnReasonerSet (AIEntity &entity, Reasoner *newReasoner) override
 
virtual void OnEntityAdded (const AIManager &manager, AIEntity &entity) override
 
virtual void OnEntityRemoved (const AIManager &manager, size_t entityId) override
 
- Public Member Functions inherited from grail::IEntityChangeObserver
 IEntityChangeObserver (const IEntityChangeObserver &)=delete
 
 IEntityChangeObserver (IEntityChangeObserver &&)=delete
 
IEntityChangeObserveroperator= (const IEntityChangeObserver &)=delete
 
IEntityChangeObserveroperator= (IEntityChangeObserver &&)=delete
 

Static Public Member Functions

static DebuggerData CreateDefaultFor (const AIManager &aiManager, const std::shared_ptr< ITimestampProvider > &timestampProvider)
 Creates a new GrailDebugger for a specific AIManager. More...
 

Member Function Documentation

◆ AttachToEntity()

void grail::GrailDebugger::AttachToEntity ( AIEntity entity)

AttachToEntity - starts producing debug data for an entity's reasoner.

Parameters
entity- the entity to attach to

◆ AttachToManager()

void grail::GrailDebugger::AttachToManager ( AIManager manager,
bool  attachToAllEntities = true 
)

AttachToManager - attaches the debugger instance to an AIManager.

Parameters
manager- the manager to attach to
attachToAllEntities- if set to true, the debugger will automatically attach to reasoners of all entities

◆ CreateDefaultFor()

GrailDebugger::DebuggerData grail::GrailDebugger::CreateDefaultFor ( const AIManager aiManager,
const std::shared_ptr< ITimestampProvider > &  timestampProvider 
)
static

Creates a new GrailDebugger for a specific AIManager.

Parameters
timestampProvider- A timestamp provider to be used by the newly created debugger.
aiManager- The AIManager for which the debugger should be created.
Returns
DebuggerData instance, containing a new GrailDebugger instance coupled with its respective debug info generator.

◆ DetachFromEntity()

void grail::GrailDebugger::DetachFromEntity ( AIEntity entity)

DetachFromEntity - stops the production of debug data for an entity's reasoner.

Parameters
entity- the entity to detach from

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