diff --git a/src/steam/engine/buffer-metadata.hpp b/src/steam/engine/buffer-metadata.hpp index 03490f992..33d331a51 100644 --- a/src/steam/engine/buffer-metadata.hpp +++ b/src/steam/engine/buffer-metadata.hpp @@ -58,7 +58,7 @@ #include "lib/hash-value.h" #include "lib/util-foreach.hpp" #include "include/logging.h" -#include "steam/streamtype.hpp" +#include "steam/engine/buffhandle.hpp" #include "steam/engine/type-handler.hpp" #include "steam/engine/buffer-local-tag.hpp" #include "lib/nocopy.hpp" @@ -76,8 +76,6 @@ namespace engine { namespace error = lumiera::error; namespace metadata { - using Buff = StreamType::ImplFacade::DataBuffer; - class Key; class Entry; } @@ -636,7 +634,7 @@ namespace engine { * @note might create/register a new Entry as a side-effect */ Key const& - key (Key const& parentKey, metadata::Buff* concreteBuffer, LocalTag const& specifics =LocalTag::UNKNOWN) + key (Key const& parentKey, Buff* concreteBuffer, LocalTag const& specifics =LocalTag::UNKNOWN) { Key derivedKey = Key::forEntry (parentKey, concreteBuffer, specifics); Entry* existing = table_.fetch (derivedKey); @@ -671,7 +669,7 @@ namespace engine { */ Entry& lock (Key const& parentKey - ,metadata::Buff* concreteBuffer + ,Buff* concreteBuffer ,LocalTag const& specifics =LocalTag::UNKNOWN ,bool onlyNew =false) { @@ -751,7 +749,7 @@ namespace engine { * created, but is marked as FREE */ Entry& - markLocked (Key const& parentKey, metadata::Buff* buffer, LocalTag const& specifics =LocalTag::UNKNOWN) + markLocked (Key const& parentKey, Buff* buffer, LocalTag const& specifics =LocalTag::UNKNOWN) { if (!buffer) throw error::Fatal{"Attempt to lock for a NULL buffer. Allocation floundered?" diff --git a/src/steam/engine/buffer-provider-setup.hpp b/src/steam/engine/buffer-provider-setup.hpp index 87fc0aab8..1edd6121e 100644 --- a/src/steam/engine/buffer-provider-setup.hpp +++ b/src/steam/engine/buffer-provider-setup.hpp @@ -26,7 +26,6 @@ #include "lib/symbol.hpp" #include "lib/hash-value.h" #include "steam/engine/buffer-provider.hpp" -//#include "steam/engine/engine-ctx.hpp" #include "lib/nocopy.hpp" #include diff --git a/src/steam/engine/buffer-provider.hpp b/src/steam/engine/buffer-provider.hpp index f6e8a9cc4..fef81cdeb 100644 --- a/src/steam/engine/buffer-provider.hpp +++ b/src/steam/engine/buffer-provider.hpp @@ -191,8 +191,6 @@ namespace engine { BuffDescr buildDescriptor (HashVal); bool was_created_by_this_provider (BuffDescr const&) const; - using Buff = StreamType::ImplFacade::DataBuffer; ///< marker type for an actual data buffer - class BufferStage : util::NonCopyable diff --git a/src/steam/engine/buffhandle.hpp b/src/steam/engine/buffhandle.hpp index 784941408..da5524804 100644 --- a/src/steam/engine/buffhandle.hpp +++ b/src/steam/engine/buffhandle.hpp @@ -51,7 +51,6 @@ #include "lib/error.hpp" #include "lib/hash-value.h" -#include "steam/streamtype.hpp" namespace steam { @@ -63,6 +62,13 @@ namespace engine { class BuffHandle; class BufferProvider; + /** + * Placeholder type for the contents of a data buffer. + * @remark The actual buffer will always be provided by a library implementation; + * throughout the engine, this implementation type is represented as BuffDescr. + * A `Buff*` represents the fact that there is a memory block managed by some library. + */ + struct Buff { }; /** @@ -110,8 +116,6 @@ namespace engine { */ class BuffHandle { - using Buff = StreamType::ImplFacade::DataBuffer; ///< marker type for an actual data buffer - BuffDescr descriptor_; Buff* pBuffer_; diff --git a/src/steam/engine/diagnostic-buffer-provider.hpp b/src/steam/engine/diagnostic-buffer-provider.hpp index 11ef0bea2..fd1c64a1a 100644 --- a/src/steam/engine/diagnostic-buffer-provider.hpp +++ b/src/steam/engine/diagnostic-buffer-provider.hpp @@ -35,11 +35,8 @@ namespace steam { namespace engine { - namespace error = lumiera::error; - using Buff = StreamType::ImplFacade::DataBuffer; ///////////TODO consider to define that marker type at some suitable central location - class HeapMemBufferStore; //////////////////////////////OOO fällt dann weg nach dem Umbau class BufferDiagnostic; diff --git a/src/steam/engine/heap-mem-buffer-store.cpp b/src/steam/engine/heap-mem-buffer-store.cpp index 06684ed59..ec704d4db 100644 --- a/src/steam/engine/heap-mem-buffer-store.cpp +++ b/src/steam/engine/heap-mem-buffer-store.cpp @@ -35,10 +35,8 @@ using lib::ScopedPtrVect; namespace steam { namespace engine { - namespace error = lumiera::error; - using Buff = StreamType::ImplFacade::DataBuffer; /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET 1410 : need to question what implementation structures are needed, after »tracking« was extracted... diff --git a/src/steam/engine/proc-node.hpp b/src/steam/engine/proc-node.hpp index 5f09ba990..c14a57290 100644 --- a/src/steam/engine/proc-node.hpp +++ b/src/steam/engine/proc-node.hpp @@ -99,6 +99,7 @@ #include "lib/error.hpp" #include "lib/nocopy.hpp" #include "lib/hash-value.h" +#include "include/limits.hpp" #include "steam/engine/buffhandle.hpp" #include "steam/engine/turnout-system.hpp" #include "lib/format-string.hpp" diff --git a/src/steam/engine/simple-buffer-state-registry.hpp b/src/steam/engine/simple-buffer-state-registry.hpp index 0d606e1cf..203e363c8 100644 --- a/src/steam/engine/simple-buffer-state-registry.hpp +++ b/src/steam/engine/simple-buffer-state-registry.hpp @@ -33,10 +33,8 @@ namespace steam { namespace engine { - namespace error = lumiera::error; - using metadata::Buff; /** diff --git a/src/steam/streamtype.hpp b/src/steam/streamtype.hpp index 719f9e175..3a5133634 100644 --- a/src/steam/streamtype.hpp +++ b/src/steam/streamtype.hpp @@ -28,6 +28,7 @@ #include "lib/symbol.hpp" //#include "vessel/query.hpp" #include "lib/idi/entry-id.hpp" +#include "steam/engine/buffhandle.hpp" @@ -104,12 +105,11 @@ namespace steam { class TypeTag ; /** - * placeholder type for the contents of a data buffer. - * The actual buffer will always be provided by a - * library implementation; throughout the engine, - * it's just hidden behind a DataBuffer pointer. + * placeholder marker for the contents of a data buffer. + * The actual buffer will always be provided by a library implementation; + * Access is coordinated by a BufferProvider. */ - struct DataBuffer { }; + using DataBuffer = steam::engine::Buff; virtual bool operator== (ImplFacade const& other) const =0; diff --git a/tests/steam/engine/buffer-metadata-test.cpp b/tests/steam/engine/buffer-metadata-test.cpp index b1213e71e..5d8d1a87b 100644 --- a/tests/steam/engine/buffer-metadata-test.cpp +++ b/tests/steam/engine/buffer-metadata-test.cpp @@ -20,6 +20,7 @@ #include "test/run.hpp" #include "test/test-frame.hpp" #include "test/test-helper.hpp" +#include "steam/engine/buffhandle.hpp" #include "steam/engine/buffer-metadata.hpp" #include "lib/util.hpp" @@ -55,10 +56,10 @@ namespace test { } template - metadata::Buff* + Buff* mark_as_Buffer(X& something) { - return reinterpret_cast (std::addressof(something)); + return reinterpret_cast (std::addressof(something)); } diff --git a/tests/steam/engine/node-link-test.cpp b/tests/steam/engine/node-link-test.cpp index 7cc90a17e..99fa5e7de 100644 --- a/tests/steam/engine/node-link-test.cpp +++ b/tests/steam/engine/node-link-test.cpp @@ -25,6 +25,7 @@ #include "steam/asset/meta/time-grid.hpp" #include "lib/time/timequant.hpp" #include "lib/time/timecode.hpp" +#include "lib/symbol.hpp" #include "lib/util.hpp" #include @@ -34,6 +35,7 @@ using lib::time::Time; using lib::time::QuTime; using lib::time::FrameNr; using lib::time::FrameCnt; +using lib::Symbol; using util::isnil; using util::isSameObject; using test::TestFrame;