2025-09-14 22:17:19 -04:00
|
|
|
#ifndef COMPONENT_H
|
|
|
|
|
#define COMPONENT_H
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <functional>
|
2025-12-26 01:18:39 -04:00
|
|
|
#include <spinscale/callback.h>
|
2025-12-27 14:15:17 -04:00
|
|
|
#include <spinscale/puppetApplication.h>
|
2025-09-14 22:17:19 -04:00
|
|
|
|
2025-12-27 16:21:22 -04:00
|
|
|
namespace sscl {
|
2025-09-14 22:17:19 -04:00
|
|
|
|
|
|
|
|
class ComponentThread;
|
|
|
|
|
|
|
|
|
|
class Component
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Component(const std::shared_ptr<ComponentThread> &thread);
|
|
|
|
|
~Component() = default;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::shared_ptr<ComponentThread> thread;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-27 13:29:49 -04:00
|
|
|
class PuppetComponent
|
2025-09-14 22:17:19 -04:00
|
|
|
: public Component
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-12-27 14:15:17 -04:00
|
|
|
PuppetComponent(
|
|
|
|
|
PuppetApplication &parent,
|
|
|
|
|
const std::shared_ptr<ComponentThread> &thread);
|
2025-12-27 13:29:49 -04:00
|
|
|
~PuppetComponent() = default;
|
2025-09-14 22:17:19 -04:00
|
|
|
|
|
|
|
|
public:
|
2025-12-27 14:15:17 -04:00
|
|
|
PuppetApplication &parent;
|
2025-09-14 22:17:19 -04:00
|
|
|
};
|
|
|
|
|
|
2025-12-27 16:21:22 -04:00
|
|
|
} // namespace sscl
|
2025-09-14 22:17:19 -04:00
|
|
|
|
|
|
|
|
#endif // COMPONENT_H
|