MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Facet< T > Class Template Reference

Typed key for an arbitrary attribute stored in a Facets bag. More...

#include <Facets.hpp>

Inheritance diagram for MayaFlux::Facet< T >:
Collaboration diagram for MayaFlux::Facet< T >:

Public Member Functions

 Facet ()
 Facet (T initial)
const void * id () const noexcept
 Identity shared by every copy of this key.
const T & initial () const noexcept
 Value stored by set(key) with no explicit value.
const std::shared_ptr< const void > & token () const noexcept
 Keeps the identity alive while a Facets bag holds a value for it.

Private Attributes

T m_initial
std::shared_ptr< const void > m_token

Detailed Description

template<typename T>
class MayaFlux::Facet< T >

Typed key for an arbitrary attribute stored in a Facets bag.

The type is fixed by the key. A key carries an initial value, so Facet(0.5F) deduces Facet<float> and Facet<double>() value-initialises one. Copies share the identity, so a copied key addresses the same attribute.

Template Parameters
TThe attribute type. Must be an object type that is not const.

Definition at line 26 of file Facets.hpp.


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