![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "steam/engine/buffhandle.hpp"
Handle for a buffer for processing data, abstracting away the actual implementation.
The real buffer pointer can be retrieved by dereferencing this smart-handle class.
Definition at line 111 of file buffhandle.hpp.
Public Types | |
| using | PBuff = Buff * |
Public Member Functions | |
| BuffHandle (BuffDescr const &typeInfo, void *storage=0) | |
| operator bool () const | |
| void | emit () |
| void | release () |
| template<typename BU > | |
| BU & | create () |
| convenience shortcut: place and maintain an object within the buffer. | |
| template<typename BU > | |
| BU & | accessAs () |
| convenience shortcut: access the buffer contents casted to a specific type. | |
| Buff & | operator* () const |
| bool | isValid () const |
| HashVal | entryID () const |
| size_t | size () const |
Private Types | |
| using | Buff = StreamType::ImplFacade::DataBuffer |
| marker type for an actual data buffer | |
Private Member Functions | |
| template<typename BU > | |
| void | takeOwnershipFor () |
| void | takeOwnershipFor (BuffDescr const &type) |
| Install a standard TypeHandler for an already locked buffer. | |
| void | emergencyCleanup () |
Private Attributes | |
| BuffDescr | descriptor_ |
| Buff * | pBuffer_ |
|
inline |
a buffer handle may be obtained by "locking" a buffer from the corresponding BufferProvider
Definition at line 124 of file buffhandle.hpp.
|
private |
marker type for an actual data buffer
Definition at line 113 of file buffhandle.hpp.
Definition at line 120 of file buffhandle.hpp.
|
inlineexplicit |
Definition at line 131 of file buffhandle.hpp.
References BuffHandle::isValid().
Here is the call graph for this function:| void emit | ( | ) |
Definition at line 280 of file buffer-provider.cpp.
References BuffHandle::descriptor_, BufferProvider::emitBuffer(), BuffHandle::isValid(), and BuffDescr::provider_.
Referenced by OutputProxyProvider_test::run(), and BufferProviderProtocol_test::verifySimpleUsage().
Here is the call graph for this function:
Here is the caller graph for this function:| void release | ( | ) |
Definition at line 288 of file buffer-provider.cpp.
References BuffHandle::descriptor_, BuffHandle::isValid(), BuffHandle::pBuffer_, BuffDescr::provider_, and BufferProvider::releaseBuffer().
Referenced by NodeLink_test::build_connected_nodes(), NodeFeed_test::feedParam(), NodeFeed_test::feedParamNode(), MediaWeavingPattern< INVO >::fix(), NodeBuilder_test::invokeRenderNode(), OutputProxyProvider_test::run(), NodeDevel_test::testRand_buildFilterNode(), NodeDevel_test::testRand_buildMixNode(), NodeDevel_test::testRand_simpleUsage(), NodeLink_test::trigger_node_port_invocation(), NodeBase_test::verify_FeedManifold(), NodeBase_test::verify_FeedPrototype(), NodeBase_test::verify_NodeStructure(), BufferProviderProtocol_test::verifyObjectAttachment(), BufferProviderProtocol_test::verifyObjectAttachmentFailure(), BufferProviderProtocol_test::verifySimpleUsage(), and TrackingHeapBlockProvider_test::verifyTestProtocol().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
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.
| 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. |
Definition at line 76 of file buffhandle-attach.hpp.
References _EXCEPTION_SAFE_INVOKE.
Referenced by BufferProviderProtocol_test::verifyObjectAttachment(), and BufferProviderProtocol_test::verifyObjectAttachmentFailure().
Here is the caller graph for this function:
|
inline |
convenience shortcut: access the buffer contents casted to a specific type.
Definition at line 110 of file buffhandle-attach.hpp.
References LERR_, and BuffHandle::pBuffer_.
Referenced by NodeLink_test::build_connected_nodes(), NodeFeed_test::feedParam(), NodeFeed_test::feedParamNode(), NodeBuilder_test::invokeRenderNode(), OutputProxyProvider_test::run(), TrackingHeapBlockProvider_test::simpleExample(), NodeDevel_test::testRand_buildFilterNode(), NodeDevel_test::testRand_buildMixNode(), NodeDevel_test::testRand_simpleUsage(), NodeLink_test::trigger_node_port_invocation(), NodeBase_test::verify_FeedManifold(), NodeBase_test::verify_FeedPrototype(), NodeBase_test::verify_NodeStructure(), BufferProviderProtocol_test::verifyObjectAttachmentFailure(), BufferProviderProtocol_test::verifySimpleUsage(), TrackingHeapBlockProvider_test::verifyStandardCase(), OutputSlotProtocol_test::verifyStandardCase(), and TrackingHeapBlockProvider_test::verifyTestProtocol().
Here is the caller graph for this function:
|
inline |
Definition at line 148 of file buffhandle.hpp.
References BuffHandle::pBuffer_.
|
inline |
Definition at line 155 of file buffhandle.hpp.
References BuffHandle::descriptor_, BuffHandle::pBuffer_, and BuffDescr::verifyValidity().
Referenced by BuffHandle::emit(), BuffHandle::operator bool(), BuffHandle::release(), OutputProxyProvider_test::run(), BuffHandle::takeOwnershipFor(), NodeBase_test::verify_FeedManifold(), BufferProviderProtocol_test::verifyObjectAttachmentFailure(), and BufferProviderProtocol_test::verifySimpleUsage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 162 of file buffhandle.hpp.
References BuffHandle::descriptor_.
Referenced by BufferProvider::emergencyCleanup(), BufferProvider::emitBuffer(), BufferProvider::releaseBuffer(), TrackingInMemoryBlockSequence::trackFrame(), and TrackingInMemoryBlockSequence::transfer().
Here is the caller graph for this function:
|
inline |
Definition at line 168 of file buffhandle.hpp.
References BuffHandle::descriptor_, and BuffDescr::determineBufferSize().
Referenced by BuffHandle::takeOwnershipFor(), BufferProviderProtocol_test::verifyObjectAttachment(), and BufferProviderProtocol_test::verifySimpleUsage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
helper to attach an TypeHandler after-the fact.
| 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. |
Definition at line 95 of file buffhandle-attach.hpp.
References BuffHandle::descriptor_, BufferProvider::getDescriptor(), BuffDescr::provider_, and BuffHandle::takeOwnershipFor().
Referenced by BuffHandle::takeOwnershipFor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
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.
| 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 |
| lifecycle | error when attempting to treat an buffer not in locked state |
| error::Logic | in case of insufficient buffer space to hold the intended target object |
Definition at line 321 of file buffer-provider.cpp.
References BufferProvider::attachTypeHandler(), BuffHandle::descriptor_, BuffDescr::determineBufferSize(), BuffHandle::isValid(), LERR_, BuffDescr::provider_, and BuffHandle::size().
Here is the call graph for this function:
|
private |
Definition at line 301 of file buffer-provider.cpp.
References BuffHandle::descriptor_, BufferProvider::emergencyCleanup(), BuffHandle::pBuffer_, and BuffDescr::provider_.
Here is the call graph for this function:
|
private |
Definition at line 115 of file buffhandle.hpp.
Referenced by BuffHandle::emergencyCleanup(), BuffHandle::emit(), BuffHandle::entryID(), BuffHandle::isValid(), BuffHandle::release(), BuffHandle::size(), BuffHandle::takeOwnershipFor(), and BuffHandle::takeOwnershipFor().
|
private |
Definition at line 116 of file buffhandle.hpp.
Referenced by BuffHandle::accessAs(), BuffHandle::emergencyCleanup(), BuffHandle::isValid(), BuffHandle::operator*(), and BuffHandle::release().
Collaboration diagram for BuffHandle: