Lumiera  0.pre.03
»edit your freedom«
subsys.cpp
Go to the documentation of this file.
1 /*
2  Subsys - interface for describing an application part to be handled by main()
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 
37 #include "common/subsys.hpp"
38 
39 
40 namespace lumiera {
41 
42 
43 
44 
45  Subsys::~Subsys() { }
46 
47 
48 
49  Subsys&
51  {
52  prereq_.push_back(&prereq);
53  return *this;
54  }
55 
56 
57 
58  bool
59  Subsys::isRunning() noexcept
60  {
61  return checkRunningState();
62  }
63 
64 
65 
66 
67 
68 } // namespace lumiera
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Definition: subsys.hpp:70
Subsys & depends(Subsys &prereq)
define a dependency to another Subsys required for running this subsystem
Definition: subsys.cpp:50
Describing dependencies and lifecycle of the application&#39;s primary parts.
virtual bool checkRunningState() noexcept=0
whether this subsystem is actually operational.
bool isRunning() noexcept
Definition: subsys.cpp:59
Lumiera public interface.
Definition: advice.cpp:113