// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include #include "component/core.h" #include "component/actor.h" #include "connection/connection.h" namespace Module { class Module { public: typedef std::vector Tokens; protected: Module(const std::shared_ptr& core, const std::shared_ptr& connection); public: virtual ~Module() noexcept; static Tokens split(const std::string& string, const std::string& delimiter = " "); virtual void message(const std::shared_ptr& actor, const Tokens& args) = 0; protected: std::shared_ptr core; std::shared_ptr connection; }; }