Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
facade.cpp
Go to the documentation of this file.
1/*
2 Facade - access point for communicating with the Steam-Interface
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
38#include "steam/facade.hpp"
39#include "lib/depend.hpp"
42
43#include <string>
44
45
46namespace steam {
47
48 using std::string;
49 using std::unique_ptr;
50 using lumiera::Subsys;
51 using lumiera::Option;
53
54
56 : public Subsys
57 {
58 operator string() const { return "Session"; }
59
63 bool
64 shouldStart (Option&) override
65 {
66 return false;
67 }
68
69 bool
70 start (Option&, Subsys::SigTerm termNotification) override
71 {
72 return SteamDispatcher::instance().start (termNotification);
73 }
74
75 void
76 triggerShutdown() noexcept override
77 {
78 SteamDispatcher::instance().requestStop();
79 }
80
81 bool
82 checkRunningState() noexcept override
83 {
84 return SteamDispatcher::instance().isRunning();
85 }
86 };
87
88
89
91 : public Subsys
92 {
93 operator string() const { return "PlayOut"; }
94
102 bool
103 shouldStart (Option&) override
104 {
105 TODO ("extract options about specific output systems to be brought up");
106 return false;
107 }
108
109 bool
110 start (Option&, Subsys::SigTerm termination) override
111 {
112 this->completedSignal_ = termination;
113 return play::OutputDirector::instance().connectUp();
114 }
115
117
118
119 void
120 triggerShutdown() noexcept override
121 {
123 }
124
125
126 bool
127 checkRunningState() noexcept override
128 {
129 return play::OutputDirector::instance().isOperational();
130 }
131 };
132
137
138
139
140
142 Subsys&
144 {
145 return theSessionSubsystemLifecycle();
146 }
147
148
150 Subsys&
152 {
153 return thePlayOutDescriptor();
154 }
155
156
157
158} // namespace steam
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Frontend for handling the Lumiera application commandline arguments.
Definition option.hpp:70
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition subsys.hpp:63
function< void(string *)> SigTerm
Definition subsys.hpp:65
bool shouldStart(Option &) override
determine, if any output system is required to start up explicitly.
Definition facade.cpp:103
bool checkRunningState() noexcept override
whether this subsystem is actually operational.
Definition facade.cpp:127
bool start(Option &, Subsys::SigTerm termination) override
attempt to bring up this subsystem up.
Definition facade.cpp:110
void triggerShutdown() noexcept override
initiate termination of this subsystem.
Definition facade.cpp:120
bool shouldStart(Option &) override
Definition facade.cpp:64
bool checkRunningState() noexcept override
whether this subsystem is actually operational.
Definition facade.cpp:82
bool start(Option &, Subsys::SigTerm termNotification) override
attempt to bring up this subsystem up.
Definition facade.cpp:70
void triggerShutdown() noexcept override
initiate termination of this subsystem.
Definition facade.cpp:76
Guard to manage processing commands to operate on the session.
static lib::Depend< SteamDispatcher > instance
storage for Singleton access
static lib::Depend< OutputDirector > instance
storage for the single application wide OutputDirector instance
Singleton services and Dependency Injection.
lib::Depend< PlayOutSubsysDescriptor > thePlayOutDescriptor
Definition facade.cpp:135
lib::Depend< SessionSubsystem > theSessionSubsystemLifecycle
Definition facade.cpp:134
Steam-Layer implementation namespace root.
A global service to coordinate and handle all external output activities.
Dispatch and execute mutation operations on the High-level model.
Top level entrance point and facade for the Steam-Layer.
static lumiera::Subsys & getPlayOutDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to bring up the render ...
Definition facade.cpp:151
static lumiera::Subsys & getSessionDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to boot the support inf...
Definition facade.cpp:143