Lumiera  0.pre.03
»edit your freedom«
netnodefacade.cpp
Go to the documentation of this file.
1 /*
2  NetNodeFacade - access point for maintaining a renderfarm node
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 
32 #include "vault/netnodefacade.hpp"
33 #include "lib/depend.hpp"
34 
35 #include <string>
36 
37 namespace vault {
38 
39  using std::string;
40  using lumiera::Subsys;
41 
43  : public Subsys
44  {
45  operator string () const { return "Renderfarm node"; }
46 
47  bool
49  {
50  TODO ("determine, if render node service should be provided");
51  return false;
52  }
53 
54  bool
55  start (lumiera::Option&, SigTerm termination) override
56  {
57  UNIMPLEMENTED ("open a render node server port and register shutdown hook");
58  return false;
59  }
60 
61  void
62  triggerShutdown () noexcept override
63  {
64  UNIMPLEMENTED ("initiate shutting down the render node");
65  }
66 
67  bool
68  checkRunningState () noexcept override
69  {
70  //Lock guard{*this};
71  TODO ("implement detecting running state");
72  return false;
73  }
74  };
75 
76  namespace {
78  }
79 
80 
81 
82 
84  Subsys&
86  {
87  return theDescriptor();
88  }
89 
90 
91 
92 } // namespace vault
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:70
bool shouldStart(lumiera::Option &) override
query application option state to determine if this subsystem should be activated.
Global control interface for running Lumiera as a renderfarm node.
Frontend for handling the Lumiera application commandline arguments.
Definition: option.hpp:77
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:289
bool checkRunningState() noexcept override
whether this subsystem is actually operational.
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to start and stop a node ...
Singleton services and Dependency Injection.
bool start(lumiera::Option &, SigTerm termination) override
attempt to bring up this subsystem up.
Vault-Layer implementation namespace root.
void triggerShutdown() noexcept override
initiate termination of this subsystem.