Lumiera  0.pre.03
»edit your freedom«
main.cpp
Go to the documentation of this file.
1 /*
2  main.cpp - start the Lumiera Application
3 
4  Copyright (C)
5  2007, Joel Holdsworth <joel@airwebreathe.org.uk>
6  2007, Christian Thaeter <ct@pipapo.org>
7  2008, Hermann Vosseler <Ichthyostega@web.de>
8 
9   **Lumiera** is free software; you can redistribute it and/or modify it
10   under the terms of the GNU General Public License as published by the
11   Free Software Foundation; either version 2 of the License, or (at your
12   option) any later version. See the file COPYING for further details.
13 
14 * *****************************************************************/
15 
21 #include "include/logging.h"
22 #include "lib/error.hpp"
23 #include "common/appstate.hpp"
24 #include "common/option.hpp"
25 
26 #include "vault/enginefacade.hpp"
27 #include "vault/netnodefacade.hpp"
30 #include "steam/facade.hpp"
31 #include "stage/guifacade.hpp"
32 
33 using lib::Cmdline;
34 using lumiera::Subsys;
35 using lumiera::AppState;
36 
37 namespace {
45 }
46 
47 
48 
49 int
50 main (int argc, const char* argv[])
51 {
52  NOTICE (main, "*** Lumiera NLE for Linux ***");
53 
54  AppState& application = AppState::instance();
55  try
56  {
57  Cmdline args (argc,argv);
58  lumiera::Option options (args);
59  application.init (options);
60 
61  netNode.depends (session);
62  netNode.depends (engine);
63 // playOut.depends (engine);
64  playOut.depends (session);
65  lumigui.depends (session);
66 // lumigui.depends (engine);
67  player.depends (playOut);
68  lumigui.depends (player);
69  script.depends (session);
70  script.depends (engine);
71 
72  application.maybeStart (playOut);
73  application.maybeStart (netNode);
74  application.maybeStart (lumigui);
75  application.maybeStart (script);
76 
77  return application.maybeWait();
78  }
79 
80 
81  catch (lumiera::Error& problem)
82  {
83  return application.abort (problem);
84  }
85  catch (...)
86  {
87  return application.abort();
88  }
89 }
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:61
Global control interface for script driven operation of Lumiera.
Global control interface for the render engine subsystem.
int main(int argc, const char *argv[])
run all tests or any single test specified in the first command line argument.
Definition: testrunner.cpp:37
static lumiera::Subsys & getPlayOutDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to bring up the render ...
Definition: facade.cpp:151
Global control interface for running Lumiera as a renderfarm node.
This header is for including and configuring NoBug.
Frontend for handling the Lumiera application commandline arguments.
Definition: option.hpp:68
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to deal with the dummy pl...
The Lumiera Application state and basic initialisation.
Definition: appstate.hpp:61
ExitCode abort(lumiera::Error &problem)
initiate the controlled error shutdown sequence
Definition: appstate.cpp:178
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:65
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to load, start and stop the Lumiera GTK GUI.
Definition: guifacade.cpp:192
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to pull up and shut down ...
void maybeStart(lumiera::Subsys &)
building on the state determined by init, decide if the given Subsys needs to be pulled up and...
Definition: appstate.cpp:127
Subsys & depends(Subsys &prereq)
define a dependency to another Subsys required for running this subsystem
Definition: subsys.cpp:41
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to start a script and to ...
front-end for handling the commandline arguments.
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to start and stop a node ...
void init(lumiera::Option &options)
evaluate the result of option parsing and maybe additional configuration such as to be able to determ...
Definition: appstate.cpp:102
static lumiera::Subsys & getSessionDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to boot the support inf...
Definition: facade.cpp:143
Lumiera error handling (C++ interface).
ExitCode maybeWait()
put the main thread of the application into a wait state, as long as some subsystem(s) registered wit...
Definition: appstate.cpp:152
Registering and managing primary application-global services.
Interface for the GUI loader and for accessing the GUI interface from the lower layers of Lumiera...
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...
Definition: cmdline.hpp:48
Interface and Base definition for all Lumiera Exceptions.
Definition: error.hpp:62