Some more thoughts

This commit is contained in:
Blue 2025-03-03 21:36:02 +02:00
parent b997972ec1
commit bc2dc9bf07
Signed by: blue
GPG key ID: 9B203B252A63EE38
18 changed files with 146 additions and 42 deletions

View file

@ -1,11 +1,11 @@
set(SOURCES
module.cpp
owner.cpp
actor.cpp
)
set(HEADERS
module.h
owner.h
actor.h
)
target_sources(${EXEC_NAME} PRIVATE ${SOURCES})

14
module/actor.cpp Normal file
View file

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "actor.h"
Module::Actor::Actor():
Module()
{}
Module::Actor::~Actor() noexcept {}
void Module::Actor::message(const std::string& text) {
}

View file

@ -5,8 +5,14 @@
#include "module.h"
class Owner : public Module {
namespace Module {
class Actor : public Module {
public:
Owner();
~Owner() noexcept;
Actor();
~Actor() noexcept;
virtual void message(const std::string & text) override;
};
}

View file

@ -3,7 +3,7 @@
#include "module.h"
Module::Module()
Module::Module::Module()
{}
Module::~Module() noexcept {}
Module::Module::~Module() noexcept {}

View file

@ -3,10 +3,18 @@
#pragma once
#include <string>
namespace Module {
class Module {
protected:
Module();
virtual void message(const std::string& text) = 0;
public:
virtual ~Module() noexcept;
};
}

View file

@ -1,10 +0,0 @@
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "owner.h"
Owner::Owner():
Module()
{}
Owner::~Owner() noexcept {}