Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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"
30
31//#include <ctime>
32
33using test::Test;
34//using std::rand;
35
36
37namespace steam {
38namespace engine{
39namespace test {
40
41 using asset::Pipe;
42 using asset::PPipe;
43 using mobject::ModelPort;
47
48 typedef asset::ID<Pipe> PID;
50
51
52 namespace { // test fixture...
53
54 } // (End) test fixture
55
56
57
58 /***************************************************************/
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
A core abstraction within the render engine to represent an ongoing calculation.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
Framerate specified as frames per second.
static const FrameRate PAL
predefined constant for PAL framerate
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition asset.hpp:98
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
Definition pipe.hpp:72
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Definition pipe.cpp:57
Render engine diagnostic facility.
bool has_scheduled_jobs_for(Timings const &timings)
A service to schedule series of calculations, delivering the rendered data into an external output si...
static lib::Depend< EngineService > instance
access point to the Engine Interface.
Handle designating a point within the model, where actually output data can be pulled.
Helper for unit tests: Mock output sink.
static OutputSlot & build()
build a new Diagnostic Output Slot instance, discard the existing one.
Interface: Generic output sink.
Allocation & allocate()
claim this slot for exclusive use
Generic frame timing specification.
Definition timings.hpp:87
Abstract Base Class for all testcases.
Definition run.hpp:54
An facility for writing unit-tests against the OutputSlot interface.
An facility to check and monitor engine operations.
Access point for the (core) calculation service of the render engine.
Lumiera error handling (C++ interface).
Organising the output data calculation possibilities.
OutputSlot::Allocation Allocation
std::vector< CalcStream > CalcStreams
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
An (abstract) capability to send media data to an external output.
A "processing pipe" represented as Asset.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Definition run.hpp:116
a family of time value like entities and their relationships.