![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "steam/engine/buffer-metadata.hpp"
A complete metadata Entry, based on a Key.
This special Key element usually describes an actual Buffer. Entries are to be managed in a hashtable, which is "the metadata table". As a special case, an entry without a concrete buffer storage pointer can be created. This corresponds to a (plain) key and describes just a buffer type. Such type-only entries are fixed to the NIL state. All other entries allow for state transitions.
The "metadata table" with its entries is maintained by an engine::BufferMetadata instance. For the latter, Entry serves as representation and access point to the individual metadata; this includes using the TypeHandler for building and destroying buffer structures.
Definition at line 263 of file buffer-metadata.hpp.
Public Member Functions | |
| bool | isLocked () const |
| is this Entry currently associated to a concrete buffer? Is this buffer in use? | |
| bool | isTypeKey () const |
| is this Entry just an (abstract) placeholder for a type? | |
| BufferState | state () const |
| Buff * | access () |
| Entry & | mark (BufferState newState) |
| Buffer state machine. | |
| Entry & | lock (Buff *newBuffer) |
| Entry & | invalidate (bool invokeDtor=true) |
Public Member Functions inherited from Key | |
| Key (HashVal familyID, size_t storageSize) | |
| build a standard basic key describing a kind of Buffer. | |
| Key (Key const &parent, size_t differingStorageSize) | |
| create a derived buffer type description. | |
| Key (Key const &parent, TypeHandler const &differingTypeHandlerFunctions) | |
| create a derived buffer type description. | |
| Key (Key const &parent, LocalTag anotherTypeSpecificInternalTag) | |
| create a derived buffer type description. | |
| void | useTypeHandlerFrom (Key const &ref) |
| LocalTag const & | localTag () const |
| size_t | storageSize () const |
| HashVal | parentKey () const |
| operator HashVal () const | |
Friends | |
| class | engine::BufferMetadata |
| BufferMetadata is allowed to create. | |
Protected Member Functions | |
| Entry (Key const &parent, Buff *bufferPtr=nullptr, LocalTag const &specialTag=LocalTag::UNKNOWN) | |
| void | invokeEmbeddedCtor () |
| void | invokeEmbeddedDtor_and_clear () |
Private Member Functions | |
| void | __must_not_be_NIL () const |
| void | __must_not_be_FREE () const |
| void | __must_be_FREE () const |
| void | __buffer_required () const |
Private Attributes | |
| BufferState | state_ |
| Buff * | buffer_ |
Additional Inherited Members | |
Static Public Member Functions inherited from Key | |
| static Key | forEntry (Key const &parent, const Buff *bufferAddr, LocalTag const &localTag=LocalTag::UNKNOWN) |
| build derived Key for a concrete buffer Entry | |
Protected Attributes inherited from Key | |
| size_t | storageSize_ |
| TypeHandler | instanceFunc_ |
| LocalTag | specifics_ |
|
inlineprotected |
Definition at line 270 of file buffer-metadata.hpp.
|
inline |
is this Entry currently associated to a concrete buffer? Is this buffer in use?
Definition at line 288 of file buffer-metadata.hpp.
References Entry::buffer_, steam::engine::FREE, steam::engine::NIL, and Entry::state_.
Referenced by BufferProvider::attachTypeHandler(), BufferMetadata::lock(), and BufferMetadata::store_as_locked().
Here is the caller graph for this function:
|
inline |
is this Entry just an (abstract) placeholder for a type?
Definition at line 298 of file buffer-metadata.hpp.
References Entry::buffer_, steam::engine::NIL, and Entry::state_.
Referenced by BufferProvider::attachTypeHandler().
Here is the caller graph for this function:
|
inline |
Definition at line 305 of file buffer-metadata.hpp.
References Entry::state_.
Referenced by BufferMetadata::store_as_locked(), BufferMetadata_test::verifyBasicProperties(), and BufferMetadata_test::verifyStandardCase().
Here is the caller graph for this function:
|
inline |
Definition at line 311 of file buffer-metadata.hpp.
References Entry::__must_not_be_FREE(), Entry::__must_not_be_NIL(), and Entry::buffer_.
Referenced by BufferMetadata::store_as_locked(), BufferMetadata_test::verifyBasicProperties(), and BufferMetadata_test::verifyStandardCase().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Buffer state machine.
Definition at line 322 of file buffer-metadata.hpp.
References Entry::__must_not_be_NIL(), steam::engine::BLOCKED, steam::engine::EMITTED, steam::engine::FREE, Entry::invokeEmbeddedCtor(), Entry::invokeEmbeddedDtor_and_clear(), steam::engine::LOCKED, and Entry::state_.
Referenced by BufferProvider::emitBuffer(), Entry::lock(), BufferProvider::releaseBuffer(), BufferMetadata::store_as_locked(), BufferMetadata_test::verifyBasicProperties(), and BufferMetadata_test::verifyStandardCase().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 347 of file buffer-metadata.hpp.
References Entry::__must_be_FREE(), Entry::buffer_, steam::engine::LOCKED, and Entry::mark().
Referenced by BufferMetadata::lock().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 355 of file buffer-metadata.hpp.
References Entry::buffer_, steam::engine::FREE, Entry::invokeEmbeddedDtor_and_clear(), and Entry::state_.
Referenced by BufferProvider::emergencyCleanup().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
maybe invoke a registered TypeHandler's constructor function, which typically builds some content object into the buffer by placement new.
Definition at line 370 of file buffer-metadata.hpp.
References Entry::__buffer_required(), Entry::buffer_, TypeHandler::createAttached, and Key::instanceFunc_.
Referenced by Entry::mark(), and BufferMetadata::store_as_locked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
maybe invoke a registered TypeHandler's destructor function, which typically clears up some content object living within the buffer
Definition at line 381 of file buffer-metadata.hpp.
References Entry::__buffer_required(), Entry::buffer_, TypeHandler::destroyAttached, and Key::instanceFunc_.
Referenced by Entry::invalidate(), and Entry::mark().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 391 of file buffer-metadata.hpp.
References LERR_, steam::engine::NIL, and Entry::state_.
Referenced by Entry::access(), and Entry::mark().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 400 of file buffer-metadata.hpp.
References steam::engine::FREE, LERR_, and Entry::state_.
Referenced by Entry::access().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 410 of file buffer-metadata.hpp.
References Entry::buffer_, steam::engine::FREE, LERR_, and Entry::state_.
Referenced by Entry::lock().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 420 of file buffer-metadata.hpp.
References Entry::buffer_.
Referenced by Entry::invokeEmbeddedCtor(), and Entry::invokeEmbeddedDtor_and_clear().
Here is the caller graph for this function:
|
private |
Definition at line 266 of file buffer-metadata.hpp.
Referenced by Entry::__must_be_FREE(), Entry::__must_not_be_FREE(), Entry::__must_not_be_NIL(), Entry::invalidate(), Entry::isLocked(), Entry::isTypeKey(), Entry::mark(), and Entry::state().
|
private |
Definition at line 267 of file buffer-metadata.hpp.
Referenced by Entry::__buffer_required(), Entry::__must_be_FREE(), Entry::access(), Entry::invalidate(), Entry::invokeEmbeddedCtor(), Entry::invokeEmbeddedDtor_and_clear(), Entry::isLocked(), Entry::isTypeKey(), and Entry::lock().
|
friend |
BufferMetadata is allowed to create.
Definition at line 280 of file buffer-metadata.hpp.
Inheritance diagram for Entry:
Collaboration diagram for Entry: