xentara-plugin v2.0.3
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::data::FixedValue< Type > Class Template Reference

A helper class that allows constructing read handles that return fixed values. More...

#include <xentara/data/ReadHandle.hpp>

Public Member Functions

 FixedValue ()=delete
 This class is not default constructible.
 
constexpr FixedValue (const Type &value)
 Constructor theat sets the value.
 
constexpr FixedValue (Type &&value)
 Constructor theat moves a value into the object.
 
template<class... Arguments>
requires std::is_constructible_v<Type, Arguments &&...>
constexpr FixedValue (std::in_place_t, Arguments &&...arguments)
 In-Place constructor.
 
template<class InitializerType , class... Arguments>
requires std::is_constructible_v<Type, std::initializer_list<InitializerType> &, Arguments &&...>
constexpr FixedValue (std::in_place_t, std::initializer_list< InitializerType > initializerList, Arguments &&...arguments)
 In-Place constructor that includes an initializer list.
 
constexpr const Type & value () const &
 Gets the value.
 
constexpr Type & value () &
 Gets the value.
 
constexpr Type && value () &&
 Gets the value.
 
constexpr const Type && value () const &&
 Gets the value.
 

Detailed Description

template<class Type>
class xentara::data::FixedValue< Type >

A helper class that allows constructing read handles that return fixed values.

Template Parameters
TypeThe type of the value to store. The type must meet the following criteria:
  • it must be nothrow destructible
  • it must be copy constructible
  • it must be nothrow move constructible
  • it must be copy assignable
  • it must be nothrow move assignable
  • it must be nothrow swappable

Constructor & Destructor Documentation

◆ FixedValue() [1/5]

template<class Type >
xentara::data::FixedValue< Type >::FixedValue ( )
delete

This class is not default constructible.

◆ FixedValue() [2/5]

template<class Type >
constexpr xentara::data::FixedValue< Type >::FixedValue ( const Type &  value)
explicitconstexpr

Constructor theat sets the value.

◆ FixedValue() [3/5]

template<class Type >
constexpr xentara::data::FixedValue< Type >::FixedValue ( Type &&  value)
explicitconstexpr

Constructor theat moves a value into the object.

◆ FixedValue() [4/5]

template<class Type >
template<class... Arguments>
requires std::is_constructible_v<Type, Arguments &&...>
constexpr xentara::data::FixedValue< Type >::FixedValue ( std::in_place_t  ,
Arguments &&...  arguments 
)
explicitconstexpr

In-Place constructor.

This constructor creates a value in place using the given arguments

◆ FixedValue() [5/5]

template<class Type >
template<class InitializerType , class... Arguments>
requires std::is_constructible_v<Type, std::initializer_list<InitializerType> &, Arguments &&...>
constexpr xentara::data::FixedValue< Type >::FixedValue ( std::in_place_t  ,
std::initializer_list< InitializerType >  initializerList,
Arguments &&...  arguments 
)
explicitconstexpr

In-Place constructor that includes an initializer list.

This constructor creates a value in place using the given arguments

Member Function Documentation

◆ value() [1/4]

template<class Type >
constexpr Type & xentara::data::FixedValue< Type >::value ( ) &
constexpr

Gets the value.

◆ value() [2/4]

template<class Type >
constexpr Type && xentara::data::FixedValue< Type >::value ( ) &&
constexpr

Gets the value.

◆ value() [3/4]

template<class Type >
constexpr const Type & xentara::data::FixedValue< Type >::value ( ) const &
constexpr

Gets the value.

◆ value() [4/4]

template<class Type >
constexpr const Type && xentara::data::FixedValue< Type >::value ( ) const &&
constexpr

Gets the value.