Lumiera  0.pre.03
»edit your freedom«
engine-interface-test.cpp
Go to the documentation of this file.
1 /*
2  EngineInterface(Test) - verify basics of the engine (scheduling) service
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 
28 #include "lib/test/run.hpp"
29 #include "lib/error.hpp"
30 
37 #include "steam/asset/pipe.hpp"
38 #include "lib/time/timevalue.hpp"
39 
40 //#include <ctime>
41 
42 using test::Test;
43 //using std::rand;
44 
45 
46 namespace steam {
47 namespace engine{
48 namespace test {
49 
50  using asset::Pipe;
51  using asset::PPipe;
52  using mobject::ModelPort;
56 
57  typedef asset::ID<Pipe> PID;
58  typedef OutputSlot::Allocation Allocation;
59 
60 
61  namespace { // test fixture...
62 
63  } // (End) test fixture
64 
65 
66 
67  /***************************************************************/
84  class EngineInterface_test : public Test
85  {
86 
87  virtual void
88  run (Arg)
89  {
90  UNIMPLEMENTED ("simple standard case of Engine interface usage");
91 
93  EngineDiagnostics monitor(engine);
94 
95  PID pipe = Pipe::query("id(dummy)");
96  ModelPort port(pipe);
97 
99  Allocation& output = oSlot.allocate();
100  Timings timings (FrameRate::PAL);
101 
102  // Invoke test subject...
103  CalcStreams calc = engine.calculate(port, timings, output);
104 
106 
107  CHECK (monitor.has_scheduled_jobs_for(timings));
108  }
109 
110  };
111 
112 
114  LAUNCHER (EngineInterface_test, "function engine");
115 
116 
117 
118 }}} // namespace steam::engine::test
Organising the output data calculation possibilities.
An (abstract) capability to send media data to an external output.
Access point for the (core) calculation service of the render engine.
A "processing pipe" represented as Asset.
CalcStreams calculate(ModelPort mPort, Timings nominalTimings, OutputConnection &output, Quality serviceQuality=QoS_DEFAULT)
core operation: activate the Lumiera Render Engine.
Definition: run.hpp:49
Framerate specified as frames per second.
Definition: timevalue.hpp:664
Generic frame timing specification.
Definition: timings.hpp:95
An facility for writing unit-tests against the OutputSlot interface.
Steam-Layer implementation namespace root.
static lib::Depend< EngineService > instance
access point to the Engine Interface.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
Definition: pipe.hpp:79
Abstract Base Class for all testcases.
Definition: run.hpp:62
Helper for unit tests: Mock output sink.
A service to schedule series of calculations, delivering the rendered data into an external output si...
Simple test class runner.
An facility to check and monitor engine operations.
A core abstraction within the render engine to represent an ongoing calculation.
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Definition: pipe.cpp:66
Lumiera error handling (C++ interface).
Handle designating a point within the model, where actually output data can be pulled.
Definition: model-port.hpp:104
Interface: Generic output sink.
Allocation & allocate()
claim this slot for exclusive use
Definition: output-slot.cpp:82
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
Render engine diagnostic facility.
static OutputSlot & build()
build a new Diagnostic Output Slot instance, discard the existing one.
a family of time value like entities and their relationships.
static const FrameRate PAL
predefined constant for PAL framerate
Definition: timevalue.hpp:680