solanaceae_factorio/src/factorio.cpp

29 lines
711 B
C++
Raw Normal View History

2024-06-10 20:11:25 +02:00
#include "./factorio.hpp"
#include <solanaceae/message3/components.hpp>
#include <solanaceae/contact/components.hpp>
2024-06-10 21:37:31 +02:00
#include "./log_parse.hpp"
2024-06-10 22:27:19 +02:00
Factorio::Factorio(Contact3Registry& cr, RegistryMessageModel& rmm) :
_cr(cr),
_rmm(rmm),
_fw("test.txt", [this](const auto& path, const auto event){ this->onFileEvent(path, event);})
{
2024-06-10 20:11:25 +02:00
_rmm.subscribe(this, RegistryMessageModel_Event::message_construct);
}
Factorio::~Factorio(void) {
}
bool Factorio::onEvent(const Message::Events::MessageConstruct& e) {
return false;
}
2024-06-10 22:27:19 +02:00
void onFileEvent(const std::string& path, const filewatch::Event change_type) {
std::cout << "file even " << filewatch::event_to_string(change_type) << " on '" << path << "'\n";
}