diff --git a/src/steam/engine/job-ticket.cpp b/src/steam/engine/job-ticket.cpp index 3856b585c..759a0f1cd 100644 --- a/src/steam/engine/job-ticket.cpp +++ b/src/steam/engine/job-ticket.cpp @@ -94,11 +94,15 @@ using vault::engine::JobClosure; }; + /** special »do nothing« JobTicket marker */ + const JobTicket JobTicket::NOP{}; //////////////////////////////////////////////////////////////TICKET #725 : do we actually need that for the final data structure? + /** */ Job JobTicket::createJobFor (FrameCoord coordinates) { + REQUIRE (this->isValid(), "Attempt to generate render job for incomplete or unspecified render plan."); UNIMPLEMENTED ("job planning and generation"); } diff --git a/src/steam/engine/job-ticket.hpp b/src/steam/engine/job-ticket.hpp index e3dd84cee..8abff5265 100644 --- a/src/steam/engine/job-ticket.hpp +++ b/src/steam/engine/job-ticket.hpp @@ -122,6 +122,9 @@ using util::isnil; template static LinkedElements buildProvisionSpec (IT); + private: + JobTicket() { } ///< @internal as NIL marker, a JobTicket can be empty + protected: template JobTicket(IT featureSpec_perChannel) @@ -132,6 +135,7 @@ using util::isnil; class ExplorationState; friend class ExplorationState; + static const JobTicket NOP; @@ -312,9 +316,10 @@ using util::isnil; inline JobTicket::ExplorationState JobTicket::discoverPrerequisites (uint channelNr) const { - REQUIRE (channelNr < provision_.size()); + REQUIRE (channelNr < provision_.size() or not isValid()); - return ExplorationState (provision_[channelNr].requirements); + return isnil (provision_)? ExplorationState() + : ExplorationState (provision_[channelNr].requirements); } diff --git a/src/steam/fixture/fixture.cpp b/src/steam/fixture/fixture.cpp index 78373f297..32870c363 100644 --- a/src/steam/fixture/fixture.cpp +++ b/src/steam/fixture/fixture.cpp @@ -36,13 +36,6 @@ namespace fixture { - list & - Fixture::getPlaylistForRender () - { - UNIMPLEMENTED ("get Playlist For Render"); - } - - /** TODO: a placeholder for the Operation needed for * wiring the Automation providers in the Build process */ diff --git a/src/steam/fixture/fixture.hpp b/src/steam/fixture/fixture.hpp index 4f6aa69c5..43142f9c4 100644 --- a/src/steam/fixture/fixture.hpp +++ b/src/steam/fixture/fixture.hpp @@ -84,7 +84,6 @@ namespace fixture { ///////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #573 who creates the fixture? public: - list & getPlaylistForRender () ; Auto* getAutomation () ; ///< @todo: just a placeholder at the moment!!! bool isValid() const; diff --git a/src/steam/fixture/segment.hpp b/src/steam/fixture/segment.hpp index 4e3e3d200..4312802ea 100644 --- a/src/steam/fixture/segment.hpp +++ b/src/steam/fixture/segment.hpp @@ -35,6 +35,7 @@ #include "steam/common.hpp" #include "steam/mobject/explicitplacement.hpp" +#include "steam/engine/job-ticket.hpp" #include "lib/time/timevalue.hpp" using std::list; @@ -44,6 +45,7 @@ namespace fixture { using mobject::ExplicitPlacement; using lib::time::TimeSpan; + using lib::time::Time; /** * For the purpose of building and rendering, the fixture (for each timeline) @@ -63,6 +65,9 @@ namespace fixture { /** begin of this timeline segment. */ TimeSpan span_; + /** render plan / blueprint to use for this segment */ + const engine::JobTicket* jobTicket_; + ///////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #725 : placeholder code /** relevant MObjects comprising this segment. */ list elements; @@ -72,9 +77,20 @@ namespace fixture { public: Segment (TimeSpan covered =TimeSpan::ALL) : span_{covered} + , jobTicket_{&engine::JobTicket::NOP} { } // default copy acceptable + + Time start() const { return span_.start(); } + Time end() const { return span_.end(); } + + engine::JobTicket const& + jobTicket() const + { + REQUIRE (jobTicket_); + return *jobTicket_; + } }; diff --git a/src/steam/fixture/segmentation.hpp b/src/steam/fixture/segmentation.hpp index 601f7d704..be83575e0 100644 --- a/src/steam/fixture/segmentation.hpp +++ b/src/steam/fixture/segmentation.hpp @@ -48,16 +48,21 @@ #include "steam/fixture/segment.hpp" +#include "lib/time/timevalue.hpp" +#include "lib/format-string.hpp" #include "lib/nocopy.hpp" #include -using std::list; - namespace steam { namespace fixture { + namespace error = lumiera::error; + + using std::list; + using lib::time::TimeValue; + using util::_Fmt; /** * For the purpose of building and rendering, the fixture (for each timeline) @@ -95,6 +100,14 @@ namespace fixture { return segments_.size(); } + Segment const& + operator[] (TimeValue time) const + { + for (auto& seg : segments_) + if (seg.end() > time) + return seg; + throw error::State (_Fmt{"Fixture datastructure corrupted: Time %s not covered"} % time); + } }; diff --git a/tests/core/steam/engine/dispatcher-interface-test.cpp b/tests/core/steam/engine/dispatcher-interface-test.cpp index 926a99000..5c35ee910 100644 --- a/tests/core/steam/engine/dispatcher-interface-test.cpp +++ b/tests/core/steam/engine/dispatcher-interface-test.cpp @@ -74,6 +74,7 @@ namespace test { using DummyPlaybackSetup = play::test::DummyPlayConnection; + /////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1274 replace by MockDispatcher !!!! class MockDispatcherTable : public Dispatcher { @@ -112,6 +113,7 @@ namespace test { }; lib::Depend mockDispatcher; + /////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1274 replace by MockDispatcher !!!! #if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880 #endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #890 diff --git a/tests/core/steam/engine/mock-dispatcher.hpp b/tests/core/steam/engine/mock-dispatcher.hpp index ebdd4849e..bc29e97a9 100644 --- a/tests/core/steam/engine/mock-dispatcher.hpp +++ b/tests/core/steam/engine/mock-dispatcher.hpp @@ -182,7 +182,8 @@ namespace test { public: MockSegmentation() - : tickets_{} + : Segmentation{} + , tickets_{} { } MockSegmentation (std::initializer_list specs) diff --git a/tests/core/steam/engine/mock-support-test.cpp b/tests/core/steam/engine/mock-support-test.cpp index 0d2acd358..4ca74826a 100644 --- a/tests/core/steam/engine/mock-support-test.cpp +++ b/tests/core/steam/engine/mock-support-test.cpp @@ -29,6 +29,7 @@ #include "lib/error.hpp" #include "steam/engine/mock-dispatcher.hpp" #include "vault/engine/dummy-job.hpp" +#include "lib/util.hpp" #include "lib/format-cout.hpp"///////////////////////TODO @@ -126,6 +127,9 @@ namespace test { { MockSegmentation mockSeg; CHECK (1 == mockSeg.size()); + Time arbitraryTime = lib::test::randTime(); + JobTicket const& ticket = mockSeg[arbitraryTime].jobTicket(); + CHECK (util::isSameObject (ticket, JobTicket::NOP)); TODO ("cover details of MockSegmentation"); } }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 023bfc325..8c442033f 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -69867,6 +69867,9 @@ + + + @@ -69923,6 +69926,12 @@ + + + + + + @@ -70220,6 +70229,34 @@ + + + + + + + + + + + + + +

+ weil Segment inhärent ein mutabler Typ ist (ich denke an das Umbauen und Modifizieren), gibt der reine Access nur ein Segment const& raus +

+ +
+
+ + + + + + + + +
@@ -70307,6 +70344,18 @@
+ + + + + + + + + + + +