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 269 of file buffer-metadata.hpp.
Public Member Functions | |
void * | 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 (void *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, LocalKey anotherTypeSpecificInternalID) | |
create a derived buffer type description. More... | |
LocalKey const & | localKey () 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, void *bufferPtr=0, LocalKey const &implID=UNSPECIFIC) | |
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 | |
void * | buffer_ |
BufferState | state_ |
Additional Inherited Members | |
Static Public Member Functions inherited from Key | |
static Key | forEntry (Key const &parent, const void *bufferAddr, LocalKey const &implID=UNSPECIFIC) |
build derived Key for a concrete buffer Entry More... | |
Protected Attributes inherited from Key | |
TypeHandler | instanceFunc_ |
LocalKey | specifics_ |
size_t | storageSize_ |
|
inline |
is this Entry just an (abstract) placeholder for a type?
Definition at line 301 of file buffer-metadata.hpp.
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 373 of file buffer-metadata.hpp.
|
inlineprotected |
maybe invoke a registered TypeHandler's destructor function, which typically clears up some content object living within the buffer
Definition at line 384 of file buffer-metadata.hpp.