more event boilerplate
Some checks are pending
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousIntegration / linux (push) Successful in 22s

This commit is contained in:
2024-06-11 10:09:55 +02:00
parent 4295c6cc53
commit 70317ab4db
6 changed files with 141 additions and 8 deletions

View File

@@ -2,15 +2,28 @@
#include <solanaceae/message3/registry_message_model.hpp>
class Factorio : public RegistryMessageModelEventI {
#include "./factorio_log_parser.hpp"
class Factorio : public RegistryMessageModelEventI, public FactorioLogParserEventI {
Contact3Registry& _cr;
RegistryMessageModel& _rmm;
FactorioLogParser& _flp;
public:
Factorio(Contact3Registry& cr, RegistryMessageModel& rmm);
Factorio(Contact3Registry& cr, RegistryMessageModel& rmm, FactorioLogParser& flp);
virtual ~Factorio(void);
protected: // rmm
bool onEvent(const Message::Events::MessageConstruct& e) override;
protected: // flp
bool onEvent(const FactorioLog::Events::Join&) override;
bool onEvent(const FactorioLog::Events::Leave&) override;
bool onEvent(const FactorioLog::Events::Chat&) override;
bool onEvent(const FactorioLog::Events::Died&) override;
bool onEvent(const FactorioLog::Events::Evolution&) override;
bool onEvent(const FactorioLog::Events::ResearchStarted&) override;
bool onEvent(const FactorioLog::Events::ResearchFinished&) override;
bool onEvent(const FactorioLog::Events::ResearchCancelled&) override;
};