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)
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
44 #ifndef STEAM_ENGINE_ENGINE_SERVICE_H
45 #define STEAM_ENGINE_ENGINE_SERVICE_H
46 
47 
48 #include "lib/error.hpp"
49 #include "lib/nocopy.hpp"
50 //#include "include/dummy-player-facade.h"
51 //#include "include/display-facade.h"
54 #include "steam/play/timings.hpp"
56 //#include "common/instancehandle.hpp"
57 //#include "lib/singleton-ref.hpp"
59 #include "lib/depend.hpp"
60 
61 #include <functional>
62 //#include <string>
63 
64 
65 namespace steam {
66 namespace engine{
67 
68 // using std::string;
69 // using lumiera::Subsys;
70 // using lumiera::Display;
71 // using lumiera::DummyPlayer;
72 // using std::function;
73  using mobject::ModelPort;
75 
76  typedef steam::play::OutputSlot::Allocation OutputConnection;
77 
78 
79 
80 
81 
82  /**************************************************/
95  {
96 
97 
98  /* The following typedefs allow to hand out predefined
99  * Quality-of-Service strategy definitions as value objects,
100  * without disclosing implementation details here in this header.
101  */
102  enum{ QoS_IMPL_SIZE = sizeof(size_t) };
103 
104 
105  public:
106  /*********************************************************/
113  class Quality
114  {
115  public:
116  virtual ~Quality() { };
117  };
118 
119 
122 
123  static QoS_Definition QoS_DEFAULT;
124  static QoS_Definition QoS_BACKGROUND;
125  static QoS_Definition QoS_SYNC_PRIORITY;
126  static QoS_Definition QoS_PERFECT_RESULT;
127  static QoS_Definition QoS_COMPROMISE;
128 
129 
135 
136 
137  virtual ~EngineService() { }
138 
139  EngineService();
140 
141  CalcStreams
142  calculate(ModelPort mPort,
143  Timings nominalTimings,
144  OutputConnection& output,
145  Quality serviceQuality =QoS_DEFAULT);
146 
147  CalcStreams
148  calculateBackground(ModelPort mPort,
149  Timings nominalTimings,
150  Quality serviceQuality =QoS_BACKGROUND);
151 
152 
153  protected:
155 
156  void activateTracing();
157  void disableTracing();
158 
159  friend class EngineDiagnostics;
160 
161  private:
163  };
164 
165 
166 
167 
168 
169 
170 }} // namespace steam::engine
171 #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:86
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
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:280
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:87
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:95
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).