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

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 440 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 341 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 357 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 171 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 213 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 229 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 221 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 317 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 309 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 205 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 325 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 378 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 253 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 269 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 285 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 237 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 349 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 301 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 197 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 333 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 365 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 261 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 277 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 293 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 245 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 189 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 181 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 387 of file value_type.hpp.