Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
enginefacade.cpp
Go to the documentation of this file.
1 /*
2  EngineFacade - access point for communicating with the render engine
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
35 #include "backend/enginefacade.hpp"
36 #include "lib/depend.hpp"
37 
38 #include <string>
39 
40 
41 namespace backend {
42 
43  using std::string;
44  using lumiera::Subsys;
45 
47  : public Subsys
48  {
49  operator string () const { return "Engine"; }
50 
51  bool
53  {
54  TODO ("determine, if renderengine should be started");
55  return false;
56  }
57 
58  bool
59  start (lumiera::Option&, Subsys::SigTerm termination) override
60  {
61  UNIMPLEMENTED ("pull up renderengine and register shutdown hook");
62  return false;
63  }
64 
65  void
66  triggerShutdown () noexcept override
67  {
68  UNIMPLEMENTED ("initiate halting the engine");
69  }
70 
71  bool
72  checkRunningState () noexcept override
73  {
74  //Lock guard (*this);
75  TODO ("implement detecting running state");
76  return false;
77  }
78  };
79 
80  namespace {
82  }
83 
84 
85 
86 
88  Subsys&
90  {
91  return theDescriptor();
92  }
93 
94 
95 
96 } // namespace backend
bool checkRunningState() noexceptoverride
whether this subsystem is actually operational.
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:70
Global control interface for the render engine subsystem.
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to pull up and shut down ...
Frontend for handling the Lumiera application commandline arguments.
Definition: option.hpp:76
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:275
void triggerShutdown() noexceptoverride
initiate termination of this subsystem.
Singleton services and Dependency Injection.
bool shouldStart(lumiera::Option &) override
query application option state to determine if this subsystem should be activated.
function< void(string *)> SigTerm
Definition: subsys.hpp:74
bool start(lumiera::Option &, Subsys::SigTerm termination) override
attempt to bring up this subsystem up.