Lumiera
0.pre.03
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/core/steam/engine/mock-dispatcher.hpp"
A mocked frame Dispatcher setup without any backing model.
Instantiating such a MockDispatcher will automatically create some fake model structures and some ModelPort and DisplaySink handles (and thereby push aside and shadow any existing ModelPort registry).
The configuration is similar to MockSegmentation, using a test spec given as GenNode-tree to define Segments of the timeline and possibly pipeline-IDs and prerequisites. One notable difference is that here the default ctor always creates a single Segment covering the whole time axis, and that the ExitNode specification is automatically duplicated for all faked ModelPort(s).
Definition at line 330 of file mock-dispatcher.hpp.
Public Member Functions | |
MockDispatcher (std::initializer_list< GenNode > specs) | |
play::test::DummyOutputLink | getDummyConnection (uint index) |
The faked builder/playback setup provides some preconfigured ModelPort and corresponding DataSink handles. More... | |
JobTicket & | getJobTicketFor (size_t portIDX, TimeValue nominalTime) override |
Core Dispatcher operation: locate the appropriate Segment and retrieve/derive a »blueprint« for render job generation. More... | |
ModelPort | provideMockModelPort () |
size_t | resolveModelPort (ModelPort modelPort) override |
translate a generic ModelPort spec into the specific index number applicable at the Timeline referred-to by this Dispatcher More... | |
bool | verify (Job const &job, ModelPort const &port, play::DataSink const &sink) |
Test support: verify the given Job is consistent with this Dispatcher. | |
Public Member Functions inherited from Dispatcher | |
virtual | ~Dispatcher () |
this is an interface | |
Job | createJobFor (size_t portIDX, TimeValue nominalTime) |
Convenience shortcut for tests: JobTicket ⟼ Job. | |
PipelineBuilder< PipeFrameTick > | forCalcStream (Timings timings) |
Start a builder sequence to assemble a job-planning pipeline, backed by this Dispatcher. More... | |
Private Types | |
using | PortIdxMap = std::map< ModelPort, size_t > |
Private Member Functions | |
PortIdxMap | buildPortIndex () |
Private Attributes | |
DummyPlaybackSetup | dummySetup_ |
MockSegmentation | mockSeg_ |
const PortIdxMap | portIdx_ |
|
inlineoverridevirtual |
translate a generic ModelPort spec into the specific index number applicable at the Timeline referred-to by this Dispatcher
error::Logic | if the given ModelPort is not associated |
Implements Dispatcher.
Definition at line 345 of file mock-dispatcher.hpp.
References steam::mobject::session::query::anonymous_namespace{fake-configrules.cpp}::entry().
Referenced by JobPlanning_test::calculateDeadline(), DispatcherInterface_test::resolveModelPort(), JobPlanning_test::simpleUsage(), and MockSupport_test::verify_MockDispatcherSetup().
Core Dispatcher operation: locate the appropriate Segment and retrieve/derive a »blueprint« for render job generation.
portIDX | index-number for a ModelPort as resolved |
nominalTime | time of the frame to calculate, relative to Timeline origin |
Implements Dispatcher.
Definition at line 356 of file mock-dispatcher.hpp.
Referenced by JobPlanning_test::calculateDeadline(), and JobPlanning_test::simpleUsage().
|
inline |
The faked builder/playback setup provides some preconfigured ModelPort and corresponding DataSink handles.
These are stored into a dummy registry and only available during the lifetime of the DummyPlaybackSetup instance.
index | number of the distinct port / connection |
std::pair<ModelPort,DataSink>
Definition at line 398 of file mock-dispatcher.hpp.
Referenced by JobPlanningPipeline_test::accessTopLevelJobTicket(), JobPlanning_test::calculateDeadline(), DispatcherInterface_test::resolveModelPort(), JobPlanning_test::simpleUsage(), and MockSupport_test::verify_MockDispatcherSetup().