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) Lumiera.org
5  2007,2011, Joel Holdsworth <joel@airwebreathe.org.uk>
6  Christian Thaeter <ct@pipapo.org>
7  Hermann Vosseler <Ichthyostega@web.de>
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of
12  the License, or (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23 
24 
30 #include "include/logging.h"
31 #include "lib/error.hpp"
32 #include "common/appstate.hpp"
33 #include "common/option.hpp"
34 
35 #include "vault/enginefacade.hpp"
36 #include "vault/netnodefacade.hpp"
39 #include "steam/facade.hpp"
40 #include "stage/guifacade.hpp"
41 
42 using lib::Cmdline;
43 using lumiera::Subsys;
44 using lumiera::AppState;
45 
46 namespace {
54 }
55 
56 
57 
58 int
59 main (int argc, const char* argv[])
60 {
61  NOTICE (main, "*** Lumiera NLE for Linux ***");
62 
63  AppState& application = AppState::instance();
64  try
65  {
66  Cmdline args (argc,argv);
67  lumiera::Option options (args);
68  application.init (options);
69 
70  netNode.depends (session);
71  netNode.depends (engine);
72 // playOut.depends (engine);
73  playOut.depends (session);
74  lumigui.depends (session);
75 // lumigui.depends (engine);
76  player.depends (playOut);
77  lumigui.depends (player);
78  script.depends (session);
79  script.depends (engine);
80 
81  application.maybeStart (playOut);
82  application.maybeStart (netNode);
83  application.maybeStart (lumigui);
84  application.maybeStart (script);
85 
86  return application.maybeWait();
87  }
88 
89 
90  catch (lumiera::Error& problem)
91  {
92  return application.abort (problem);
93  }
94  catch (...)
95  {
96  return application.abort();
97  }
98 }
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:70
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:47
static lumiera::Subsys & getPlayOutDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to bring up the render ...
Definition: facade.cpp:160
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:77
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:70
ExitCode abort(lumiera::Error &problem)
initiate the controlled error shutdown sequence
Definition: appstate.cpp:187
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
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:201
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:136
Subsys & depends(Subsys &prereq)
define a dependency to another Subsys required for running this subsystem
Definition: subsys.cpp:50
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:111
static lumiera::Subsys & getSessionDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main() to boot the support inf...
Definition: facade.cpp:152
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:161
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:57
Interface and Base definition for all Lumiera Exceptions.
Definition: error.hpp:71