Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
Entry Class Reference

#include "steam/engine/buffer-metadata.hpp"

Description

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
 
Buffaccess ()
 
Entrymark (BufferState newState)
 Buffer state machine.
 
Entrylock (Buff *newBuffer)
 
Entryinvalidate (bool invokeDtor=true)
 

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_
 
Buffbuffer_
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ Entry()

Entry ( Key const &  parent,
Buff bufferPtr = nullptr,
LocalTag const &  specialTag = LocalTag::UNKNOWN 
)
inlineprotected

Definition at line 270 of file buffer-metadata.hpp.

Member Function Documentation

◆ isLocked()

bool isLocked ( ) const
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:

◆ isTypeKey()

bool isTypeKey ( ) const
inline

is this Entry just an (abstract) placeholder for a type?

Returns
false if it's a real entry corresponding to a concrete buffer

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:

◆ state()

BufferState state ( ) const
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:

◆ access()

Buff * access ( )
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:

◆ mark()

Entry & mark ( BufferState  newState)
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:

◆ lock()

Entry & lock ( Buff newBuffer)
inline

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:

◆ invalidate()

Entry & invalidate ( bool  invokeDtor = true)
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:

◆ invokeEmbeddedCtor()

void invokeEmbeddedCtor ( )
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:

◆ invokeEmbeddedDtor_and_clear()

void invokeEmbeddedDtor_and_clear ( )
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:

◆ __must_not_be_NIL()

void __must_not_be_NIL ( ) const
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:

◆ __must_not_be_FREE()

void __must_not_be_FREE ( ) const
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:

◆ __must_be_FREE()

void __must_be_FREE ( ) const
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:

◆ __buffer_required()

void __buffer_required ( ) const
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:

Member Data Documentation

◆ state_

◆ buffer_

Friends And Related Symbol Documentation

◆ engine::BufferMetadata

friend class engine::BufferMetadata
friend

BufferMetadata is allowed to create.

Definition at line 280 of file buffer-metadata.hpp.

+ Inheritance diagram for Entry:
+ Collaboration diagram for Entry:

The documentation for this class was generated from the following file: