diff --git a/include/spinscale/component.h b/include/spinscale/component.h index 0fb3b04..d94ec77 100644 --- a/include/spinscale/component.h +++ b/include/spinscale/component.h @@ -10,7 +10,20 @@ namespace sscl { class ComponentThread; +class PuppetThread; +/** EXPLANATION: + * Components are API-exposing sub-components of an application. They are used + * aggregate the resources and API of some logically distinct sub-system into + * a single abstract entity. Basically, a component is a way to bind some APIs + * and resources to a particular thread. Ideally, all accesses to the resources + * of a component should be made through the component's APIs. + * + * Multiple components can share the same thread; and for this reason, each + * component must be supplied with a reference to the thread it shares. + * This amounts to saying that a single thread may expose and serve multiple + * APIs. + */ class Component { public: @@ -29,7 +42,7 @@ class PuppetComponent public: PuppetComponent( PuppetApplication &parent, - const std::shared_ptr &thread); + const std::shared_ptr &thread); ~PuppetComponent() = default; public: diff --git a/src/component.cpp b/src/component.cpp index 898578e..d901548 100644 --- a/src/component.cpp +++ b/src/component.cpp @@ -10,7 +10,7 @@ Component::Component(const std::shared_ptr &thread) } PuppetComponent::PuppetComponent( - PuppetApplication &parent, const std::shared_ptr &thread) + PuppetApplication &parent, const std::shared_ptr &thread) : Component(thread), parent(parent) {