Lumiera  0.pre.03
»edit your freedom«
scriptrunnerfacade.cpp
Go to the documentation of this file.
1 /*
2  ScriptRunnerFacade - access point for running a script within Lumiera application context
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 
25 #include "lib/depend.hpp"
26 
27 #include <string>
28 
29 
30 namespace vault {
31 
32  using std::string;
33  using lumiera::Subsys;
34 
36  : public Subsys
37  {
38  operator string () const { return "Script runner"; }
39 
40  bool
42  {
43  TODO ("determine, if a script should be executed");
44  return false;
45  }
46 
47  bool
48  start (lumiera::Option&, SigTerm termination) override
49  {
50  UNIMPLEMENTED ("start the script as defined by the options and register script abort/exit hook");
51  return false;
52  }
53 
54  void
55  triggerShutdown () noexcept override
56  {
57  UNIMPLEMENTED ("halt any running script");
58  }
59 
60  bool
61  checkRunningState () noexcept override
62  {
63  //Lock guard{*this};
64  TODO ("implement detecting running state");
65  return false;
66  }
67  };
68 
69  namespace {
71  }
72 
73 
74 
75 
77  Subsys&
79  {
80  return theDescriptor();
81  }
82 
83 
84 
85 } // namespace vault
bool shouldStart(lumiera::Option &) override
query application option state to determine if this subsystem should be activated.
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:61
Global control interface for script driven operation of Lumiera.
bool checkRunningState() noexcept override
whether this subsystem is actually operational.
Frontend for handling the Lumiera application commandline arguments.
Definition: option.hpp:68
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
bool start(lumiera::Option &, SigTerm termination) override
attempt to bring up this subsystem up.
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to start a script and to ...
Singleton services and Dependency Injection.
void triggerShutdown() noexcept override
initiate termination of this subsystem.
Vault-Layer implementation namespace root.