Lumiera  0.pre.03
»edit your freedom«
engine-service.hpp
Go to the documentation of this file.
1 /*
2  ENGINE-SERVICE.hpp - primary service access point for using the renderengine
3 
4  Copyright (C) Lumiera.org
5  2011, 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 
53 #ifndef STEAM_ENGINE_ENGINE_SERVICE_H
54 #define STEAM_ENGINE_ENGINE_SERVICE_H
55 
56 
57 #include "lib/error.hpp"
58 #include "lib/nocopy.hpp"
59 //#include "include/dummy-player-facade.h"
60 //#include "include/display-facade.h"
63 #include "steam/play/timings.hpp"
65 //#include "common/instancehandle.hpp"
66 //#include "lib/singleton-ref.hpp"
68 #include "lib/depend.hpp"
69 
70 #include <functional>
71 //#include <string>
72 
73 
74 namespace steam {
75 namespace engine{
76 
77 // using std::string;
78 // using lumiera::Subsys;
79 // using lumiera::Display;
80 // using lumiera::DummyPlayer;
81 // using std::function;
82  using mobject::ModelPort;
84 
85  typedef steam::play::OutputSlot::Allocation OutputConnection;
86 
87 
88 
89 
90 
91  /**************************************************/
104  {
105 
106 
107  /* The following typedefs allow to hand out predefined
108  * Quality-of-Service strategy definitions as value objects,
109  * without disclosing implementation details here in this header.
110  */
111  enum{ QoS_IMPL_SIZE = sizeof(size_t) };
112 
113 
114  public:
115  /*********************************************************/
122  class Quality
123  {
124  public:
125  virtual ~Quality() { };
126  };
127 
128 
131 
132  static QoS_Definition QoS_DEFAULT;
133  static QoS_Definition QoS_BACKGROUND;
134  static QoS_Definition QoS_SYNC_PRIORITY;
135  static QoS_Definition QoS_PERFECT_RESULT;
136  static QoS_Definition QoS_COMPROMISE;
137 
138 
144 
145 
146  virtual ~EngineService() { }
147 
148  EngineService();
149 
150  CalcStreams
151  calculate(ModelPort mPort,
152  Timings nominalTimings,
153  OutputConnection& output,
154  Quality serviceQuality =QoS_DEFAULT);
155 
156  CalcStreams
157  calculateBackground(ModelPort mPort,
158  Timings nominalTimings,
159  Quality serviceQuality =QoS_BACKGROUND);
160 
161 
162  protected:
164 
165  void activateTracing();
166  void disableTracing();
167 
168  friend class EngineDiagnostics;
169 
170  private:
172  };
173 
174 
175 
176 
177 
178 
179 }} // namespace steam::engine
180 #endif /*STEAM_ENGINE_ENGINE_SERVICE_H*/
Organising the output data calculation possibilities.
An (abstract) capability to send media data to an external output.
void activateTracing()
Switch the complete engine into diagnostics mode.
CalcStreams calculate(ModelPort mPort, Timings nominalTimings, OutputConnection &output, Quality serviceQuality=QoS_DEFAULT)
core operation: activate the Lumiera Render Engine.
Generic frame timing specification.
Definition: timings.hpp:95
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
A variation for limited copy support.
A mechanism to allow for opaque polymorphic value objects.
denotes an opened connection ready to receive media data for output.
Steam-Layer implementation namespace root.
static lib::Depend< EngineService > instance
access point to the Engine Interface.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:289
Mix-Ins to allow or prohibit various degrees of copying and cloning.
A service to schedule series of calculations, delivering the rendered data into an external output si...
static CalcStream activateCalculation(play::DataSink, RenderEnvironment &)
Template to build polymorphic value objects.
A calculation stream groups and abstracts a series of calculation jobs, delivering frames into the co...
Definition: calc-stream.hpp:96
A core abstraction within the render engine to represent an ongoing calculation.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
Handle designating a point within the model, where actually output data can be pulled.
Definition: model-port.hpp:104
How to define a timing specification or constraint.
virtual RenderEnvironment & configureCalculation(ModelPort, Timings, Quality)
Render engine diagnostic facility.
Quality-of-Service definition for an Render Engine usage.
Abstract definition of the environment hosting a given render activity (CalcStream).