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

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

Description

Description of a Buffer-"type".

Key elements will be used to generate hash IDs, to be embedded into a Buffer Descriptor. Keys are chained hierarchically.

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

Static Public Member Functions

static Key forEntry (Key const &parent, const Buff *bufferAddr, LocalTag const &localTag=LocalTag::UNKNOWN)
 build derived Key for a concrete buffer Entry
 

Public Member Functions

 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
 

Protected Attributes

size_t storageSize_
 
TypeHandler instanceFunc_
 
LocalTag specifics_
 

Private Attributes

HashVal parent_
 
HashVal hashID_
 

Constructor & Destructor Documentation

◆ Key() [1/4]

Key ( HashVal  familyID,
size_t  storageSize 
)
inline

build a standard basic key describing a kind of Buffer.

Parameters
familyIDbasic hash seed value to distinguish families of buffer types managed by different BufferProvider instances
storageSizefundamental info: buffer size

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

◆ Key() [2/4]

Key ( Key const &  parent,
size_t  differingStorageSize 
)
inline

create a derived buffer type description.

Using a different storage size than the parent type, all else remaining the same

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

◆ Key() [3/4]

Key ( Key const &  parent,
TypeHandler const &  differingTypeHandlerFunctions 
)
inline

create a derived buffer type description.

Using different ctor and dtor functions, all else remaining the same as with parent

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

◆ Key() [4/4]

Key ( Key const &  parent,
LocalTag  anotherTypeSpecificInternalTag 
)
inline

create a derived buffer type description.

Using a different private ID than the parent type, all else remaining the same

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

Member Function Documentation

◆ forEntry()

static Key forEntry ( Key const &  parent,
const Buff bufferAddr,
LocalTag const &  localTag = LocalTag::UNKNOWN 
)
inlinestatic

build derived Key for a concrete buffer Entry

Parameters
parenttype key to subsume this buffer
bufferAddrpointer to the concrete buffer
Returns
Child key with hashID based on the buffer address. For NULL buffer a copy of the parent is returned.

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

References Key::localTag(), Key::parent_, and Key::specifics_.

Referenced by BufferMetadata::key().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ useTypeHandlerFrom()

void useTypeHandlerFrom ( Key const &  ref)
inline

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

References Key::instanceFunc_, and LERR_.

Referenced by BufferProvider::attachTypeHandler().

+ Here is the caller graph for this function:

◆ localTag()

LocalTag const & localTag ( ) const
inline

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

References Key::specifics_.

Referenced by BufferProvider::emergencyCleanup(), BufferProvider::emitBuffer(), Key::forEntry(), BufferProvider::releaseBuffer(), and BufferMetadata_test::verifyStandardCase().

+ Here is the caller graph for this function:

◆ storageSize()

size_t storageSize ( ) const
inline

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

References Key::storageSize_.

Referenced by BufferProvider::getBufferSize().

+ Here is the caller graph for this function:

◆ parentKey()

HashVal parentKey ( ) const
inline

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

References Key::parent_.

Referenced by BufferProvider::emergencyCleanup(), BufferProvider::emitBuffer(), BufferProvider::releaseBuffer(), and BufferMetadata_test::verifyBasicProperties().

+ Here is the caller graph for this function:

◆ operator HashVal()

operator HashVal ( ) const
inline

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

References Key::hashID_.

Member Data Documentation

◆ parent_

HashVal parent_
private

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

Referenced by Key::forEntry(), and Key::parentKey().

◆ hashID_

HashVal hashID_
private

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

Referenced by Key::operator HashVal().

◆ storageSize_

size_t storageSize_
protected

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

Referenced by Key::storageSize().

◆ instanceFunc_

◆ specifics_

LocalTag specifics_
protected

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

Referenced by Key::forEntry(), and Key::localTag().

+ Inheritance diagram for Key:
+ Collaboration diagram for Key:

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