• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • ActivityContext
  • octomy::activity::ActivityContext Class

    class octomy::activity::ActivityContext

    The interface an activity uses to reach its host application by facility name. More...

    Header: #include <ActivityContext>
    Inherited By:

    NodeActivityContext and octomy::standalone::StandaloneActivityContext

    Detailed Description

    An ActivityContext is the one channel through which an activity reaches the rest of the application. An activity does not include domain-library headers such as libnode or libhive. It looks up what it needs by string key with facility(), and it reaches the host's activity stack with stack(). The host binds facilities with registerFacility().

    libactivity ships the interface only. The host provides the implementation: NodeActivityContext forwards into a live node, and octomy::standalone::StandaloneActivityContext is a pure registry for apps with no node. The host owns the context and keeps it alive longer than every activity it serves. An activity receives a plain pointer at construction, through the ActivityLoader factory, and reads it back with Activity::context().

    A facility is a named QObject that lives as long as the application. It is called a facility, not a service, because OctoMY keeps "service" for the tier-managed daemons.

    See also octomy::activity::Activity and octomy::standalone::StandaloneActivityContext.