CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ExecutorPriority Struct Reference

Determines the priority to which an executor should schedule its tasks. More...

#include <CeresEngine/Foundation/Threading/ExecutionContext.hpp>

Public Types

using polymorphic_query_result_type = ExecutorPriority
 

Public Member Functions

constexpr ExecutorPriority () noexcept=default
 
constexpr ExecutorPriority (const Int32 raw) noexcept
 

Static Public Member Functions

static constexpr ExecutorPriority interpolate (const double priority)
 Creates a new priority from an a priority range from 0.0 to 1.0, where 0.0 is the lowest priority possible and 1.0 is the highest priority possible.
 
static constexpr ExecutorPriority interpolate (const double priority, const ExecutorPriority &lowest, const ExecutorPriority &highest)
 Creates a new priority from an a priority range from 0.0 to 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority.
 

Public Attributes

Int32 raw = 0
 The raw priority value.
 

Static Public Attributes

static const ExecutorPriority Lowest {std::numeric_limits<Int32>::lowest()}
 The lowest possible executor priority value,.
 
static const ExecutorPriority Low {std::numeric_limits<Int32>::lowest() / 2}
 The default value for low-priority tasks.
 
static const ExecutorPriority Normal {0}
 The default value for regular tasks.
 
static const ExecutorPriority High {std::numeric_limits<Int32>::max() / 2}
 The default value for high-priority tasks.
 
static const ExecutorPriority Highest {std::numeric_limits<Int32>::max()}
 The highest possible executor priority value,.
 
template<typename T >
static constexpr bool is_applicable_property_v = asio::execution::is_executor<T>::value
 
static constexpr bool is_requirable = true
 
static constexpr bool is_preferable = true
 

Friends

constexpr ExecutorPriority operator+ (const Int32 lhs, const ExecutorPriority &rhs) noexcept
 
constexpr ExecutorPriority operator+ (const ExecutorPriority &lhs, const Int32 rhs) noexcept
 
constexpr ExecutorPriority operator- (const Int32 lhs, const ExecutorPriority &rhs) noexcept
 
constexpr ExecutorPriority operator- (const ExecutorPriority &lhs, const Int32 rhs) noexcept
 
constexpr Int32 operator- (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator== (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator!= (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator< (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator> (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator<= (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 
constexpr bool operator>= (const ExecutorPriority &lhs, const ExecutorPriority &rhs) noexcept
 

Detailed Description

Determines the priority to which an executor should schedule its tasks.

Member Typedef Documentation

◆ polymorphic_query_result_type

Constructor & Destructor Documentation

◆ ExecutorPriority() [1/2]

constexpr CeresEngine::ExecutorPriority::ExecutorPriority ( )
constexprdefaultnoexcept

◆ ExecutorPriority() [2/2]

constexpr CeresEngine::ExecutorPriority::ExecutorPriority ( const Int32  raw)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ interpolate() [1/2]

static constexpr ExecutorPriority CeresEngine::ExecutorPriority::interpolate ( const double  priority)
inlinestaticconstexpr

Creates a new priority from an a priority range from 0.0 to 1.0, where 0.0 is the lowest priority possible and 1.0 is the highest priority possible.

Values in between are interpolated between those 2.

◆ interpolate() [2/2]

static constexpr ExecutorPriority CeresEngine::ExecutorPriority::interpolate ( const double  priority,
const ExecutorPriority lowest,
const ExecutorPriority highest 
)
inlinestaticconstexpr

Creates a new priority from an a priority range from 0.0 to 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority.

Values in between are interpolated between those 2.

Friends And Related Symbol Documentation

◆ operator!=

◆ operator+ [1/2]

◆ operator+ [2/2]

◆ operator- [1/3]

◆ operator- [2/3]

◆ operator- [3/3]

◆ operator<

◆ operator<=

◆ operator==

◆ operator>

◆ operator>=

Member Data Documentation

◆ High

constexpr ExecutorPriority CeresEngine::ExecutorPriority::High {std::numeric_limits<Int32>::max() / 2}
inlinestaticconstexpr

The default value for high-priority tasks.

◆ Highest

constexpr ExecutorPriority CeresEngine::ExecutorPriority::Highest {std::numeric_limits<Int32>::max()}
inlinestaticconstexpr

The highest possible executor priority value,.

◆ is_applicable_property_v

template<typename T >
constexpr bool CeresEngine::ExecutorPriority::is_applicable_property_v = asio::execution::is_executor<T>::value
staticconstexpr

◆ is_preferable

constexpr bool CeresEngine::ExecutorPriority::is_preferable = true
staticconstexpr

◆ is_requirable

constexpr bool CeresEngine::ExecutorPriority::is_requirable = true
staticconstexpr

◆ Low

constexpr ExecutorPriority CeresEngine::ExecutorPriority::Low {std::numeric_limits<Int32>::lowest() / 2}
inlinestaticconstexpr

The default value for low-priority tasks.

◆ Lowest

constexpr ExecutorPriority CeresEngine::ExecutorPriority::Lowest {std::numeric_limits<Int32>::lowest()}
inlinestaticconstexpr

The lowest possible executor priority value,.

◆ Normal

constexpr ExecutorPriority CeresEngine::ExecutorPriority::Normal {0}
inlinestaticconstexpr

The default value for regular tasks.

◆ raw

Int32 CeresEngine::ExecutorPriority::raw = 0

The raw priority value.


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