HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends
tt::ranged_numeric< T, A, B > Class Template Reference

#include <ttauri/ranged_numeric.hpp>

Public Types

using value_type = T
 

Public Member Functions

constexpr ranged_numeric (ranged_numeric const &rhs) noexcept=default
 
constexpr ranged_numeric (ranged_numeric &&rhs) noexcept=default
 
constexpr ranged_numericoperator= (ranged_numeric const &rhs) noexcept=default
 
constexpr ranged_numericoperator= (ranged_numeric &&rhs) noexcept=default
 
constexpr operator value_type () noexcept
 
constexpr ranged_numeric (signed long long rhs) noexcept
 
constexpr ranged_numeric (unsigned long long rhs) noexcept
 
constexpr ranged_numeric (signed long rhs) noexcept
 
constexpr ranged_numeric (unsigned long rhs) noexcept
 
constexpr ranged_numeric (signed int rhs) noexcept
 
constexpr ranged_numeric (unsigned int rhs) noexcept
 
constexpr ranged_numeric (signed short rhs) noexcept
 
constexpr ranged_numeric (unsigned short rhs) noexcept
 
constexpr ranged_numeric (signed char rhs) noexcept
 
constexpr ranged_numeric (unsigned char rhs) noexcept
 
constexpr ranged_numericoperator++ () noexcept
 
constexpr ranged_numericoperator-- () noexcept
 

Static Public Member Functions

static constexpr auto range () noexcept
 

Static Public Attributes

static constexpr int value_min = (B == A) ? 0 : A
 
static constexpr int value_max = (B == A) ? A : B
 

Friends

bool operator== (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 
bool operator!= (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 
bool operator< (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 
bool operator> (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 
bool operator<= (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 
bool operator>= (ranged_numeric const &lhs, ranged_numeric const &rhs) noexcept
 

Detailed Description

template<typename T, T A, T B = A>
class tt::ranged_numeric< T, A, B >

A ranged integer.

This is an integer value that must stay within its minimum and maximum value.

Template Parameters
AWhen only one parameter is given one beyond the maximum value. When both parameters are given the minimum value.
BOne beyond the maximum value.

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