plugify  1.0.0.0
Functions
plugify::ValueUtils Namespace Reference

Namespace containing utility functions of ValueType enum. More...

Functions

template<typename T >
constexpr bool IsBetween (T x, T a, T b) noexcept
 Checks if a value is between two other values. More...
 
constexpr bool IsVoid (ValueType type) noexcept
 Tests whether a given type is ValueType::Void. More...
 
constexpr bool IsValid (ValueType type) noexcept
 Tests whether a given type is a valid non-void type. More...
 
constexpr bool IsScalar (ValueType type) noexcept
 Tests whether a given type is scalar (has no vector part). More...
 
constexpr bool IsFloating (ValueType type) noexcept
 Tests whether a given type is a scalar floating point of any size. More...
 
constexpr bool IsBool (ValueType type) noexcept
 Tests whether a given type is a 1-bit boolean. More...
 
constexpr bool IsChar8 (ValueType type) noexcept
 Tests whether a given type is an 8-bit character. More...
 
constexpr bool IsChar16 (ValueType type) noexcept
 Tests whether a given type is a 16-bit character. More...
 
constexpr bool IsInt8 (ValueType type) noexcept
 Tests whether a given type is an 8-bit integer. More...
 
constexpr bool IsUInt8 (ValueType type) noexcept
 Tests whether a given type is an 8-bit unsigned integer. More...
 
constexpr bool IsInt16 (ValueType type) noexcept
 Tests whether a given type is a 16-bit integer. More...
 
constexpr bool IsUInt16 (ValueType type) noexcept
 Tests whether a given type is a 16-bit unsigned integer. More...
 
constexpr bool IsInt32 (ValueType type) noexcept
 Tests whether a given type is a 32-bit integer. More...
 
constexpr bool IsUInt32 (ValueType type) noexcept
 Tests whether a given type is a 32-bit unsigned integer. More...
 
constexpr bool IsInt64 (ValueType type) noexcept
 Tests whether a given type is a 64-bit integer. More...
 
constexpr bool IsUInt64 (ValueType type) noexcept
 Tests whether a given type is a 64-bit unsigned integer. More...
 
constexpr bool IsPointer (ValueType type) noexcept
 Tests whether a given type is a pointer. More...
 
constexpr bool IsFloat (ValueType type) noexcept
 Tests whether a given type is a float. More...
 
constexpr bool IsDouble (ValueType type) noexcept
 Tests whether a given type is a double. More...
 
constexpr bool IsFunction (ValueType type) noexcept
 Tests whether a given type is a C-function pointer. More...
 
constexpr bool IsString (ValueType type) noexcept
 Tests whether a given type is a string. More...
 
constexpr bool IsAny (ValueType type) noexcept
 Tests whether a given type is an any. More...
 
constexpr bool IsObject (ValueType type) noexcept
 Tests whether a given type is an object of any size. More...
 
constexpr bool IsArray (ValueType type) noexcept
 Tests whether a given type is an array of any size. More...
 
constexpr bool IsStruct (ValueType type) noexcept
 Tests whether a given type is a POD (plain old data) structure of any size. More...
 
constexpr bool IsHiddenParam (ValueType type) noexcept
 Checks if a given ValueType is considered a hidden object parameter. More...
 
constexpr std::string_view ToString (ValueType value) noexcept
 Convert a ValueType enum value to its string representation. More...
 
constexpr ValueType FromString (std::string_view value) noexcept
 Convert a string representation to a ValueType enum value. More...
 

Detailed Description

Namespace containing utility functions of ValueType enum.

Function Documentation

◆ FromString()

constexpr ValueType plugify::ValueUtils::FromString ( std::string_view  value)
constexprnoexcept

Convert a string representation to a ValueType enum value.

Parameters
valueThe string representation of ValueType.
Returns
The corresponding ValueType enum value.

Definition at line 441 of file value_type.hpp.

◆ IsAny()

constexpr bool plugify::ValueUtils::IsAny ( ValueType  type)
constexprnoexcept

Tests whether a given type is an any.

Parameters
typeThe type to test.
Returns
True if type is an any. False otherwise.

Definition at line 342 of file value_type.hpp.

◆ IsArray()

constexpr bool plugify::ValueUtils::IsArray ( ValueType  type)
constexprnoexcept

Tests whether a given type is an array of any size.

Parameters
typeThe type to test.
Returns
True if type is an array. False otherwise.

Definition at line 358 of file value_type.hpp.

◆ IsBetween()

template<typename T >
constexpr bool plugify::ValueUtils::IsBetween ( x,
a,
b 
)
constexprnoexcept

Checks if a value is between two other values.

Template Parameters
TThe type of the values.
Parameters
xThe value to check.
aThe lower bound.
bThe upper bound.
Returns
True if x is between a and b, inclusive. False otherwise.

Definition at line 172 of file value_type.hpp.

◆ IsBool()

constexpr bool plugify::ValueUtils::IsBool ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 1-bit boolean.

Parameters
typeThe type to test.
Returns
True if type is a 1-bit boolean. False otherwise.

Definition at line 214 of file value_type.hpp.

◆ IsChar16()

constexpr bool plugify::ValueUtils::IsChar16 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 16-bit character.

Parameters
typeThe type to test.
Returns
True if type is a 16-bit character. False otherwise.

Definition at line 230 of file value_type.hpp.

◆ IsChar8()

constexpr bool plugify::ValueUtils::IsChar8 ( ValueType  type)
constexprnoexcept

Tests whether a given type is an 8-bit character.

Parameters
typeThe type to test.
Returns
True if type is an 8-bit character. False otherwise.

Definition at line 222 of file value_type.hpp.

◆ IsDouble()

constexpr bool plugify::ValueUtils::IsDouble ( ValueType  type)
constexprnoexcept

Tests whether a given type is a double.

Parameters
typeThe type to test.
Returns
True if type is a double. False otherwise.

Definition at line 318 of file value_type.hpp.

◆ IsFloat()

constexpr bool plugify::ValueUtils::IsFloat ( ValueType  type)
constexprnoexcept

Tests whether a given type is a float.

Parameters
typeThe type to test.
Returns
True if type is a float. False otherwise.

Definition at line 310 of file value_type.hpp.

◆ IsFloating()

constexpr bool plugify::ValueUtils::IsFloating ( ValueType  type)
constexprnoexcept

Tests whether a given type is a scalar floating point of any size.

Parameters
typeThe type to test.
Returns
True if type is a scalar floating point. False otherwise.

Definition at line 206 of file value_type.hpp.

◆ IsFunction()

constexpr bool plugify::ValueUtils::IsFunction ( ValueType  type)
constexprnoexcept

Tests whether a given type is a C-function pointer.

Parameters
typeThe type to test.
Returns
True if type is a C-function pointer. False otherwise.

Definition at line 326 of file value_type.hpp.

◆ IsHiddenParam()

constexpr bool plugify::ValueUtils::IsHiddenParam ( ValueType  type)
constexprnoexcept

Checks if a given ValueType is considered a hidden object parameter.

Parameters
typeThe ValueType to check.
Returns
true if considered a hidden object parameter, false otherwise.

This function determines if the provided ValueType is typically treated as a hidden object parameter. Hidden object parameters are those where the return argument is allocated by the caller function and passed as the first argument. This is often true for objects and large structs.

Definition at line 379 of file value_type.hpp.

◆ IsInt16()

constexpr bool plugify::ValueUtils::IsInt16 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 16-bit integer.

Parameters
typeThe type to test.
Returns
True if type is a 16-bit integer. False otherwise.

Definition at line 254 of file value_type.hpp.

◆ IsInt32()

constexpr bool plugify::ValueUtils::IsInt32 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 32-bit integer.

Parameters
typeThe type to test.
Returns
True if type is a 32-bit integer. False otherwise.

Definition at line 270 of file value_type.hpp.

◆ IsInt64()

constexpr bool plugify::ValueUtils::IsInt64 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 64-bit integer.

Parameters
typeThe type to test.
Returns
True if type is a 64-bit integer. False otherwise.

Definition at line 286 of file value_type.hpp.

◆ IsInt8()

constexpr bool plugify::ValueUtils::IsInt8 ( ValueType  type)
constexprnoexcept

Tests whether a given type is an 8-bit integer.

Parameters
typeThe type to test.
Returns
True if type is an 8-bit integer. False otherwise.

Definition at line 238 of file value_type.hpp.

◆ IsObject()

constexpr bool plugify::ValueUtils::IsObject ( ValueType  type)
constexprnoexcept

Tests whether a given type is an object of any size.

Parameters
typeThe type to test.
Returns
True if type is an object. False otherwise.

Definition at line 350 of file value_type.hpp.

◆ IsPointer()

constexpr bool plugify::ValueUtils::IsPointer ( ValueType  type)
constexprnoexcept

Tests whether a given type is a pointer.

Parameters
typeThe type to test.
Returns
True if type is a pointer. False otherwise.

Definition at line 302 of file value_type.hpp.

◆ IsScalar()

constexpr bool plugify::ValueUtils::IsScalar ( ValueType  type)
constexprnoexcept

Tests whether a given type is scalar (has no vector part).

Parameters
typeThe type to test.
Returns
True if type is scalar. False otherwise.

Definition at line 198 of file value_type.hpp.

◆ IsString()

constexpr bool plugify::ValueUtils::IsString ( ValueType  type)
constexprnoexcept

Tests whether a given type is a string.

Parameters
typeThe type to test.
Returns
True if type is a string. False otherwise.

Definition at line 334 of file value_type.hpp.

◆ IsStruct()

constexpr bool plugify::ValueUtils::IsStruct ( ValueType  type)
constexprnoexcept

Tests whether a given type is a POD (plain old data) structure of any size.

Parameters
typeThe type to test.
Returns
True if type is a POD structure. False otherwise.

Definition at line 366 of file value_type.hpp.

◆ IsUInt16()

constexpr bool plugify::ValueUtils::IsUInt16 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 16-bit unsigned integer.

Parameters
typeThe type to test.
Returns
True if type is a 16-bit unsigned integer. False otherwise.

Definition at line 262 of file value_type.hpp.

◆ IsUInt32()

constexpr bool plugify::ValueUtils::IsUInt32 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 32-bit unsigned integer.

Parameters
typeThe type to test.
Returns
True if type is a 32-bit unsigned integer. False otherwise.

Definition at line 278 of file value_type.hpp.

◆ IsUInt64()

constexpr bool plugify::ValueUtils::IsUInt64 ( ValueType  type)
constexprnoexcept

Tests whether a given type is a 64-bit unsigned integer.

Parameters
typeThe type to test.
Returns
True if type is a 64-bit unsigned integer. False otherwise.

Definition at line 294 of file value_type.hpp.

◆ IsUInt8()

constexpr bool plugify::ValueUtils::IsUInt8 ( ValueType  type)
constexprnoexcept

Tests whether a given type is an 8-bit unsigned integer.

Parameters
typeThe type to test.
Returns
True if type is an 8-bit unsigned integer. False otherwise.

Definition at line 246 of file value_type.hpp.

◆ IsValid()

constexpr bool plugify::ValueUtils::IsValid ( ValueType  type)
constexprnoexcept

Tests whether a given type is a valid non-void type.

Parameters
typeThe type to test.
Returns
True if type is a valid non-void type. False otherwise.

Definition at line 190 of file value_type.hpp.

◆ IsVoid()

constexpr bool plugify::ValueUtils::IsVoid ( ValueType  type)
constexprnoexcept

Tests whether a given type is ValueType::Void.

Parameters
typeThe type to test.
Returns
True if type is ValueType::Void. False otherwise.

Definition at line 182 of file value_type.hpp.

◆ ToString()

constexpr std::string_view plugify::ValueUtils::ToString ( ValueType  value)
constexprnoexcept

Convert a ValueType enum value to its string representation.

Parameters
valueThe ValueType value to convert.
Returns
The string representation of the ValueType.

Definition at line 388 of file value_type.hpp.