Lumiera
0.pre.03
»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 | |
Buff * | access () |
Entry & | invalidate (bool invokeDtor=true) |
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? More... | |
Entry & | lock (Buff *newBuffer) |
Entry & | mark (BufferState newState) |
Buffer state machine. | |
BufferState | state () const |
Public Member Functions inherited from Key | |
Key (HashVal familyID, size_t storageSize) | |
build a standard basic key describing a kind of Buffer. More... | |
Key (Key const &parent, size_t differingStorageSize) | |
create a derived buffer type description. More... | |
Key (Key const &parent, TypeHandler const &differingTypeHandlerFunctions) | |
create a derived buffer type description. More... | |
Key (Key const &parent, LocalTag anotherTypeSpecificInternalTag) | |
create a derived buffer type description. More... | |
LocalTag const & | localTag () const |
operator HashVal () const | |
HashVal | parentKey () const |
size_t | storageSize () const |
void | useTypeHandlerFrom (Key const &ref) |
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 | __buffer_required () const |
void | __must_be_FREE () const |
void | __must_not_be_FREE () const |
void | __must_not_be_NIL () const |
Private Attributes | |
Buff * | buffer_ |
BufferState | state_ |
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 More... | |
Protected Attributes inherited from Key | |
TypeHandler | instanceFunc_ |
LocalTag | specifics_ |
size_t | storageSize_ |
|
inline |
is this Entry just an (abstract) placeholder for a type?
Definition at line 298 of file buffer-metadata.hpp.
References steam::engine::NIL.
Referenced by BufferProvider::attachTypeHandler().
|
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.
Referenced by BufferMetadata::store_as_locked().
|
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.