Lumiera  0.pre.03
»edit your freedom«
Table Class Reference

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

Description

(Hash)Table to store and manage buffer metadata.

Buffer metadata entries are comprised of a Key part and an extended Entry, holding the actual management and housekeeping metadata. The Keys are organised hierarchically and denote the "kind" of buffer. The hash values for lookup are based on the key part, chained with the actual memory location of the concrete buffer corresponding to the metadata entry to be retrieved.

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

Public Member Functions

Entryfetch (HashVal hashID)
 fetch metadata record, if any More...
 
const Entryfetch (HashVal hashID) const
 
void remove (HashVal hashID)
 
Entrystore (Entry const &newEntry)
 store a copy of the given new metadata entry. More...
 

Private Types

typedef std::unordered_map< HashVal, EntryMetadataStore
 

Private Member Functions

void verify_all_buffers_freed ()
 

Static Private Member Functions

static void verify_is_free (std::pair< HashVal, Entry > const &e)
 

Private Attributes

MetadataStore entries_
 

Member Function Documentation

◆ fetch()

Entry* fetch ( HashVal  hashID)
inline

fetch metadata record, if any

Parameters
hashIDfor the Key part of the metadata entry
Returns
pointer to the entry in the table or NULL

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

Referenced by BufferMetadata::get(), BufferMetadata::key(), and BufferMetadata::release().

+ Here is the caller graph for this function:

◆ store()

Entry& store ( Entry const &  newEntry)
inline

store a copy of the given new metadata entry.

The hash key for lookup is retrieved from the given Entry, by conversion to HashVal. Consequently, this will be the hashID of the parent Key (type), when the entry holds a NULL buffer (i.e a "pseudo entry"). Otherwise, it will be this parent Key hash, extended by hashing the actual buffer address.

Returns
reference to relevant entry for this Key. This might be a copy of the new entry, or an already existing entry with the same Key

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

Referenced by BufferMetadata::store_as_locked().

+ Here is the caller graph for this function:
+ Collaboration diagram for Table:

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