plugify 1.2.8
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
plugify::ValueUtils Struct Reference

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

#include <value_type.hpp>

Static Public Member Functions

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

Detailed Description

Namespace containing utility functions of ValueType enum.

Definition at line 162 of file value_type.hpp.

Member Function Documentation

◆ IsAny()

static constexpr bool plugify::ValueUtils::IsAny ( ValueType  type)
inlinestaticconstexprnoexcept

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 384 of file value_type.hpp.

◆ IsArray()

static constexpr bool plugify::ValueUtils::IsArray ( ValueType  type)
inlinestaticconstexprnoexcept

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 404 of file value_type.hpp.

◆ IsBetween()

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

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 174 of file value_type.hpp.

◆ IsBool()

static constexpr bool plugify::ValueUtils::IsBool ( ValueType  type)
inlinestaticconstexprnoexcept

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 224 of file value_type.hpp.

◆ IsChar16()

static constexpr bool plugify::ValueUtils::IsChar16 ( ValueType  type)
inlinestaticconstexprnoexcept

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 244 of file value_type.hpp.

◆ IsChar8()

static constexpr bool plugify::ValueUtils::IsChar8 ( ValueType  type)
inlinestaticconstexprnoexcept

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 234 of file value_type.hpp.

◆ IsDouble()

static constexpr bool plugify::ValueUtils::IsDouble ( ValueType  type)
inlinestaticconstexprnoexcept

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 354 of file value_type.hpp.

◆ IsFloat()

static constexpr bool plugify::ValueUtils::IsFloat ( ValueType  type)
inlinestaticconstexprnoexcept

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 344 of file value_type.hpp.

◆ IsFloating()

static constexpr bool plugify::ValueUtils::IsFloating ( ValueType  type)
inlinestaticconstexprnoexcept

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 214 of file value_type.hpp.

◆ IsFunction()

static constexpr bool plugify::ValueUtils::IsFunction ( ValueType  type)
inlinestaticconstexprnoexcept

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 364 of file value_type.hpp.

◆ IsHiddenParam()

static constexpr bool plugify::ValueUtils::IsHiddenParam ( ValueType  type)
inlinestaticconstexprnoexcept

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 429 of file value_type.hpp.

◆ IsInt16()

static constexpr bool plugify::ValueUtils::IsInt16 ( ValueType  type)
inlinestaticconstexprnoexcept

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 274 of file value_type.hpp.

◆ IsInt32()

static constexpr bool plugify::ValueUtils::IsInt32 ( ValueType  type)
inlinestaticconstexprnoexcept

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 294 of file value_type.hpp.

◆ IsInt64()

static constexpr bool plugify::ValueUtils::IsInt64 ( ValueType  type)
inlinestaticconstexprnoexcept

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 314 of file value_type.hpp.

◆ IsInt8()

static constexpr bool plugify::ValueUtils::IsInt8 ( ValueType  type)
inlinestaticconstexprnoexcept

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 254 of file value_type.hpp.

◆ IsObject()

static constexpr bool plugify::ValueUtils::IsObject ( ValueType  type)
inlinestaticconstexprnoexcept

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 394 of file value_type.hpp.

◆ IsPointer()

static constexpr bool plugify::ValueUtils::IsPointer ( ValueType  type)
inlinestaticconstexprnoexcept

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 334 of file value_type.hpp.

◆ IsScalar()

static constexpr bool plugify::ValueUtils::IsScalar ( ValueType  type)
inlinestaticconstexprnoexcept

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 204 of file value_type.hpp.

◆ IsString()

static constexpr bool plugify::ValueUtils::IsString ( ValueType  type)
inlinestaticconstexprnoexcept

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 374 of file value_type.hpp.

◆ IsStruct()

static constexpr bool plugify::ValueUtils::IsStruct ( ValueType  type)
inlinestaticconstexprnoexcept

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 414 of file value_type.hpp.

◆ IsUInt16()

static constexpr bool plugify::ValueUtils::IsUInt16 ( ValueType  type)
inlinestaticconstexprnoexcept

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 284 of file value_type.hpp.

◆ IsUInt32()

static constexpr bool plugify::ValueUtils::IsUInt32 ( ValueType  type)
inlinestaticconstexprnoexcept

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 304 of file value_type.hpp.

◆ IsUInt64()

static constexpr bool plugify::ValueUtils::IsUInt64 ( ValueType  type)
inlinestaticconstexprnoexcept

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 324 of file value_type.hpp.

◆ IsUInt8()

static constexpr bool plugify::ValueUtils::IsUInt8 ( ValueType  type)
inlinestaticconstexprnoexcept

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 264 of file value_type.hpp.

◆ IsValid()

static constexpr bool plugify::ValueUtils::IsValid ( ValueType  type)
inlinestaticconstexprnoexcept

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 194 of file value_type.hpp.

◆ IsVoid()

static constexpr bool plugify::ValueUtils::IsVoid ( ValueType  type)
inlinestaticconstexprnoexcept

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 184 of file value_type.hpp.

◆ SizeOf()

static constexpr size_t plugify::ValueUtils::SizeOf ( ValueType  type)
inlinestaticconstexprnoexcept

Returns the size in bytes of the given ValueType.

Note: For arrays, this returns the size of the container (std::vector), not the size of the elements inside.

Parameters
typeThe ValueType to check.
Returns
The size in bytes of the corresponding C++ type.

Definition at line 442 of file value_type.hpp.


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