3#include <Core/Messages/EventMessage.h>
4#include <Core/ResourceManager/ResourceHandle.h>
5#include <Core/Utils/Blackboard.h>
6#include <GameEngine/GameEngineDLL.h>
36 const char* GetName()
const {
return m_sName; }
37 void SetName(
const char* szName) { m_sName.
Assign(szName); }
53 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
54 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
57 virtual void OnActivated()
override;
58 virtual void OnDeactivated()
override;
79 void SetShowDebugInfo(
bool bShow);
80 bool GetShowDebugInfo()
const;
82 void SetTemplateFile(
const char* szName);
83 const char* GetTemplateFile()
const;
85 void SetEntryValue(
const char* szName,
const plVariant& value);
86 plVariant GetEntryValue(
const char* szName)
const;
112 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
113 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
116 virtual void Initialize()
override;
117 virtual void OnActivated()
override;
118 virtual void OnDeactivated()
override;
119 virtual void OnSimulationStarted()
override;
131 void SetSendEntryChangedMessage(
bool bSend);
132 bool GetSendEntryChangedMessage()
const;
134 void SetBlackboardName(
const char* szName);
135 const char* GetBlackboardName()
const;
138 plUInt32 Entries_GetCount()
const;
142 void Entries_Remove(plUInt32 uiIndex);
145 void InitializeFromTemplate();
159 using StorageType = plUInt8;
186 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
187 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
190 virtual void Initialize()
override;
191 virtual void OnActivated()
override;
192 virtual void OnDeactivated()
override;
193 virtual void OnSimulationStarted()
override;
205 void SetBlackboardName(
const char* szName);
206 const char* GetBlackboardName()
const;
211 void InitializeFromTemplate();
This base component represents an plBlackboard, which can be used to share state between multiple com...
Definition BlackboardComponent.h:46
A blackboard is a key/value store that provides OnChange events to be informed when a value changes.
Definition Blackboard.h:66
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
Definition DynamicArray.h:81
A message sender that sends all messages to the next component derived from plEventMessageHandlerComp...
Definition EventMessage.h:39
This class represents an object inside the world.
Definition GameObject.h:32
This component references a global blackboard by name. If necessary, the blackboard will be created.
Definition BlackboardComponent.h:179
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
void Assign(const char(&string)[N])
Assigning a new string from a string constant is a slow operation, but the hash computation can happe...
This component creates its own plBlackboard, and thus locally holds state.
Definition BlackboardComponent.h:105
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
Definition Blackboard.h:117
Definition BlackboardComponent.h:14
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Base class for all messages that are sent as 'events'.
Definition EventMessage.h:8
Definition BlackboardComponent.h:158
Enum
Definition BlackboardComponent.h:162
@ EnsureEntriesExist
Brief only adds entries to the blackboard, that haven't been added before. Doesn't change the values ...
Definition BlackboardComponent.h:163
@ ResetEntryValues
Overwrites values of existing entries, to reset them to the start value defined in the template.
Definition BlackboardComponent.h:164
@ ClearEntireBlackboard
Removes all entries from the blackboard and only adds the ones from the template. This also gets rid ...
Definition BlackboardComponent.h:165
Definition BlackboardComponent.h:28
Definition UpdateLocalBoundsMessage.h:9
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54