Refactored insight startup code to accommodate on-demand activation.
Also created new event for activation request
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Bloom::Events
|
||||
TARGET_RESET,
|
||||
PROGRAMMING_MODE_ENABLED,
|
||||
PROGRAMMING_MODE_DISABLED,
|
||||
INSIGHT_ACTIVATION_REQUESTED,
|
||||
};
|
||||
|
||||
class Event
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
#include "ProgrammingModeEnabled.hpp"
|
||||
#include "ProgrammingModeDisabled.hpp"
|
||||
|
||||
#ifndef EXCLUDE_INSIGHT
|
||||
#include "InsightActivationRequested.hpp"
|
||||
#endif
|
||||
|
||||
namespace Bloom::Events
|
||||
{
|
||||
template <class EventType>
|
||||
|
||||
26
src/EventManager/Events/InsightActivationRequested.hpp
Normal file
26
src/EventManager/Events/InsightActivationRequested.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "Event.hpp"
|
||||
|
||||
namespace Bloom::Events
|
||||
{
|
||||
class InsightActivationRequested: public Event
|
||||
{
|
||||
public:
|
||||
static constexpr EventType type = EventType::INSIGHT_ACTIVATION_REQUESTED;
|
||||
static const inline std::string name = "InsightActivationRequested";
|
||||
|
||||
InsightActivationRequested() = default;
|
||||
|
||||
[[nodiscard]] EventType getType() const override {
|
||||
return InsightActivationRequested::type;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string getName() const override {
|
||||
return InsightActivationRequested::name;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user