Lumiera  0.pre.03
»edit your freedom«
dummy-play-connection.hpp
Go to the documentation of this file.
1 /*
2  DUMMY-PLAY-CONNECTION.hpp - simplified test setup for playback
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 
77 #ifndef STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
78 #define STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
79 
80 
83 #include "lib/time/timequant.hpp"
84 
85 #include "lib/iter-source.hpp"
86 #include "lib/nocopy.hpp"
87 #include "lib/util.hpp"
88 
89 #include <vector>
90 
91 
92 namespace steam{
93 namespace play {
94 namespace test {
95 
96 // using std::string;
97  using lib::time::Duration;
98 
99 
100 
103  {
104 
105  };
106 
107 
108  /****************************************************************/
119  template<class DEF>
122  {
123  SimulatedBuilderContext mockBuilder_;
124 
125  public:
126 
127  ModelPorts
128  getAllModelPorts()
129  {
130  return mockBuilder_.getAllModelPorts();
131  }
132 
133  DummyOutputLink
134  getModelPort (uint index)
135  {
136  return mockBuilder_.getModelPort (index);
137  }
138 
143  bool
145  {
146  uint i{0};
147  for (auto it=getAllModelPorts(); bool{it}; ++it, ++i)
148  if (port == *it)
149  {
150  auto [refPort, refSink] = getModelPort(i);
151  if (refSink == sink)
152  return true;
153  }
154  return false;
155  }
156 
158  provide_testOutputSlot()
159  {
160  UNIMPLEMENTED ("provide a suitable output sink simulation");
161  }
162 
163 
164  /* === Test Support API === */
165 
166  bool
167  isWired()
168  {
169  UNIMPLEMENTED ("is this dummy in activated state?");
170  }
171 
172  Duration
173  getPlannedTestDuration()
174  {
175  UNIMPLEMENTED ("manage the a planned test duration");
176  }
177 
182  void
184  {
185  UNIMPLEMENTED ("do a blocking wait, while an output test is performed in other threads");
186  }
187 
188  bool
189  gotCorrectOutput()
190  {
191  UNIMPLEMENTED ("verify proper operation by inspecting the provided test dummy components");
192  }
193  };
194 
195 
196 
197 
198 }}} // namespace steam::play::test
199 #endif /*STEAM_PLAY_DUMMY_PLAY_CONNECTION_H*/
Simulated result of a builder run for test purposes, without actual session and model content...
Framework for dummy playback and rendering.
Definition: run.hpp:49
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
denotes an opened connection ready to receive media data for output.
Steam-Layer implementation namespace root.
void waitUntilDue()
test helper: blocking wait during an output test.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
helper for dummy render engine: Simulate the result of a build process, without actually running the ...
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Handle designating a point within the model, where actually output data can be pulled.
Definition: model-port.hpp:104
Support library to represent grid-aligned time specifications This is part of Lumiera&#39;s time and time...
A global service to handle all external output connections.
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:477
bool isSupported(ModelPort port, DataSink sink)
search through all port <-> sink connections supported by this DummyPlayConnection ...
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.