BufferProvider: clean-up types

Now able to remove some obsoleted part of the old implementation.

The existing implementation of the ''Buffer Provider Protocol'' is
quite old and dated meanwhile; it was more like an explorative prototype
and mixed up implementation and test code.

At that time, notably the assumption was that the core render engine
will be implemented in plain-C and will push around `void*` all over the place.
The `BufferProvider` was meant as an adaptor, while questions of typing
were added as an afterthought. Especially some functionality to use
the `BuffHandle` in the way of a smart-ptr are completely obsoleted
by the reworked design of the Render Engine (2024).
This commit is contained in:
Fischlurch 2026-02-13 21:27:45 +01:00
parent c3ebade5d2
commit 70e32a3e66
18 changed files with 219 additions and 600 deletions

View file

@ -231,15 +231,6 @@ namespace engine {
return newKey;
}
void
useTypeHandlerFrom (Key const& ref)
{
if (nontrivial(this->instanceFunc_))
throw error::Logic ("unable to supersede an already attached TypeHandler"
, LERR_(LIFECYCLE));
instanceFunc_ = ref.instanceFunc_;
}
LocalTag const& localTag() const { return specifics_;}
size_t storageSize() const { return storageSize_; }

View file

@ -188,32 +188,6 @@ namespace engine {
ERROR_LOG_AND_IGNORE (engine, "releasing a buffer from BufferProvider")
/** @warning this operation locally modifies the metadata entry of a single buffer
* to attach a TypeHandler taking ownership of an object embedded within the buffer.
* The client is responsible for actually placement-constructing the object; moreover
* the client is responsible for any damage done to already existing buffer content.
* @note the buffer must be in locked state and the underlying buffer type must not define
* an non-trivial TypeDescriptor, because there is no clean way of superseding an
* existing TypeDescriptor, which basically is just a functor and possibly
* could perform any operation on buffer clean-up.
* @note EX_STRONG
*/
void
BufferProvider::attachTypeHandler (BuffHandle const& target, BuffDescr const& reference)
{
metadata::Entry& metaEntry = bufferStage_->get (target.entryID());
metadata::Entry& refEntry = bufferStage_->get (reference);
REQUIRE (refEntry.isTypeKey());
REQUIRE (!metaEntry.isTypeKey());
if (!metaEntry.isLocked())
throw error::Logic{"unable to attach an object because buffer isn't locked for use"
, LERR_(LIFECYCLE)};
metaEntry.useTypeHandlerFrom (refEntry); // EX_STRONG
}
/** @internal abort normal lifecycle, reset the underlying buffer and detach from it.
* This allows to break out of normal usage and reset the handle to _invalid state_
* @param invokeDtor if possibly the clean-up function of an TypeHandler registered with
@ -308,30 +282,5 @@ namespace engine {
}
/** Install a standard TypeHandler for an already locked buffer.
* This causes the dtor function to be invoked when releasing this buffer.
* The assumption is that client code will placement-construct an object
* into this buffer right away, and thus we're taking ownership on that object.
* @param type a reference BuffDescr defining an embedded TypeHandler to use
* A copy of this TypeHandler will be stored into the local metadata for
* this buffer only, not altering the basic buffer type in any way
* @throw lifecycle error when attempting to treat an buffer not in locked state
* @throw error::Logic in case of insufficient buffer space to hold the
* intended target object
* @note EX_STRONG
*/
void
BuffHandle::takeOwnershipFor(BuffDescr const& type)
{
if (!this->isValid())
throw error::Logic ("attaching an object requires an buffer in locked state", LERR_(LIFECYCLE));
if (this->size() < type.determineBufferSize())
throw error::Logic ("insufficient buffer size to hold an instance of that type");
descriptor_.provider_->attachTypeHandler(*this, type); // EX_STRONG
}
}} // namespace engine

View file

@ -104,7 +104,6 @@
#include "lib/symbol.hpp"
#include "lib/hash-value.h"
#include "steam/engine/buffhandle.hpp"
//#include "steam/engine/engine-ctx.hpp"
#include "steam/engine/type-handler.hpp"
#include "steam/engine/buffer-local-tag.hpp"
#include "steam/engine/buffer-metadata.hpp" /////////////////////////OOO must be removed from here
@ -160,9 +159,6 @@ namespace engine {
template<typename BU, typename...ARGS>
BuffHandle lockBufferFor (ARGS ...args);
/** allow for attaching and owing an object within an already created buffer */
void attachTypeHandler (BuffHandle const& target, BuffDescr const& reference);
void emergencyCleanup (BuffHandle const& target, bool invokeDtor =false);

View file

@ -1,125 +0,0 @@
/*
BUFFHANDLE-ATTACH.hpp - Buffer handle extension to attach objects into the buffer
Copyright (C)
2008, Hermann Vosseler <Ichthyostega@web.de>
  **Lumiera** is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version. See the file COPYING for further details.
*/
/** @file buffhandle-attach.hpp
** Extension to allow placing objects right into the buffers, taking ownership.
** This extension is mostly helpful for writing unit-tests, and beyond that for the
** rather unusual case where we need to place an full-blown object into the buffer,
** instead of just plain data. A possible use case for this mechanism is to allow for
** state per calculation stream, feeding this local state to the individual render node
** embedded into a "state frame". Some effect processors indeed need to maintain state
** beyond the single frame (e.g. averaging, integrating, sound compression), which usually
** is handled by applying an "instance" of that processor to the frames to be calculated
** in a straight sequence.
**
** BuffHandle and the underlying BufferProvider standard implementation support that case
** by attaching an object managing functor to the metadata. This way, the state can live
** directly embedded into the frame and still be accessed like an object. To keep the
** header and compilation footprint low, the implementation of the functions supporting
** this special case was split out of the basic buffhandle.hpp
**
** @deprecated 2026-01 this extension-API does not fit into the overall concept.
** It was created under the impression that the Render Engine will work "with void pointers"
** Meanwhile, the BuffHandle::accessAs<TY>() turned into a core-API now;
** all the other functionality was never used and is considered pointless //////////////////////TICKET 1410 : remove unnecessary API
** @see BuffHandle
** @see BufferProviderProtocol_test usage demonstration
*/
#ifndef ENGINE_BUFFHANDLE_ATTACH_H
#define ENGINE_BUFFHANDLE_ATTACH_H
#include "lib/error.hpp"
#include "steam/engine/buffer-provider.hpp"
#include "steam/engine/buffhandle.hpp"
namespace steam {
namespace engine {
/* === BuffHandle Implementation === */
#define _EXCEPTION_SAFE_INVOKE(_CTOR_) \
try \
{ \
return *new(pBuffer_) _CTOR_; \
} \
catch(...) \
{ \
emergencyCleanup(); /* EX_FREE */ \
pBuffer_ = 0; \
throw; \
}
/** convenience shortcut: place and maintain an object within the buffer.
* This operation performs the necessary steps to attach an object;
* if the buffer isn't locked yet, it will do so. Moreover, the created
* object will be owned by the buffer management facilities, i.e. the
* destructor is registered as cleanup function.
* @throw error::Logic in case there is already another TypeHandler registered
* in charge of managing the buffer contents, or when the object to create
* would not fit into this buffer.
*/
// template<typename BU>
// inline BU&
// BuffHandle::create()
// {
// takeOwnershipFor<BU>();
// _EXCEPTION_SAFE_INVOKE (BU());
// }
#undef _EXCEPTION_SAFE_INVOKE
/** @internal helper to attach an TypeHandler after-the fact.
* @note this prepares the buffer for placement-creating an embedded object.
* It doesn't actually create an object
* @throw error::Logic in case there is already another TypeHandler registered
* in charge of managing the buffer contents, or when the object to create
* would not fit into this buffer.
*/
// template<typename BU>
// inline void
// BuffHandle::takeOwnershipFor()
// {
// BuffDescr howto_attach_object_automatically
// = descriptor_.provider_->getDescriptor<BU>();
// takeOwnershipFor (howto_attach_object_automatically); // EX_STRONG
// }
/** convenience shortcut: access the buffer contents casted to a specific type.
* @warning this is a \em blind cast, there is no type safety.
* @note clients can utilise the metadata::LocalTag to keep track of some
* specific property of the buffer, like e.g. the type of object.
*/
template<typename BU>
inline BU&
BuffHandle::accessAs()
{
if (!pBuffer_)
throw error::Logic ("buffer not (yet) locked for access by clients"
, LERR_(LIFECYCLE));
return *reinterpret_cast<BU*> (pBuffer_);
}
}} // namespace steam::engine
#endif

View file

@ -41,7 +41,7 @@
** @see BufferProvider
** @see BufferProviderProtocol_test usage demonstration
** @see OutputSlot
** @see bufftable.hpp storage for the buffer table /////////////////////OOO where to point into the new structure for documentation?
** @see heap-mem-buffer-store.hpp demo implementation of storage backend
** @see engine::RenderInvocation
*/
@ -170,14 +170,44 @@ namespace engine {
}
private:
template<typename BU>
void takeOwnershipFor();
void takeOwnershipFor(BuffDescr const& type);
void emergencyCleanup();
};
/**
* Access the memory in the buffer by overlaying a specific type.
* @warning this is a **blind cast**, there is _no type safety_.
* @remark In the common usage pattern, a client has created a BuffDescr
* with suitable typing; it is assumed thus that the call context
* of the client ensures a a seamless link of type information
* at compile time (it's the clients responsibility to ensure that).
* Two flavours of this usage are conceivable:
* - the client [creates a descriptor](\ref BufferProvider::getDescriptorFor(size_t))
* that only reserves raw storage of sufficient size, e.g. `sizeof(TY)`. When
* accessing the raw storage subsequently through this accessor function,
* the effect is to have a _virtual overlay_ — without actually creating
* a new instance of the type within the storage.
* - the client also [registers a constructor functor](\ref BufferProvider::getDescriptor),
* which implies that a new instance of the target type is constructed into the buffer
* at the moment when the buffer is locked (and is destroyed on `release()`). This
* allows to setup elaborate structures, possibly even with a _back link_, by binding
* additional constructor arguments into the TypeHandler.
* @note while clients can not access the internal type metadata, the _implementation_
* of BufferProvider can use the HashVal to access the type registry, and can even
* attach additional information as metadata::LocalTag to keep track of some
* specific property of the buffer, like e.g. the type of object.
*/
template<typename BU>
inline BU&
BuffHandle::accessAs()
{
if (!pBuffer_)
throw error::Logic ("buffer not (yet) locked for access by clients"
, LERR_(LIFECYCLE));
return *reinterpret_cast<BU*> (pBuffer_);
}
}} // namespace steam::engine

View file

@ -1,158 +0,0 @@
/*
BUFFTABLE.hpp - Table of buffer pointers to be used by the render nodes
Copyright (C)
2008, Hermann Vosseler <Ichthyostega@web.de>
  **Lumiera** is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version. See the file COPYING for further details.
*/
/** @file bufftable.hpp
** helper for organisation of render data buffers
** Used during the process of _"pulling"_ a render node, which recursively might
** pull further nodes. Any node has a _render calculation function,_ which in turn
** needs input and output buffers
** @see buffer-provider.hpp
*/
#ifndef ENGINE_BUFFHTABLE_H
#define ENGINE_BUFFHTABLE_H
#include "lib/error.hpp"
#include "steam/engine/buffhandle.hpp"
#include "steam/engine/proc-node.hpp"
#include "lib/iter-adapter.hpp"
#include <vector>
#include <utility>
namespace steam {
namespace engine {
using std::pair;
using std::vector;
/**
* Tables of buffer handles and corresponding dereferenced buffer pointers.
* Used within the invocation of a processing node to calculate data.
* The tables are further differentiated into input data buffers and output
* data buffers. The tables are supposed to be implemented as bare "C" arrays,
* thus the array of real buffer pointers can be fed directly to the
* processing function of the respective node.
*
* @todo this whole design is a first attempt and rather clumsy. It should be reworked
* to use a single contiguous memory area and just layer the object structure on top
* (by using placement new). Yet the idea of an stack-like organisation should be retained
*/
struct BuffTable
{
using PHa = BuffHandle *;
using PBu = BuffHandle::PBuff *;
struct StorageChunk
{ };
template<uint count>
struct Storage
{
enum{size = count * sizeof(StorageChunk)};
};
class Builder
{
public:
Builder& announce (uint count, BuffDescr const& type);
BuffTable& build();
};
static Builder& prepare (const size_t STORAGE_SIZE, void* storage);
void lockBuffers();
void releaseBuffers();
using BuffHandleTable = vector<BuffHandle>;
using iterator = lib::RangeIter<BuffHandleTable::iterator>;
iterator buffers();
iterator inBuffers();
iterator outBuffers();
};
/* === Implementation === */
inline BuffTable::Builder&
BuffTable::prepare (const size_t STORAGE_SIZE, void* storage)
{
UNIMPLEMENTED ("expose a builder object for outfitting a buffer pointer table");
}
inline BuffTable::Builder&
BuffTable::Builder::announce (uint count, BuffDescr const& type)
{
UNIMPLEMENTED ("accept announcement of additional buffer table entries required");
}
inline BuffTable&
BuffTable::Builder::build()
{
UNIMPLEMENTED ("finally drop off the newly configured buffer pointer table");
}
inline void
BuffTable::lockBuffers()
{
UNIMPLEMENTED ("convenience shortcut: lock all preconfigured buffers within this table through the underlying buffer provider");
}
inline void
BuffTable::releaseBuffers()
{
UNIMPLEMENTED ("convenience shortcut: release all the buffers managed through this buffer table, by forwarding to the underlying buffer provider");
}
inline BuffTable::iterator
BuffTable::buffers()
{
UNIMPLEMENTED ("expose an iterator to yield all prepared buffers within this buffer table");
}
inline BuffTable::iterator
BuffTable::inBuffers()
{
UNIMPLEMENTED ("expose an iterator to access all the input buffer slots of this buffer table");
}
inline BuffTable::iterator
BuffTable::outBuffers()
{
UNIMPLEMENTED ("expose an iterator to access all the output buffer slots of this buffer table");
}
}} // namespace steam::engine
#endif

View file

@ -102,7 +102,7 @@ namespace engine {
DiagnosticBufferProvider::DiagnosticBufferProvider()
: NaiveBufferSetup{}
, heapStore_{dynamic_cast<HeapMemProvider&> (*bufferStore_)}
, heapStore_{dynamic_cast<HeapMemBufferStore&> (*bufferStore_)} //////////////////////////////////////////TICKET 1410 : obsolete after switch to newtracking-API
, tracker_{std::make_unique<BlockTracker>()}
{ }

View file

@ -37,7 +37,7 @@ namespace engine {
namespace error = lumiera::error;
class HeapMemProvider; //////////////////////////////OOO fällt dann weg nach dem Umbau
class HeapMemBufferStore; //////////////////////////////OOO fällt dann weg nach dem Umbau
class BufferDiagnostic;
namespace diagn {// state descriptors for diagnostics....
@ -84,7 +84,7 @@ namespace engine {
class DiagnosticBufferProvider
: public NaiveBufferSetup
{
HeapMemProvider& heapStore_; //////////////////////////////OOO fällt dann weg nach dem Umbau
HeapMemBufferStore& heapStore_; //////////////////////////////OOO fällt dann weg nach dem Umbau
struct BlockTracker;
std::unique_ptr<BlockTracker> tracker_;

View file

@ -43,11 +43,13 @@ namespace engine {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET 1410 : need to question what implementation structures are needed, after »tracking« was extracted...
/**
* Helper for implementing a diagnostic BufferProvider:
* A block of heap allocated storage, with the capability
* to store some additional tracking information.
* Simplistic implementation of buffer storage.
* Allocates a block of heap memory for buffers and never deallocates.
* This strange behaviour can be used to investigate and demonstrate
* buffer usage from a unit test setup.
* @see DiagnosticBufferProvider
*/
class HeapMemProvider::Block
class HeapMemBufferStore::Block
: util::NonCopyable
{
unique_ptr<char[]> storage_;
@ -95,7 +97,7 @@ namespace engine {
}
using Block = HeapMemProvider::Block;
using Block = HeapMemBufferStore::Block;
/** helper to find Block entries
* based on their raw memory address */
@ -131,7 +133,7 @@ namespace engine {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET 1410 : need to question what implementation structures are needed, after »tracking« was extracted...
using PoolBlocks = ScopedPtrVect<HeapMemProvider::Block>;
using PoolBlocks = ScopedPtrVect<HeapMemBufferStore::Block>;
/**
* @internal Pool of allocated buffer Blocks of a specific size.
@ -144,7 +146,7 @@ namespace engine {
* and later gets "emitted" to an output sequence, where it remains for
* later investigation and diagnostics.
*/
class HeapMemProvider::BlockPool
class HeapMemBufferStore::BlockPool
{
uint maxAllocCount_;
size_t memBlockSize_;
@ -269,19 +271,19 @@ namespace engine {
/**
* @internal create a memory tracking BufferProvider,
*/
HeapMemProvider::HeapMemProvider()
HeapMemBufferStore::HeapMemBufferStore()
: pool_(new PoolTable)
, outSeq_()
{ }
HeapMemProvider::~HeapMemProvider() { /* emit dtor of BlockPool here */ }
HeapMemBufferStore::~HeapMemBufferStore() { /* emit dtor of BlockPool here */ }
/* ==== Implementation of the BufferProvider interface ==== */
uint
HeapMemProvider::prepareBuffers (uint numBuffers, size_t buffSiz, HashVal typeID)
HeapMemBufferStore::prepareBuffers (uint numBuffers, size_t buffSiz, HashVal typeID)
{
BlockPool& responsiblePool = getBlockPoolFor (buffSiz, typeID);
return responsiblePool.prepare_for (numBuffers);
@ -289,7 +291,7 @@ namespace engine {
BufferProviderSetup::Store::Slot
HeapMemProvider::provideBuffer (size_t buffSiz, HashVal typeID, LocalTag)
HeapMemBufferStore::provideBuffer (size_t buffSiz, HashVal typeID, LocalTag)
{
BlockPool& blocks = getBlockPoolFor (buffSiz, typeID);
Block& newBlock = blocks.createBlock();
@ -299,7 +301,7 @@ namespace engine {
void
HeapMemProvider::mark_emitted (size_t buffSiz, HashVal typeID, LocalTag const& specifics)
HeapMemBufferStore::mark_emitted (size_t buffSiz, HashVal typeID, LocalTag const& specifics)
{
Block* block4buffer = locateBlock (buffSiz, typeID, specifics);
if (!block4buffer)
@ -320,7 +322,7 @@ namespace engine {
/** mark a buffer as officially discarded */
void
HeapMemProvider::detachBuffer (size_t buffSiz, HashVal typeID, Slot alloc)
HeapMemBufferStore::detachBuffer (size_t buffSiz, HashVal typeID, Slot alloc)
{
auto& [storage, specifics] = alloc;
Block* block4buffer = locateBlock (buffSiz, typeID, specifics);
@ -333,30 +335,32 @@ namespace engine {
/* ==== Implementation details ==== */
#if false ////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : this additional tracking API is obsolete and need to be removed
size_t
HeapMemProvider::emittedCnt() const
HeapMemBufferStore::emittedCnt() const
{
return outSeq_.size();
}
void
HeapMemProvider::markAllEmitted()
HeapMemBufferStore::markAllEmitted()
{
for (auto& [_, blockPool] : *pool_)
blockPool.discard();
}
HeapMemProvider::Block&
HeapMemProvider::access_emitted (uint bufferID)
HeapMemBufferStore::Block&
HeapMemBufferStore::access_emitted (uint bufferID)
{
if (!withinOutputSequence (bufferID))
return emptyPlaceholder; ////////////////////////////////TICKET #856
else
return outSeq_[bufferID];
}
#endif ////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : (End) obsoleted API
bool
HeapMemProvider::withinOutputSequence (uint bufferID) const
HeapMemBufferStore::withinOutputSequence (uint bufferID) const
{
if (bufferID >= MAX_BUFFERS)
throw error::Fatal ("hardwired internal limit for test buffers exceeded");
@ -364,8 +368,8 @@ namespace engine {
return bufferID < outSeq_.size();
}
HeapMemProvider::BlockPool&
HeapMemProvider::getBlockPoolFor (size_t buffSiz, HashVal typeID)
HeapMemBufferStore::BlockPool&
HeapMemBufferStore::getBlockPoolFor (size_t buffSiz, HashVal typeID)
{
BlockPool& pool = (*pool_)[typeID];
if (not pool)
@ -373,8 +377,8 @@ namespace engine {
return pool;
}
HeapMemProvider::Block*
HeapMemProvider::locateBlock (size_t buffSiz, HashVal typeID, void* storage)
HeapMemBufferStore::Block*
HeapMemBufferStore::locateBlock (size_t buffSiz, HashVal typeID, void* storage)
{
BlockPool& pool = getBlockPoolFor (buffSiz, typeID);
Block* block4buffer = pool.find (storage); ////////////////////////////////TICKET #856
@ -384,8 +388,8 @@ namespace engine {
HeapMemProvider::Block*
HeapMemProvider::searchInOutSeqeuence (void* blockLocation)
HeapMemBufferStore::Block*
HeapMemBufferStore::searchInOutSeqeuence (void* blockLocation)
{
return pick_Block_by_storage (outSeq_, blockLocation); ////////////////////////////////TICKET #856
}

View file

@ -49,27 +49,21 @@ namespace engine {
namespace error = lumiera::error;
using std::unique_ptr;
using lib::ScopedPtrVect;
using lib::HashVal;
namespace diagn {
using std::unique_ptr;
}
/**
* simple BufferProvider implementation with additional allocation tracking.
* @internal used as PImpl by DiagnosticBufferProvider and DiagnosticOutputSlot.
*
* This dummy implementation of the BufferProvider interface uses a linearly growing
* table of heap allocated buffer blocks, which will never be discarded, unless the object
* is discarded as a whole. There is an additional testing/diagnostics API to access the
* tracked usage information, even when blocks are already marked as "released".
* Naive demo implementation of the BufferProvider::BufferStore.
* This is kind of a faked implementation of the BufferProvider backend and uses a
* linearly growing table of heap allocated buffer blocks, which will never be discarded,
* unless the object is discarded as a whole. Paired with the instrumentation and diagnostics
* API of DiagnosticBufferProvider, this can be used to confirm assumptions regarding
* buffer usage from a unit test setup. Even blocks already marked as "released"
* are actually retained and can be investigated after the fact.
*/
class HeapMemProvider
class HeapMemBufferStore
: public BufferProviderSetup::Store
{
public: /////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : looks like I'll re-implement the storage from scratch, since »tracking« is no longer required here
@ -89,9 +83,10 @@ namespace engine {
virtual void detachBuffer (size_t,HashVal, Slot alloc) override;
public:
~HeapMemProvider();
HeapMemProvider();
~HeapMemBufferStore();
HeapMemBufferStore();
#if false ////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : this additional tracking API is obsolete and need to be removed
size_t emittedCnt() const;
Block& access_emitted (uint bufferID);
@ -100,6 +95,7 @@ namespace engine {
TY& accessAs (uint bufferID);
void markAllEmitted();
#endif ////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : (End) obsoleted API
private:
bool withinOutputSequence (uint bufferID) const;
@ -110,31 +106,5 @@ namespace engine {
/** convenience shortcut: access the buffer with the given number,
* then try to convert the raw memory to the templated type.
* @throw error::Invalid if the required fame number is beyond
* the number of buffers marked as "emitted"
* @throw error::Fatal if conversion is not possible or the
* conversion path chosen doesn't work (which might
* be due to RTTI indicating an incompatible type).
*/
template<typename TY>
TY&
HeapMemProvider::accessAs (uint bufferID)
{
if (!withinOutputSequence (bufferID))
throw error::Invalid ("Buffer with the given ID not yet emitted");
Block& memoryBlock = access_emitted (bufferID);
NOTREACHED ("TICKET #1410 : tracking implementation -> DiagnosticBufferProvider");
// TY* converted = std::launder (reinterpret_cast<TY*> (memoryBlock.accessMemory())); /////////////////////TICKET 1410 : my assumption is that Block will be implemented differently -- at least not used this way...
// REQUIRE (converted);
// return *converted;
}
}} // namespace steam::engine
#endif /*STEAM_ENGINE_HEAP_MEM_BUFFER_STORE_H*/

View file

@ -18,17 +18,10 @@
** attach additional tracking status flags for each allocated block and validate
** allocator behaviour after the fact.
**
** @todo 1/2026 for sake of implementation clarity, the following instrumentation functionality
** must be relocated into the DiagnosticOutputProvider: Allocated buffers are numbered
** with a simple ascending sequence of integers, used as LocalTag (see BufferMetadata).
** Clients can request a Buffer with the given number, causing that block to be allocated.
** There is a "backdoor", allowing to access any allocated block, even if it is considered
** "released" by the terms of the usual lifecycle. Only when the provider object itself
** gets destroyed, all allocated blocks will be discarded.
**
** @see DiagnosticOutputSlot
** @see DiagnosticBufferProvider
** @see buffer-provider-protocol-test.cpp
** @see render-environment.cpp
*/
#ifndef STEAM_ENGINE_NAIVE_BUFFER_STEUP_H
@ -36,12 +29,9 @@
#include "lib/error.hpp"
#include "lib/hash-value.h"
#include "steam/engine/buffer-provider-setup.hpp"
#include "steam/engine/heap-mem-buffer-store.hpp"
#include "lib/scoped-ptrvect.hpp"
#include <unordered_map>
#include <memory>
@ -50,65 +40,6 @@ namespace engine {
namespace error = lumiera::error;
// using lib::HashVal;
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : disabled code to disentangle BufferProvider implementation
namespace diagn {
using std::unique_ptr;
/**
* Helper for implementing a diagnostic BufferProvider:
* A block of heap allocated storage, with the capability
* to store some additional tracking information.
*/
class Block
: util::NonCopyable
{
unique_ptr<char[]> storage_;
bool was_released_;
public:
explicit
Block(size_t bufferSize)
: storage_(bufferSize? new char[bufferSize] : NULL)
, was_released_(false)
{ }
bool
was_used() const
{
return bool(storage_);
}
bool
was_closed() const
{
return was_released_;
}
void*
accessMemory() const
{
REQUIRE (storage_, "Block was never prepared for use");
return storage_.get();
}
void
markReleased()
{
was_released_ = true;
}
};
class BlockPool;
using PoolTable = std::unordered_map<HashVal,BlockPool>;
}
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : (end) disabled code
/**
* simple BufferProvider implementation with additional allocation tracking.
@ -128,70 +59,9 @@ namespace engine {
{ }
auto buildStage() { return std::make_unique<Stage> ("Naive_HeapAllocated"); }
auto buildStore() { return std::make_unique<HeapMemProvider>(); } /////////////////////////////////TICKET #1410 : turn into a subclass of BufferSetup::Store and push down implementation
auto buildStore() { return std::make_unique<HeapMemBufferStore>(); } /////////////////////////////////TICKET #1410 : turn into a subclass of BufferSetup::Store and push down implementation
};
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : disabled code to disentangle BufferProvider implementation
class HeapMemProvider
: public BufferProvider
{
unique_ptr<diagn::PoolTable> pool_;
ScopedPtrVect<diagn::Block> outSeq_;
public:
/* === BufferProvider interface === */
virtual uint prepareBuffers (uint count, HashVal typeID) override;
virtual BuffHandle provideLockedBuffer (HashVal typeID) override;
virtual void mark_emitted (HashVal, LocalTag const&) override;
virtual void detachBuffer (HashVal, LocalTag const&, Buff&) override;
public:
~HeapMemProvider();
HeapMemProvider();
size_t emittedCnt() const;
diagn::Block& access_emitted (uint bufferID);
template<typename TY>
TY& accessAs (uint bufferID);
void markAllEmitted();
private:
bool withinOutputSequence (uint bufferID) const;
diagn::BlockPool& getBlockPoolFor (HashVal typeID);
diagn::Block* locateBlock (HashVal typeID, void*);
diagn::Block* searchInOutSeqeuence (void* storage);
};
/** convenience shortcut: access the buffer with the given number,
* then try to convert the raw memory to the templated type.
* @throw error::Invalid if the required fame number is beyond
* the number of buffers marked as "emitted"
* @throw error::Fatal if conversion is not possible or the
* conversion path chosen doesn't work (which might
* be due to RTTI indicating an incompatible type).
*/
template<typename TY>
TY&
HeapMemProvider::accessAs (uint bufferID)
{
if (!withinOutputSequence (bufferID))
throw error::Invalid ("Buffer with the given ID not yet emitted");
diagn::Block& memoryBlock = access_emitted (bufferID);
TY* converted = std::launder (reinterpret_cast<TY*> (memoryBlock.accessMemory()));
REQUIRE (converted);
return *converted;
}
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1410 : (end) disabled code
}} // namespace steam::engine
#endif /*STEAM_ENGINE_NAIVE_BUFFER_STEUP_H*/

View file

@ -136,7 +136,6 @@
#include "steam/engine/proc-id.hpp"
#include "steam/engine/engine-ctx.hpp"
#include "steam/engine/buffer-provider.hpp"
#include "steam/engine/buffhandle-attach.hpp" ///////////////////////////////////////////////////////////TICKET 1410 : unnecessary API -- only accessAs<TY>() needs to be retained!
#include "steam/engine/media-weaving-pattern.hpp"
#include "lib/meta/tuple-closure.hpp"
#include "lib/meta/tuple-helper.hpp"

View file

@ -24,8 +24,6 @@
#include "steam/engine/testframe.hpp"
#include "steam/engine/test-rand-ontology.hpp"
#include "steam/engine/diagnostic-buffer-provider.hpp"
#include "steam/engine/buffhandle-attach.hpp" ///////////////////////////////////////////////////////////TICKET 1410 : remove unnecessary API
#include "steam/engine/bufftable.hpp"
using util::isSameObject;
using util::for_each;

View file

@ -19,7 +19,6 @@
#include "lib/error.hpp"
#include "lib/test/run.hpp"
#include "steam/engine/diagnostic-buffer-provider.hpp"
#include "steam/engine/buffhandle-attach.hpp" ///////////////////////////////////////////////////////////TICKET 1410 : remove unnecessary API
#include "steam/engine/testframe.hpp"
#include "lib/test/diagnostic-output.hpp"//////////////////TODO

View file

@ -26,7 +26,7 @@
#include "steam/engine/turnout-system.hpp"
#include "steam/engine/feed-manifold.hpp"
#include "steam/engine/node-builder.hpp"
#include "steam/engine/buffhandle-attach.hpp" ///////////////////////////////////////////////////////////TICKET 1410 : remove unnecessary API
#include "steam/engine/buffhandle.hpp"
#include "lib/test/test-helper.hpp"
#include "lib/util.hpp"

View file

@ -58,7 +58,6 @@ namespace play {
using steam::engine::BuffDescr;
using steam::engine::test::TestFrame;
using steam::engine::NaiveBufferSetup;
namespace diagn = steam::engine::diagn;
//using std::vector;
using std::shared_ptr;

View file

@ -20,7 +20,6 @@
#include "steam/play/diagnostic-output-slot.hpp"
#include "steam/engine/buffhandle.hpp"
#include "steam/engine/buffhandle-attach.hpp" ///////////////////////////////////////////////////////////TICKET 1410 : remove unnecessary API
#include "steam/engine/testframe.hpp"

View file

@ -111706,8 +111706,13 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#435e98" CREATED="1770770350662" ID="ID_1511113078" MODIFIED="1770939247723" TEXT="L&#xf6;sung ist offensichtlich: auseinander-f&#xe4;deln">
<linktarget COLOR="#3a91fe" DESTINATION="ID_1511113078" ENDARROW="Default" ENDINCLINATION="243;15;" ID="Arrow_ID_1668459979" SOURCE="ID_661880079" STARTARROW="None" STARTINCLINATION="820;0;"/>
<icon BUILTIN="yes"/>
<node COLOR="#5b280f" CREATED="1770937517365" ID="ID_255640086" MODIFIED="1770937555910" TEXT="mark_emitted f&#xe4;llt nach Abschlu&#xdf; des Refactorings weg">
<node COLOR="#5b280f" CREATED="1770937517365" ID="ID_255640086" MODIFIED="1770950659803" TEXT="mark_emitted f&#xe4;llt nach Abschlu&#xdf; des Refactorings weg">
<arrowlink COLOR="#e3460e" DESTINATION="ID_705928599" ENDARROW="Default" ENDINCLINATION="2487;-117;" ID="Arrow_ID_1584976619" STARTARROW="None" STARTINCLINATION="1663;76;"/>
<icon BUILTIN="idea"/>
<icon BUILTIN="button_cancel"/>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#d75a0c" CREATED="1770950663478" HGAP="35" ID="ID_1201738190" MODIFIED="1770950700271" TEXT="Nein! vorschneller Schlu&#xdf;" VSHIFT="-1">
<edge COLOR="#fe6022"/>
</node>
</node>
<node COLOR="#435e98" CREATED="1770937567914" ID="ID_936563940" MODIFIED="1770937594750" TEXT="LocalTag dient als zus&#xe4;tzlicher Informationskanal (f&#xfc;r die Implementierung)">
<icon BUILTIN="idea"/>
@ -112282,7 +112287,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
<arrowlink COLOR="#0f67cf" DESTINATION="ID_673584101" ENDARROW="Default" ENDINCLINATION="-174;115;" ID="Arrow_ID_1615598709" STARTARROW="None" STARTINCLINATION="-145;8;"/>
<icon BUILTIN="yes"/>
</node>
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1770838094032" ID="ID_1661720394" MODIFIED="1770838144132" TEXT="&#xbb;finde&#xab; den Header buffhandle-attach.hpp">
<node BACKGROUND_COLOR="#bc9283" COLOR="#6d3d31" CREATED="1770838094032" ID="ID_1661720394" MODIFIED="1771012699683" STYLE="fork" TEXT="&#xbb;finde&#xab; den Header buffhandle-attach.hpp">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112291,12 +112296,12 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</p>
</body>
</html></richcontent>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770838291269" ID="ID_401032103" MODIFIED="1770838323384" TEXT="&#x201e;to attach an TypeHandler after-the fact&#x201c;">
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770838291269" ID="ID_401032103" MODIFIED="1771012699684" TEXT="&#x201e;to attach an TypeHandler after-the fact&#x201c;">
<icon BUILTIN="smiley-oh"/>
<node CREATED="1770838361227" ID="ID_765319520" MODIFIED="1770935898760" TEXT="offensichtlich fand ich das angemessen, 2012">
<node CREATED="1770838361227" ID="ID_765319520" MODIFIED="1771012699684" TEXT="offensichtlich fand ich das angemessen, 2012">
<arrowlink COLOR="#899097" DESTINATION="ID_608985526" ENDARROW="Default" ENDINCLINATION="81;-7;" ID="Arrow_ID_59002244" STARTARROW="None" STARTINCLINATION="450;28;"/>
</node>
<node CREATED="1770838335382" ID="ID_826676645" MODIFIED="1770839031149" TEXT="da sehe ich eine Seite von mir &#x2014; die in weiter Ferne liegt">
<node CREATED="1770838335382" ID="ID_826676645" MODIFIED="1771012699684" TEXT="da sehe ich eine Seite von mir &#x2014; die in weiter Ferne liegt">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112306,32 +112311,32 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node CREATED="1770838460409" ID="ID_1373165487" MODIFIED="1770838477959" TEXT="es k&#xf6;nnte aber doch sein da&#xdf; man es genau anders herum braucht">
<node CREATED="1770838460409" ID="ID_1373165487" MODIFIED="1771012699684" TEXT="es k&#xf6;nnte aber doch sein da&#xdf; man es genau anders herum braucht">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
<node CREATED="1770838518678" ID="ID_1437694840" MODIFIED="1770838524984" TEXT="ist das eine Mentalit&#xe4;t?"/>
<node CREATED="1770838525986" ID="ID_224361866" MODIFIED="1770838540471" TEXT="oder ist es das Bestreben, &#xbb;Pfl&#xf6;cke einzuschlagen&#xab;?"/>
<node CREATED="1770838518678" ID="ID_1437694840" MODIFIED="1771012699684" TEXT="ist das eine Mentalit&#xe4;t?"/>
<node CREATED="1770838525986" ID="ID_224361866" MODIFIED="1771012699685" TEXT="oder ist es das Bestreben, &#xbb;Pfl&#xf6;cke einzuschlagen&#xab;?"/>
</node>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770839087670" ID="ID_1322493117" MODIFIED="1770839121053" TEXT="Allerdings: heute habe ich einen Hass auf Leute, die alles &#xbb;ganz einfach machen&#xab;">
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770839087670" ID="ID_1322493117" MODIFIED="1771012699685" TEXT="Allerdings: heute habe ich einen Hass auf Leute, die alles &#xbb;ganz einfach machen&#xab;">
<icon BUILTIN="broken-line"/>
</node>
</node>
<node COLOR="#5b280f" CREATED="1770839241501" ID="ID_887145561" MODIFIED="1770839279631" TEXT="das untergr&#xe4;bt das Buffer-Protokoll im Kern">
<node COLOR="#5b280f" CREATED="1770839241501" ID="ID_887145561" MODIFIED="1771012699685" TEXT="das untergr&#xe4;bt das Buffer-Protokoll im Kern">
<icon BUILTIN="stop-sign"/>
<node CREATED="1770839283040" ID="ID_1215761103" MODIFIED="1770839302667" TEXT="kein Wunder da&#xdf; ich mir mit der Type-Registry so schwer getan habe">
<node CREATED="1770839283040" ID="ID_1215761103" MODIFIED="1771012699685" TEXT="kein Wunder da&#xdf; ich mir mit der Type-Registry so schwer getan habe">
<icon BUILTIN="smiley-oh"/>
</node>
<node CREATED="1770839373803" ID="ID_1452106816" MODIFIED="1770839395813" TEXT="es w&#xfc;rde implizieren, da&#xdf; ein BuffHandle eigenst&#xe4;ndig ist"/>
<node CREATED="1770839408182" ID="ID_1723828077" MODIFIED="1770839425128" TEXT="also etwa wie ein shared-ptr, den man neu belegen kann"/>
<node CREATED="1770839446717" ID="ID_511992087" MODIFIED="1770839454219" TEXT="Kurz gesagt: ich wu&#xdf;te nicht was ich wollte"/>
<node CREATED="1770839465895" ID="ID_1971787626" MODIFIED="1770839473684" TEXT="und wollte mir selbst nicht im Weg stehen"/>
<node CREATED="1770839373803" ID="ID_1452106816" MODIFIED="1771012699685" TEXT="es w&#xfc;rde implizieren, da&#xdf; ein BuffHandle eigenst&#xe4;ndig ist"/>
<node CREATED="1770839408182" ID="ID_1723828077" MODIFIED="1771012699686" TEXT="also etwa wie ein shared-ptr, den man neu belegen kann"/>
<node CREATED="1770839446717" ID="ID_511992087" MODIFIED="1771012699686" TEXT="Kurz gesagt: ich wu&#xdf;te nicht was ich wollte"/>
<node CREATED="1770839465895" ID="ID_1971787626" MODIFIED="1771012699686" TEXT="und wollte mir selbst nicht im Weg stehen"/>
</node>
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1770839482869" ID="ID_1977655709" MODIFIED="1770839488236" TEXT="das mu&#xdf; weg">
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1770839482869" ID="ID_1977655709" LINK="#ID_614570936" MODIFIED="1771012736056" TEXT="das mu&#xdf; weg">
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
<icon BUILTIN="yes"/>
<node CREATED="1770839695480" ID="ID_644844801" MODIFIED="1770851507372" TEXT="wird includiert in weaving-pattern-builder.hpp">
<node CREATED="1770839712638" ID="ID_236933523" MODIFIED="1770839722175" TEXT="dort steht ein Warnungs-Kommentar von 10/2024"/>
<node CREATED="1770839738362" ID="ID_595295798" MODIFIED="1770839755931" TEXT="denn das definiert die BuffHandle::accessAs&lt;TY&gt;()"/>
<node CREATED="1770839785138" ID="ID_608985526" MODIFIED="1770935893102" TEXT="anscheinend hatte ich das zun&#xe4;chst als &#xbb;Extra-Feature&#xab; betrachtet">
<node CREATED="1770839695480" ID="ID_644844801" MODIFIED="1771012699686" TEXT="wird includiert in weaving-pattern-builder.hpp">
<node CREATED="1770839712638" ID="ID_236933523" MODIFIED="1771012699687" TEXT="dort steht ein Warnungs-Kommentar von 10/2024"/>
<node CREATED="1770839738362" ID="ID_595295798" MODIFIED="1771012699687" TEXT="denn das definiert die BuffHandle::accessAs&lt;TY&gt;()"/>
<node COLOR="#435e98" CREATED="1770839785138" ID="ID_608985526" MODIFIED="1771012699687" TEXT="anscheinend hatte ich das zun&#xe4;chst als &#xbb;Extra-Feature&#xab; betrachtet">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112351,18 +112356,18 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
<icon BUILTIN="idea"/>
</node>
</node>
<node CREATED="1770839685232" ID="ID_514447363" MODIFIED="1770839694516" TEXT="wird erst mal includiert in alle Tests...">
<node CREATED="1770847706049" ID="ID_1332199024" MODIFIED="1770847715980" TEXT="BuffHandle::takeOwnershipFor&lt;TY&gt;() wird gar nicht verwendet"/>
<node CREATED="1770849077190" ID="ID_379928752" MODIFIED="1770849077190" TEXT="BuffHandle::create()">
<node CREATED="1770849080395" ID="ID_1691573670" MODIFIED="1770849100076" TEXT="wird getestet im BufferProviderProtocol_test">
<node CREATED="1770849108348" MODIFIED="1770849108348" TEXT="verifyObjectAttachment"/>
<node CREATED="1770849113871" MODIFIED="1770849113871" TEXT="verifyObjectAttachmentFailure"/>
<node CREATED="1770839685232" ID="ID_514447363" MODIFIED="1771012699687" TEXT="wird erst mal includiert in alle Tests...">
<node CREATED="1770847706049" ID="ID_1332199024" MODIFIED="1771012699687" TEXT="BuffHandle::takeOwnershipFor&lt;TY&gt;() wird gar nicht verwendet"/>
<node CREATED="1770849077190" ID="ID_379928752" MODIFIED="1771012699687" TEXT="BuffHandle::create()">
<node CREATED="1770849080395" ID="ID_1691573670" MODIFIED="1771012699688" TEXT="wird getestet im BufferProviderProtocol_test">
<node CREATED="1770849108348" MODIFIED="1771012699688" TEXT="verifyObjectAttachment"/>
<node CREATED="1770849113871" MODIFIED="1771012699688" TEXT="verifyObjectAttachmentFailure"/>
</node>
<node CREATED="1770849117450" ID="ID_1557101993" MODIFIED="1770849125597" TEXT="wird sonst nirgends verwendet">
<node CREATED="1770849291733" ID="ID_1815291397" MODIFIED="1770849299436" TEXT="was Wunder....">
<node CREATED="1770849117450" ID="ID_1557101993" MODIFIED="1771012699688" TEXT="wird sonst nirgends verwendet">
<node CREATED="1770849291733" ID="ID_1815291397" MODIFIED="1771012699688" TEXT="was Wunder....">
<icon BUILTIN="smiley-oh"/>
</node>
<node CREATED="1770849303036" ID="ID_1205278978" MODIFIED="1770849763279" TEXT="allerdings: so v&#xf6;llig abwegig ist die Idee nicht (theoretisch)....">
<node CREATED="1770849303036" ID="ID_1205278978" MODIFIED="1771012699689" TEXT="allerdings: so v&#xf6;llig abwegig ist die Idee nicht (theoretisch)....">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112378,7 +112383,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node CREATED="1770849771181" ID="ID_287508686" MODIFIED="1770850182114" TEXT="Feststellung: Verst&#xe4;ndnis und Rahmen haben sich inzwischen grundlegend ge&#xe4;ndert">
<node CREATED="1770849771181" ID="ID_287508686" MODIFIED="1771012699689" TEXT="Feststellung: Verst&#xe4;ndnis und Rahmen haben sich inzwischen grundlegend ge&#xe4;ndert">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112389,10 +112394,10 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</html></richcontent>
</node>
</node>
<node COLOR="#5b280f" CREATED="1770850196539" ID="ID_1323788152" MODIFIED="1770851451211" TEXT="denkbar w&#xe4;re eine reduzierte Variante">
<node COLOR="#5b280f" CREATED="1770850196539" ID="ID_1323788152" MODIFIED="1771012699689" TEXT="denkbar w&#xe4;re eine reduzierte Variante">
<icon BUILTIN="idea"/>
<icon BUILTIN="button_cancel"/>
<node CREATED="1770850209210" ID="ID_713808924" MODIFIED="1770850378331" TEXT="n&#xe4;mlich auf dem Buffer-Descriptor, nicht auf einem bestehenden BuffHandle">
<node CREATED="1770850209210" ID="ID_713808924" MODIFIED="1771012699689" TEXT="n&#xe4;mlich auf dem Buffer-Descriptor, nicht auf einem bestehenden BuffHandle">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112402,7 +112407,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node CREATED="1770850381762" ID="ID_258766109" MODIFIED="1770850910483" TEXT="des fragt sich aber: ist daf&#xfc;r &#xfc;berhaupt Raum gegeben?">
<node CREATED="1770850381762" ID="ID_258766109" MODIFIED="1771012699689" TEXT="des fragt sich aber: ist daf&#xfc;r &#xfc;berhaupt Raum gegeben?">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112412,7 +112417,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node CREATED="1770850950951" ID="ID_238302985" MODIFIED="1770851127904" TEXT="meine Haltung zur Architektur ist differenzierter">
<node CREATED="1770850950951" ID="ID_238302985" MODIFIED="1771012699690" TEXT="meine Haltung zur Architektur ist differenzierter">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112422,7 +112427,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node CREATED="1770851130079" ID="ID_1133045538" MODIFIED="1770851434495" TEXT="Typen sind fluider geworden">
<node CREATED="1770851130079" ID="ID_1133045538" MODIFIED="1771012699690" TEXT="Typen sind fluider geworden">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
@ -112435,7 +112440,7 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</body>
</html></richcontent>
</node>
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1770851437338" ID="ID_1687515941" MODIFIED="1770851496643" TEXT="also: brauchen wir nicht">
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1770851437338" ID="ID_1687515941" MODIFIED="1771012699690" TEXT="also: brauchen wir nicht">
<arrowlink COLOR="#936170" DESTINATION="ID_614570936" ENDARROW="Default" ENDINCLINATION="734;-44;" ID="Arrow_ID_10269322" STARTARROW="None" STARTINCLINATION="-461;50;"/>
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
<icon BUILTIN="yes"/>
@ -112444,6 +112449,9 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</node>
</node>
</node>
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#9f119e" CREATED="1771012490903" ID="ID_116473726" MODIFIED="1771012705746" STYLE="bubble" TEXT="&#xd83d;&#xdc80; totgemacht">
<edge COLOR="#e902d4"/>
</node>
</node>
</node>
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1770857362355" ID="ID_1586757726" MODIFIED="1770857603470" TEXT="au&#xdf;erdem: DiagnosticBufferProvider + zugeh&#xf6;riger Test machen Manches redundant">
@ -112596,6 +112604,91 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</node>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1770917107132" ID="ID_1518034296" MODIFIED="1770923603446" TEXT="Tracking">
<icon BUILTIN="yes"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1770949936866" ID="ID_1114022707" MODIFIED="1770949946920" TEXT="geeignete Tracking-Punkte identifizieren">
<icon BUILTIN="flag-yellow"/>
<node CREATED="1770949948582" ID="ID_808227487" MODIFIED="1770949983379" TEXT="idealerweise sitzen die auf dem BufferStore-API">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
weil <i>dort</i>&#160;die tats&#228;chlichen Zustands&#252;berg&#228;nge stattfinden...
</p>
</body>
</html>
</richcontent>
</node>
<node CREATED="1770949985342" ID="ID_1826916276" MODIFIED="1770950002859" TEXT="und zudem sollte man an alle Daten f&#xfc;r das BuffHandle gelangen k&#xf6;nnen"/>
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1770950008410" ID="ID_1843260494" MODIFIED="1770950105874" TEXT="konkret ist das noch nicht der Fall">
<icon BUILTIN="broken-line"/>
<node CREATED="1770950020300" ID="ID_1046414776" MODIFIED="1770950042077" TEXT="es gibt nur State-Transitions auf dem Store-API"/>
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1770950043240" ID="ID_1352986332" MODIFIED="1770950068389" TEXT="vorher wird direkt per Seiteneffekt auf den Type-Registry-Entry zugegriffen">
<icon BUILTIN="messagebox_warning"/>
</node>
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1770950078043" ID="ID_1126044596" MODIFIED="1770950096275" TEXT="und bisweilen hat man das Handle nur auf dem front-End-Interface">
<icon BUILTIN="messagebox_warning"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1770950250610" ID="ID_1856993589" MODIFIED="1770950370620" TEXT="API-Umbauten anlegen">
<arrowlink COLOR="#da0a3e" DESTINATION="ID_853313306" ENDARROW="Default" ENDINCLINATION="-78;-118;" ID="Arrow_ID_1809426775" STARTARROW="None" STARTINCLINATION="-315;35;"/>
<icon BUILTIN="flag-yellow"/>
<node CREATED="1770950897150" ID="ID_1423801932" MODIFIED="1770950902060" TEXT="BufferProvider::lockBuffer (BuffDescr)">
<node CREATED="1770950938273" ID="ID_252841945" MODIFIED="1770950942530" TEXT="holt sich den Typ-Entry"/>
<node CREATED="1770950943851" ID="ID_543062847" MODIFIED="1770950985286" TEXT="entnimmt Size und loalKey &#x27f6; store.provideBuffer()"/>
<node CREATED="1770950988149" ID="ID_583610733" MODIFIED="1770950994093" TEXT="ruft dann buildHandle auf">
<node CREATED="1770951021736" ID="ID_1519122680" MODIFIED="1770951021736" TEXT="bufferStage_-&gt;markLocked (typeKey, storage, implMarker)"/>
<node CREATED="1770951023690" ID="ID_10082173" MODIFIED="1770951033928" TEXT="das erzeugt den Detail-Entry"/>
<node CREATED="1770951051706" ID="ID_61884098" MODIFIED="1770951061905" TEXT="das BuffHandle wird direkt aus diesen Daten gebaut">
<node CREATED="1770951083655" ID="ID_1754215609" MODIFIED="1770951087729" TEXT="Detail-Entry"/>
<node CREATED="1770951088988" ID="ID_616545498" MODIFIED="1770951091534" TEXT="Storage"/>
</node>
</node>
</node>
<node CREATED="1770950391834" ID="ID_342050575" MODIFIED="1770950395940" TEXT="BufferProvider::emitBuffer (BuffHandle)">
<node CREATED="1770950417399" ID="ID_572237980" MODIFIED="1770951342867" TEXT="holt sich den Detail-Entry (zum BuffHandle)"/>
<node CREATED="1770950504106" ID="ID_155003695" MODIFIED="1770950542657" TEXT="store-&gt;mark_emitted (size, typ, localKey)">
<node CREATED="1770950544262" ID="ID_1083216675" MODIFIED="1771010265261" TEXT="Achtung: hier Typ &#x2259; parentKey">
<arrowlink COLOR="#b10e16" DESTINATION="ID_1576060790" ENDARROW="Default" ENDINCLINATION="33;-68;" ID="Arrow_ID_1649427563" STARTARROW="Default" STARTINCLINATION="70;4;"/>
</node>
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1770950580157" ID="ID_705928599" MODIFIED="1770950873207" TEXT="Vorsicht: dieser Aufruf wird mutma&#xdf;lich doch dauerhaft gebraucht">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
Und zwar weil das BufferProvider-Interface auch erweiterte Funktionalit&#228;t ansteuern soll, wie den Cache oder die OutputSink. Diese brauchen zwingend den emit()-Aufruf. Zwar k&#246;nnte man jetzt versuchen, diese Delegation aus beiden Zonen zusammenzubauen &#8212; aber das widerspricht der Idee dieses Refactorings zur Trennung der Zonen. Also l&#228;uft es darauf hinaus, da&#223; solche Spezial-Implementierungen die generische Metadaten/Zustands-Implementierung verwenden, aber einen speziellen BufferStore. Somit m&#252;ssen alle Zustands&#252;berg&#228;nge tats&#228;chlich an beide Implementierungs-S&#228;ulen propagiert werden
</p>
</body>
</html>
</richcontent>
<linktarget COLOR="#e3460e" DESTINATION="ID_705928599" ENDARROW="Default" ENDINCLINATION="2487;-117;" ID="Arrow_ID_1584976619" SOURCE="ID_255640086" STARTARROW="None" STARTINCLINATION="1663;76;"/>
<icon BUILTIN="messagebox_warning"/>
</node>
</node>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770950463921" ID="ID_1567481328" MODIFIED="1770951209300" TEXT="macht direkt metaEntry.mark(EMITTED)">
<icon BUILTIN="messagebox_warning"/>
</node>
</node>
<node CREATED="1770951123696" ID="ID_130775850" MODIFIED="1770951126843" TEXT="BufferProvider::releaseBuffer (BuffHandle)">
<node CREATED="1770950417399" ID="ID_123312886" MODIFIED="1770951335447" TEXT="holt sich den Detail-Entry (zum BuffHandle)"/>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1770951191103" ID="ID_381220092" MODIFIED="1770951201974" TEXT="macht direkt metaEntry.mark(FREE)">
<icon BUILTIN="messagebox_warning"/>
</node>
<node CREATED="1770951226506" ID="ID_1640268027" MODIFIED="1770951249726" TEXT="store-&gt;detachBuffer (size, typ, Slot(storage, localKey))">
<node CREATED="1770951267068" ID="ID_1576060790" MODIFIED="1771010265261" TEXT="Achtung auch hier Typ &#x2259; parentKey">
<linktarget COLOR="#b10e16" DESTINATION="ID_1576060790" ENDARROW="Default" ENDINCLINATION="33;-68;" ID="Arrow_ID_1649427563" SOURCE="ID_1083216675" STARTARROW="Default" STARTINCLINATION="70;4;"/>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1770950134226" ID="ID_210815021" MODIFIED="1770950145147" TEXT="mu&#xdf; die korrekte Tracker-Registry ansprechen">
<node CREATED="1770950151506" ID="ID_1595932224" MODIFIED="1770950161653" TEXT="eigentlich immer zuerst die created-Registry"/>
<node CREATED="1770950167400" ID="ID_1883755499" MODIFIED="1770950182484" TEXT="die Tracking-Funktion mu&#xdf; den Zustands&#xfc;bergang erkennen"/>
<node CREATED="1770950209162" ID="ID_1174437807" MODIFIED="1770950232620" TEXT="und dann den Block aktualisieren und in die emitted/released-Registry &#xfc;bernehmen"/>
</node>
</node>
</node>
</node>
@ -112618,13 +112711,14 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
</html></richcontent>
<arrowlink COLOR="#ed132c" DESTINATION="ID_432061684" ENDARROW="Default" ENDINCLINATION="23;-191;" ID="Arrow_ID_148621556" STARTARROW="None" STARTINCLINATION="-377;24;"/>
<icon BUILTIN="yes"/>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1770839495603" ID="ID_614570936" MODIFIED="1770851488643" TEXT="buffhandle-attach.hpp ersatzlos zur&#xfc;ckbauen">
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#435e98" CREATED="1770839495603" ID="ID_614570936" MODIFIED="1771012571486" TEXT="buffhandle-attach.hpp ersatzlos zur&#xfc;ckbauen">
<linktarget COLOR="#936170" DESTINATION="ID_614570936" ENDARROW="Default" ENDINCLINATION="734;-44;" ID="Arrow_ID_10269322" SOURCE="ID_1687515941" STARTARROW="None" STARTINCLINATION="-461;50;"/>
<icon BUILTIN="yes"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1770851518039" HGAP="35" ID="ID_211253816" MODIFIED="1770851580967" TEXT="BuffHandle::accessAs&lt;TY&gt;() zieht in die Kern-Implementierung um" VSHIFT="17">
<node COLOR="#338800" CREATED="1770851518039" HGAP="35" ID="ID_211253816" MODIFIED="1771012540872" TEXT="BuffHandle::accessAs&lt;TY&gt;() zieht in die Kern-Implementierung um" VSHIFT="17">
<linktarget COLOR="#feded2" DESTINATION="ID_211253816" ENDARROW="Default" ENDINCLINATION="51;-168;" ID="Arrow_ID_1480603828" SOURCE="ID_608985526" STARTARROW="None" STARTINCLINATION="-359;15;"/>
<icon BUILTIN="flag-yellow"/>
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#b7c4da" COLOR="#435e98" CREATED="1771012551876" HGAP="35" ID="ID_335656320" MODIFIED="1771012599378" TEXT="auch unterliegende Implementierung entfernt" VSHIFT="-1"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1770857874819" ID="ID_17538120" MODIFIED="1770859527690" TEXT="Test-Pr&#xe4;dikate auf den Handles nachsch&#xe4;rfen">
<icon BUILTIN="flag-yellow"/>
@ -112705,6 +112799,10 @@ StM_bind(Builder&lt;R1&gt; b1, Extension&lt;R1,R2&gt; extension)
<node CREATED="1770947399557" ID="ID_1598745754" MODIFIED="1770947411455" TEXT="und der de-Allokation wieder angeliefert"/>
</node>
</node>
<node CREATED="1770950337384" ID="ID_853313306" MODIFIED="1770950365227" TEXT="Vorgriff auf das Stage-API">
<linktarget COLOR="#da0a3e" DESTINATION="ID_853313306" ENDARROW="Default" ENDINCLINATION="-78;-118;" ID="Arrow_ID_1809426775" SOURCE="ID_1856993589" STARTARROW="None" STARTINCLINATION="-315;35;"/>
<node CREATED="1771010303963" ID="ID_1721405713" MODIFIED="1771010319964" TEXT="alle relevanten Zustands&#xfc;berg&#xe4;nge laufen &#xfc;ber diese Schnittstelle"/>
</node>
</node>
</node>
</node>