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)
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 
19 #include "lib/test/run.hpp"
20 #include "lib/error.hpp"
21 
28 #include "steam/asset/pipe.hpp"
29 #include "lib/time/timevalue.hpp"
30 
31 //#include <ctime>
32 
33 using test::Test;
34 //using std::rand;
35 
36 
37 namespace steam {
38 namespace engine{
39 namespace test {
40 
41  using asset::Pipe;
42  using asset::PPipe;
43  using mobject::ModelPort;
47 
48  typedef asset::ID<Pipe> PID;
49  typedef OutputSlot::Allocation Allocation;
50 
51 
52  namespace { // test fixture...
53 
54  } // (End) test fixture
55 
56 
57 
58  /***************************************************************/
75  class EngineInterface_test : public Test
76  {
77 
78  virtual void
79  run (Arg)
80  {
81  UNIMPLEMENTED ("simple standard case of Engine interface usage");
82 
84  EngineDiagnostics monitor(engine);
85 
86  PID pipe = Pipe::query("id(dummy)");
87  ModelPort port(pipe);
88 
90  Allocation& output = oSlot.allocate();
91  Timings timings (FrameRate::PAL);
92 
93  // Invoke test subject...
94  CalcStreams calc = engine.calculate(port, timings, output);
95 
97 
98  CHECK (monitor.has_scheduled_jobs_for(timings));
99  }
100 
101  };
102 
103 
105  LAUNCHER (EngineInterface_test, "function engine");
106 
107 
108 
109 }}} // 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:40
Framerate specified as frames per second.
Definition: timevalue.hpp:655
Generic frame timing specification.
Definition: timings.hpp:86
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:70
Abstract Base Class for all testcases.
Definition: run.hpp:53
Helper for unit tests: Mock output sink.
A service to schedule series of calculations, delivering the rendered data into an external output si...
Simplistic 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:57
Lumiera error handling (C++ interface).
Handle designating a point within the model, where actually output data can be pulled.
Definition: model-port.hpp:95
Interface: Generic output sink.
Allocation & allocate()
claim this slot for exclusive use
Definition: output-slot.cpp:73
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:71
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:671