![]() |
ToyGine2 26.2.0
Game Engine for retro consoles
|
Root namespace containing all engine modules. More...
Namespaces | |
| namespace | application |
| Application-level types and utilities (version, etc.). | |
| namespace | anonymous_namespace{format_pattern.inl} |
| namespace | geometry |
| Geometry types and utilities: sections (intervals), circles, ellipses, and related APIs. | |
| namespace | math |
| Mathematical types, constants, and utilities: fixed-point, vectors, point. | |
| namespace | network |
| Network types: endpoint, socket error, flags, statistics, type, and related APIs. | |
| namespace | assertion |
| Configurable assertion failure handling and optional stack trace. | |
| namespace | render |
| Rendering types and utilities: clear flags, pixel formats, and related APIs. | |
| namespace | audio |
| Audio types and utilities: volume categories, mixing, and related APIs. | |
| namespace | filesystem |
| Filesystem types and utilities: file open modes, paths, and related APIs. | |
| namespace | game |
| Game types and utilities: achievement state and related APIs. | |
| namespace | platform |
Classes | |
| struct | _divmod10 |
| class | EnableBitwiseOperators |
| Primary template: disables generic bitwise operators for T unless specialized. More... | |
| class | CStringView |
| Non-owning string view class for C-style strings. More... | |
| class | CallbacksPool |
| Fixed-capacity array of function pointers for observer-style notification. More... | |
| struct | FixedStringStorage |
| class | FixedString |
| Template string class with fixed-size character buffer. More... | |
| class | FixedVector |
| class | FormatString |
Wrapper around a toy::CStringView pattern with consteval validation of placeholders. More... | |
| class | OStringStream |
| Output stream that appends formatted values into a toy::StringLike backend. More... | |
| class | StringFixedStorage |
Fixed-size character storage with a tracked length and implicit null terminator at data()[size()]. More... | |
| class | array |
| STL class. More... | |
Concepts | |
| concept | StringLike |
Concept satisfied when T exposes size() as size_t and c_str() as a pointer to null-terminated characters. | |
Enumerations | |
| enum class | FormatPatternValidationError { FormatPatternValidationError::none , FormatPatternValidationError::unmatchedBrace , FormatPatternValidationError::invalidContent , FormatPatternValidationError::mixedPlaceholders , FormatPatternValidationError::argCountMismatch , FormatPatternValidationError::indexOutOfRange } |
| Result of validating a format pattern against an expected argument count. More... | |
| enum class | Platform : uint16_t { Windows = 0x1000 , Linux = 0x2000 , macOS = 0x3000 , iOS = 0x3100 , Android = 0x4000 , GBA = 0x5000 , NDS = 0x6000 , N3DS = 0x7000 , Switch = 0x8000 } |
| Target operating system or platform identifier. More... | |
| enum class | CpuArchitecture : uint16_t { x86 = 0x0014 , x64 = 0x0018 , Arm32 = 0x0024 , Arm64 = 0x0028 , Unknown = 0x0000 } |
| CPU or instruction-set architecture identifier. More... | |
Functions | |
| template<typename T> | |
| constexpr T | operator| (T lhs, T rhs) noexcept |
| Computes bitwise OR on the underlying integers, then casts back to T. | |
| template<typename T> | |
| constexpr T | operator& (T lhs, T rhs) noexcept |
| Computes bitwise AND on the underlying integers, then casts back to T. | |
| template<typename T> | |
| constexpr T | operator^ (T lhs, T rhs) noexcept |
| Computes bitwise XOR on the underlying integers, then casts back to T. | |
| template<typename T> | |
| constexpr T | operator~ (T lhs) noexcept |
| Computes bitwise NOT of the underlying integer, then casts back to T. | |
| template<typename T> | |
| constexpr T & | operator|= (T &lhs, T rhs) noexcept |
| Compound OR: lhs becomes lhs | rhs. | |
| template<typename T> | |
| constexpr T & | operator&= (T &lhs, T rhs) noexcept |
| Compound AND: lhs becomes lhs & rhs. | |
| template<typename T> | |
| constexpr T & | operator^= (T &lhs, T rhs) noexcept |
| Compound XOR: lhs becomes lhs ^ rhs. | |
| constexpr bool | operator== (const CStringView &lhs, const CStringView &rhs) |
| template<StringLike stringType> | |
| constexpr bool | operator== (const CStringView &lhs, const stringType &rhs) |
| template<StringLike stringType> | |
| constexpr bool | operator== (const stringType &lhs, const CStringView &rhs) |
| constexpr bool | operator== (const CStringView &lhs, const char *rhs) |
| constexpr bool | operator== (const char *lhs, const CStringView &rhs) |
| constexpr strong_ordering | operator<=> (const CStringView &lhs, const CStringView &rhs) |
| template<StringLike stringType> | |
| constexpr strong_ordering | operator<=> (const CStringView &lhs, const stringType &rhs) |
| template<StringLike stringType> | |
| constexpr strong_ordering | operator<=> (const stringType &lhs, const CStringView &rhs) |
| constexpr strong_ordering | operator<=> (const CStringView &lhs, const char *rhs) |
| constexpr strong_ordering | operator<=> (const char *lhs, const CStringView &rhs) |
| constexpr int | cstrcmp (const char *lhs, const char *rhs) noexcept |
| Compares two C strings lexicographically. | |
| constexpr const char * | cstrchr (const char *str, int ch) noexcept |
| Finds the first occurrence of a character in a C string. | |
| constexpr const char * | cstrpbrk (const char *str, const char *accept) noexcept |
| Finds the first occurrence of any character from a set in a C string. | |
| constexpr const char * | cstrstr (const char *haystack, const char *needle) noexcept |
| Finds the first occurrence of a substring in a C string. | |
| template<size_t allocatedSize1, size_t allocatedSize2> | |
| constexpr FixedString< allocatedSize1 > | operator+ (const FixedString< allocatedSize1 > &lhs, const FixedString< allocatedSize2 > &rhs) noexcept |
| Concatenation operator for two FixedString objects. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr FixedString< allocatedSize > | operator+ (const FixedString< allocatedSize > &lhs, const stringType &rhs) noexcept |
| Concatenation operator for FixedString and toy::StringLike object. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr FixedString< allocatedSize > | operator+ (const stringType &lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Concatenation operator for toy::StringLike object and FixedString. | |
| template<size_t allocatedSize> | |
| constexpr FixedString< allocatedSize > | operator+ (const FixedString< allocatedSize > &lhs, const char *rhs) noexcept |
| Concatenation operator for FixedString and C-string. | |
| template<size_t allocatedSize> | |
| constexpr FixedString< allocatedSize > | operator+ (const char *lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Concatenation operator for C-string and FixedString. | |
| template<size_t allocatedSize> | |
| constexpr FixedString< allocatedSize > | operator+ (const FixedString< allocatedSize > &lhs, char rhs) noexcept |
| Concatenation operator for FixedString and character. | |
| template<size_t allocatedSize> | |
| constexpr FixedString< allocatedSize > | operator+ (char lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Concatenation operator for character and FixedString. | |
| template<size_t allocatedSize1, size_t allocatedSize2> | |
| constexpr bool | operator== (const FixedString< allocatedSize1 > &lhs, const FixedString< allocatedSize2 > &rhs) noexcept |
| Equality comparison operator for two FixedString objects. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr bool | operator== (const FixedString< allocatedSize > &lhs, const stringType &rhs) noexcept |
| Equality comparison operator for FixedString and toy::StringLike object. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr bool | operator== (const stringType &lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Equality comparison operator for toy::StringLike object and FixedString. | |
| template<size_t allocatedSize> | |
| constexpr bool | operator== (const FixedString< allocatedSize > &lhs, const char *rhs) noexcept |
| Equality comparison operator for FixedString and C string. | |
| template<size_t allocatedSize> | |
| constexpr bool | operator== (const char *lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Equality comparison operator for C string and FixedString. | |
| template<size_t allocatedSize1, size_t allocatedSize2> | |
| constexpr strong_ordering | operator<=> (const FixedString< allocatedSize1 > &lhs, const FixedString< allocatedSize2 > &rhs) noexcept |
| Three-way comparison operator for FixedString objects. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr strong_ordering | operator<=> (const FixedString< allocatedSize > &lhs, const stringType &rhs) noexcept |
| Three-way comparison operator for FixedString and toy::StringLike object. | |
| template<size_t allocatedSize, StringLike stringType> | |
| constexpr strong_ordering | operator<=> (const stringType &lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Three-way comparison operator for toy::StringLike object and FixedString. | |
| template<size_t allocatedSize> | |
| constexpr strong_ordering | operator<=> (const FixedString< allocatedSize > &lhs, const char *rhs) noexcept |
| Three-way comparison operator for FixedString and C string. | |
| template<size_t allocatedSize> | |
| constexpr strong_ordering | operator<=> (const char *lhs, const FixedString< allocatedSize > &rhs) noexcept |
| Three-way comparison operator for C string and FixedString. | |
| constexpr FormatPatternValidationError | validateFormatPattern (const CStringView &string, size_t argCount) noexcept |
Validates auto-indexed {} and positional {N} placeholders for argCount arguments. | |
| constexpr wchar_t * | utf8toWChar (wchar_t *dest, size_t destSize, const char *src) noexcept |
| Converts a UTF-8 C string to a wide-character string (full source length). | |
| template<StringLike T> | |
| constexpr wchar_t * | utf8toWChar (wchar_t *dest, size_t destSize, const T &src) noexcept |
| Converts a UTF-8 toy::StringLike object to a wide-character string. | |
| constexpr char * | reverseString (char *str, size_t count=0) noexcept |
| Reverses a C string in-place. | |
| template<std::signed_integral T> | |
| constexpr char * | itoa (char *dest, size_t destSize, T value) noexcept |
| Converts a signed integer to its decimal C string representation. | |
| template<std::unsigned_integral T> | |
| constexpr char * | utoa (char *dest, size_t destSize, T value, unsigned base=10) noexcept |
| Converts an unsigned integer to its C string representation in the given base. | |
| size_t | highestBit (uint64_t value) noexcept |
| Returns the 0-based index of the highest set bit in value. | |
| uint8_t | crc8 (const void *src, size_t size, uint8_t crc=0x00) noexcept |
| Computes Dallas/Maxim CRC-8 (polynomial 0x31, reflected 8-bit CRC). | |
| uint16_t | crc16 (const void *src, size_t size, uint16_t crc=0x0000) noexcept |
| Computes CRC-16-IBM / ARC (polynomial 0x8005, reflected). | |
| uint32_t | crc32 (const void *src, size_t size, uint32_t crc=0x00000000) noexcept |
| Computes CRC-32 per IEEE 802.3 / Ethernet (polynomial 0x04C11DB7, reflected). | |
| constexpr _divmod10 | _divModU10 (uint32_t value) noexcept |
| Divides a given 32-bit unsigned integer by 10 and returns the quotient and remainder. | |
| constexpr int32_t | _ftoa32Engine (char *buffer, float value, size_t precision) noexcept |
| Converts a floating-point number to its string representation in a specified precision. | |
| constexpr int32_t | _ftoa64Engine (char *buffer, double value, size_t precision) noexcept |
| Converts a 64-bit floating-point number to its string representation with specified precision. | |
| void | _floatPostProcess (char *dest, char *srcBuffer, size_t bufferSize, int32_t exp10, size_t precision) noexcept |
| Processes a string representation of a floating-point number, adjusting the exponent, and stripping trailing zeros. | |
| wchar_t * | utf8toWChar (wchar_t *dest, size_t destSize, const char *src, size_t count) noexcept |
| Converts a UTF-8 C string to a wide-character string with a character count limit. | |
| char * | wcharToUtf8 (char *dest, size_t destSize, const wchar_t *src) noexcept |
| Converts a wide-character C string to UTF-8. | |
| size_t | utf8Len (const char *string) noexcept |
| Returns the number of Unicode code points in a UTF-8 encoded C string. | |
| char * | ftoa (char *dest, size_t destSize, float value, size_t precision=7) noexcept |
Converts a float to its decimal C string representation with specified precision. | |
| char * | ftoa (char *dest, size_t destSize, double value, size_t precision=15) noexcept |
Converts a double to its decimal C string representation with specified precision. | |
| void | formatNumberString (char *buffer, size_t bufferSize, const char *separator) noexcept |
| Inserts a grouping separator into a number C string every three digits from the right. | |
Variables | |
| static constexpr array< uint8_t, 256 > | _crc8Table |
| CRC-8 lookup table using Dallas/Maxim polynomial (0x31). | |
| static constexpr array< uint16_t, 256 > | _crc16Table |
| CRC-16 lookup table using IBM/ARC polynomial (0x8005). | |
| static constexpr array< uint32_t, 256 > | _crc32Table |
| CRC-32 lookup table using IEEE 802.3 polynomial (0x04C11DB7). | |
| static constexpr array< uint8_t, 256 > | _utf8CharSizeTable |
| UTF-8 character size lookup table for efficient UTF-8 parsing. | |
| constexpr array< uint32_t, 32 > | _exponentTable |
| Precomputed exponent lookup table for efficient binary-to-decimal floating-point conversion. | |
| constexpr size_t | _decimalDigitsPerGroup = 3 |
Number of decimal digits per group when formatNumberString() inserts the caller-supplied separator. | |
| constexpr size_t | WCHAR_IN_UTF8_MAX_SIZE = 3 |
| Maximum UTF-8 byte length for one BMP character. | |
Root namespace containing all engine modules.
|
strong |
CPU or instruction-set architecture identifier.
Hex values in distinct ranges (Intel 0x0014- ARM 0x0018,0x0024- allow compile-time checks and combination with toy::Platform for platform-and-architecture conditional code.0x0028)
if constexpr conditional compilation.
|
strong |
Target operating system or platform identifier.
Hex values in distinct ranges (desktop 0x1000- mobile 0x3000,0x3100- consoles 0x4000,0x5000- allow compile-time 0x8000)if constexpr and combination with toy::CpuArchitecture.
if constexpr conditional compilation.0x3100) shares the Apple range with macOS (0x3000).
|
constexprnoexcept |
Divides a given 32-bit unsigned integer by 10 and returns the quotient and remainder.
The function approximates division by 10 using a sequence of shift-and-add operations to compute the quotient, then derives the remainder and corrects it if needed. It returns both quotient and remainder.
| value | The 32-bit unsigned integer to divide by 10. |
|
noexcept |
Processes a string representation of a floating-point number, adjusting the exponent, and stripping trailing zeros.
This function processes a string representation of a floating-point number, adjusting the exponent according to the given precision, and stripping trailing zeros. The function also handles the case of negative zero.
| dest | The destination buffer where the processed string is stored. |
| srcBuffer | The source buffer containing the string representation of a floating-point number. |
| bufferSize | The size of the source buffer. |
| exp10 | The exponent of the floating-point number in the given precision. |
| precision | The number of decimal places to include in the representation. |
|
constexprnoexcept |
Converts a floating-point number to its string representation in a specified precision.
The output is always sign-prefixed ('+' or '-') and normalized as "+0.<digits>" or "-0.<digits>".
This function converts a given floating-point number into its string representation, storing the result in the provided destination buffer. The function rounds the result to the given precision and stores the exponent in the return value.
| value | The floating-point number to be converted. |
| buffer | The destination buffer where the converted string is stored. |
| precision | The precision (digits after the decimal point). For IEEE-754 f32, practical precision is ~7–9 digits. |
|
constexprnoexcept |
Converts a 64-bit floating-point number to its string representation with specified precision.
The output is always sign-prefixed ('+' or '-') and normalized as "+0.<digits>" or "-0.<digits>".
This function converts a given 64-bit floating-point number into its string representation, storing the result in the provided buffer. The conversion includes handling special cases such as subnormals, NaN, and infinity. The output is formatted according to the specified precision.
| buffer | The destination buffer where the converted string is stored. |
| value | The 64-bit floating-point number to be converted. |
| precision | The number of decimal places to include in the representation. |
|
nodiscardnoexcept |
Computes CRC-16-IBM / ARC (polynomial 0x8005, reflected).
Processes bytes from low to high address. The crc argument carries state for chained updates: first chunk uses the default initial value, subsequent chunks pass the previous result as crc.
| src | Pointer to the first byte; must not be null (asserted in debug). |
| size | Byte length of the range. |
| crc | Running CRC; default initial value 0x0000. |
0, the return value equals the initial crc argument (no input bytes).
|
nodiscardnoexcept |
Computes CRC-32 per IEEE 802.3 / Ethernet (polynomial 0x04C11DB7, reflected).
Processes bytes from low to high address. The crc argument carries state for chained updates: first chunk uses the default initial value, subsequent chunks pass the previous result as crc.
| src | Pointer to the first byte; must not be null (asserted in debug). |
| size | Byte length of the range. |
| crc | Running CRC; default initial value 0x00000000. |
0, the return value equals the initial crc argument (no input bytes).
|
nodiscardnoexcept |
Computes Dallas/Maxim CRC-8 (polynomial 0x31, reflected 8-bit CRC).
Processes bytes from low to high address. The crc argument carries state for chained updates: first chunk uses the default initial value, subsequent chunks pass the previous result as crc.
| src | Pointer to the first byte; must not be null (asserted in debug). |
| size | Byte length of the range. |
| crc | Running CRC; default initial value 0x00. |
0, the return value equals the initial crc argument (no input bytes).
|
nodiscardconstexprnoexcept |
Finds the first occurrence of a character in a C string.
This function searches for the first occurrence of the character ch within the string str. The search is performed character by character from the beginning of the string and returns a pointer to the first occurrence, or nullptr if the character is not found. This function is designed to be constexpr-compatible and provides the same behavior as std::strchr but can be evaluated at compile time.
| str | The C string to search in. |
| ch | The character to search for. |
|
nodiscardconstexprnoexcept |
Compares two C strings lexicographically.
This function performs a lexicographic comparison between two C strings. The comparison is performed character by character using the character's numeric value. This function is designed to be constexpr-compatible and provides the same behavior as std::strcmp but can be evaluated at compile time.
| lhs | The left-hand side C string to compare. |
| rhs | The right-hand side C string to compare. |
std::strcmp which returns arithmetic difference).
|
nodiscardconstexprnoexcept |
Finds the first occurrence of any character from a set in a C string.
This function searches for the first occurrence of any character from the accept string within the str string. The search is performed character by character from the beginning and returns a pointer to the first character found that matches any character in the accept set, or nullptr if no character from the accept set is found. This function is designed to be constexpr-compatible and provides the same behavior as std::strpbrk but can be evaluated at compile time.
| str | The C string to search in. |
| accept | The C string containing the set of characters to search for. |
|
nodiscardconstexprnoexcept |
Finds the first occurrence of a substring in a C string.
This function searches for the first occurrence of the needle string within the haystack string. The search is performed character by character from the beginning and returns a pointer to the beginning of the first occurrence, or nullptr if the substring is not found. This function is designed to be constexpr-compatible and provides the same behavior as std::strstr but can be evaluated at compile time.
| haystack | The C string to search in. |
| needle | The C string to search for. |
|
noexcept |
Inserts a grouping separator into a number C string every three digits from the right.
Modifies buffer in-place. Typically used to improve readability of large numbers (e.g. "1,234,567"). Does not validate that the buffer content is purely numeric.
| buffer | Destination buffer for the formatted C string. |
| bufferSize | Size of buffer in characters. |
| separator | C string used as grouping separator (e.g. ",", " ", "."). |
> 0; separator is not null; length of separator is at most 8 (asserted in debug).
|
noexcept |
Converts a double to its decimal C string representation with specified precision.
Writes the decimal representation of value into dest, null-terminated. Handles infinity and NaN; subnormals are not supported. Practical precision limit is about 15–17 fractional digits for double.
| dest | Destination buffer for the result. |
| destSize | Size of dest in characters. |
| value | The double value to convert. |
| precision | Number of digits after the decimal point (default 15). |
|
noexcept |
Converts a float to its decimal C string representation with specified precision.
Writes the decimal representation of value into dest, null-terminated. Handles infinity and NaN; subnormals are not supported. Practical precision limit is about 7–9 fractional digits for float.
| dest | Destination buffer for the result. |
| destSize | Size of dest in characters. |
| value | The float value to convert. |
| precision | Number of digits after the decimal point (default 7). |
|
inlinenodiscardnoexcept |
Returns the 0-based index of the highest set bit in value.
Intended for log2-style queries and bit-scan operations. Implementation uses platform intrinsics where available.
| value | Non-zero 64-bit unsigned value. |
[0, 63] (bit 0 is the least significant).
|
constexprnoexcept |
Converts a signed integer to its decimal C string representation.
Writes the decimal representation of value into dest, null-terminated. Negative values are prefixed with a minus sign.
| T | Signed integer type; must satisfy std::signed_integral (e.g. int8_t, int32_t, int64_t). |
| dest | Destination buffer for the result. |
| destSize | Size of dest in characters. |
| value | Value to convert. |
int8_t, 22 for int64_t worst case).
|
nodiscardconstexprnoexcept |
Computes bitwise AND on the underlying integers, then casts back to T.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | First operand. |
| rhs | Second operand. |
static_cast<T>(std::to_underlying(lhs) & std::to_underlying(rhs)).
|
constexprnoexcept |
Compound AND: lhs becomes lhs & rhs.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | Reference to the left-hand value (updated). |
| rhs | Right-hand operand. |
|
nodiscardconstexprnoexcept |
Concatenation operator for character and FixedString.
This operator creates a new FixedString object by concatenating a single character with a FixedString. The result will contain the character from the left-hand side followed by the characters from the right-hand side.
| lhs | The character to prepend to the FixedString. |
| rhs | The right-hand side FixedString object. |
|
nodiscardconstexprnoexcept |
Concatenation operator for C-string and FixedString.
This operator creates a new FixedString object by concatenating a C-string with a FixedString. The result will contain the characters from the left-hand side followed by the characters from the right-hand side.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The left-hand side C-string. |
| rhs | The right-hand side FixedString object. |
|
nodiscardconstexprnoexcept |
Concatenation operator for FixedString and character.
This operator creates a new FixedString object by concatenating a FixedString with a single character. The result will contain the characters from the left-hand side followed by the character from the right-hand side.
| lhs | The left-hand side FixedString object. |
| rhs | The right-hand side character. |
|
nodiscardconstexprnoexcept |
Concatenation operator for FixedString and C-string.
This operator creates a new FixedString object by concatenating a FixedString with a C-string. The result will contain the characters from the left-hand side followed by the characters from the right-hand side.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The left-hand side FixedString object. |
| rhs | The right-hand side C-string. |
|
nodiscardconstexprnoexcept |
Concatenation operator for FixedString and toy::StringLike object.
This operator creates a new FixedString object by concatenating a FixedString with any toy::StringLike object. The result will contain the characters from the left-hand side followed by the characters from the right-hand side.
| allocatedSize | The size of the FixedString's internal buffer. |
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The left-hand side FixedString object. |
| rhs | The right-hand side toy::StringLike object. |
|
nodiscardconstexprnoexcept |
Concatenation operator for two FixedString objects.
This operator creates a new FixedString object by concatenating the contents of two FixedString objects. The result will contain the characters from the left-hand side followed by the characters from the right-hand side.
| allocatedSize1 | The size of the first FixedString's internal buffer. |
| allocatedSize2 | The size of the second FixedString's internal buffer. |
| lhs | The left-hand side FixedString object. |
| rhs | The right-hand side FixedString object. |
|
nodiscardconstexprnoexcept |
Concatenation operator for toy::StringLike object and FixedString.
This operator creates a new FixedString object by concatenating any toy::StringLike object with a FixedString. The result will contain the characters from the left-hand side followed by the characters from the right-hand side.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The left-hand side toy::StringLike object. |
| rhs | The right-hand side FixedString object. |
|
constexprnoexcept |
This operator provides a three-way comparison between a C string and a CStringView object. It returns a strong_ordering value that indicates the relationship between the strings.
| lhs | The C string to compare. |
| rhs | The CStringView object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
nodiscardconstexprnoexcept |
Three-way comparison operator for C string and FixedString.
This operator provides a three-way comparison between a C string and a FixedString object. It returns a strong_ordering value that indicates the relationship between the strings.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The C string to compare. |
| rhs | The FixedString object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
constexprnoexcept |
This operator provides a three-way comparison between a CStringView object and a C string. It returns a strong_ordering value that indicates the relationship between the strings.
| lhs | The CStringView object to compare. |
| rhs | The C string to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
constexprnoexcept |
This operator provides a three-way comparison between two CStringView objects. It returns a strong_ordering value that indicates the relationship between the string views.
| lhs | The left-hand side CStringView object to compare. |
| rhs | The right-hand side CStringView object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
constexprnoexcept |
This operator provides a three-way comparison between a CStringView object and a toy::StringLike object. It returns a strong_ordering value that indicates the relationship between the strings.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The CStringView object to compare. |
| rhs | The toy::StringLike object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
nodiscardconstexprnoexcept |
Three-way comparison operator for FixedString and C string.
This operator provides a three-way comparison between a FixedString object and a C string. It returns a strong_ordering value that indicates the relationship between the strings.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The FixedString object to compare. |
| rhs | The C string to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
nodiscardconstexprnoexcept |
Three-way comparison operator for FixedString and toy::StringLike object.
This operator provides a three-way comparison between a FixedString object and a toy::StringLike object. It returns a strong_ordering value that indicates the relationship between the strings.
| allocatedSize | The size of the FixedString's internal buffer. |
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The FixedString object to compare. |
| rhs | The toy::StringLike object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
nodiscardconstexprnoexcept |
Three-way comparison operator for FixedString objects.
This operator provides a three-way comparison between two FixedString objects. It returns a strong_ordering value that indicates the relationship between the strings.
| allocatedSize1 | The size of the first FixedString's internal buffer. |
| allocatedSize2 | The size of the second FixedString's internal buffer. |
| lhs | The left-hand side FixedString object to compare. |
| rhs | The right-hand side FixedString object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
constexprnoexcept |
This operator provides a three-way comparison between a toy::StringLike object and a CStringView object. It returns a strong_ordering value that indicates the relationship between the strings.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The toy::StringLike object to compare. |
| rhs | The CStringView object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
nodiscardconstexprnoexcept |
Three-way comparison operator for toy::StringLike object and FixedString.
This operator provides a three-way comparison between a toy::StringLike object and a FixedString object. It returns a strong_ordering value that indicates the relationship between the strings.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The toy::StringLike object to compare. |
| rhs | The FixedString object to compare. |
strong_ordering::less if lhs is lexicographically less than rhs, strong_ordering::equal if they are equal, or strong_ordering::greater if lhs is lexicographically greater than rhs.
|
constexprnoexcept |
This operator compares a C string with a CStringView object for equality.
| lhs | The C string. |
| rhs | The CStringView object. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Equality comparison operator for C string and FixedString.
This operator compares a C string with a FixedString object for equality.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The C string. |
| rhs | The FixedString object. |
true if both strings have the same content, false otherwise.
|
constexprnoexcept |
This operator compares a CStringView object with a C string for equality.
| lhs | The CStringView object. |
| rhs | The C string. |
true if both strings have the same content, false otherwise.
|
constexprnoexcept |
This operator compares two CStringView objects for equality. The comparison is performed character by character.
| lhs | The left-hand side CStringView object. |
| rhs | The right-hand side CStringView object. |
true if both strings view have the same content, false otherwise.
|
constexprnoexcept |
This operator compares a CStringView object with a toy::StringLike object for equality.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The CStringView object. |
| rhs | The toy::StringLike object. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Equality comparison operator for FixedString and C string.
This operator compares a FixedString object with a C string for equality.
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The FixedString object. |
| rhs | The C string. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Equality comparison operator for FixedString and toy::StringLike object.
This operator compares a FixedString object with a toy::StringLike object for equality.
| allocatedSize | The size of the FixedString's internal buffer. |
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The FixedString object. |
| rhs | The toy::StringLike object. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Equality comparison operator for two FixedString objects.
This operator compares two FixedString objects for equality. The comparison is performed character by character.
| allocatedSize1 | The size of the first FixedString's internal buffer. |
| allocatedSize2 | The size of the second FixedString's internal buffer. |
| lhs | The left-hand side FixedString object. |
| rhs | The right-hand side FixedString object. |
true if both strings have the same content, false otherwise.
|
constexprnoexcept |
This operator compares a toy::StringLike object with a CStringView object for equality.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| lhs | The toy::StringLike object. |
| rhs | The CStringView object. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Equality comparison operator for toy::StringLike object and FixedString.
This operator compares a toy::StringLike object with a FixedString object for equality.
| stringType | The type of the toy::StringLike object. Must satisfy the toy::StringLike concept. |
| allocatedSize | The size of the FixedString's internal buffer. |
| lhs | The toy::StringLike object. |
| rhs | The FixedString object. |
true if both strings have the same content, false otherwise.
|
nodiscardconstexprnoexcept |
Computes bitwise XOR on the underlying integers, then casts back to T.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | First operand. |
| rhs | Second operand. |
static_cast<T>(std::to_underlying(lhs) ^ std::to_underlying(rhs)).
|
constexprnoexcept |
Compound XOR: lhs becomes lhs ^ rhs.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | Reference to the left-hand value (updated). |
| rhs | Right-hand operand. |
|
nodiscardconstexprnoexcept |
Computes bitwise OR on the underlying integers, then casts back to T.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | First operand. |
| rhs | Second operand. |
static_cast<T>(std::to_underlying(lhs) | std::to_underlying(rhs)).
|
constexprnoexcept |
Compound OR: lhs becomes lhs | rhs.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | Reference to the left-hand value (updated). |
| rhs | Right-hand operand. |
|
nodiscardconstexprnoexcept |
Computes bitwise NOT of the underlying integer, then casts back to T.
| T | Scoped enum for which toy::EnableBitwiseOperators is specialized with enable == true. |
| lhs | Operand. |
static_cast<T>(~std::to_underlying(lhs)).
|
constexprnoexcept |
Converts an unsigned integer to its C string representation in the given base.
Writes the representation of value in base base into dest, null-terminated. Digits above 9 use uppercase letters A–Z.
| T | Unsigned integer type; must satisfy std::unsigned_integral (e.g. uint8_t, uint32_t, uint64_t). |
| dest | Destination buffer for the result. |
| destSize | Size of dest in characters. |
| value | Value to convert. |
| base | Numerical base (default: 10). Supported range 2– |
2 and 36.
|
staticconstexpr |
CRC-16 lookup table using IBM/ARC polynomial (0x8005).
This lookup table contains precomputed CRC-16 values for all possible byte values (0-255). The table is generated using the IBM/ARC polynomial (x¹⁶ + x¹⁵ + x² + 1, 0x8005). Using this table allows for O(1) CRC calculation per byte instead of O(16) bit-by-bit calculation.
|
staticconstexpr |
CRC-32 lookup table using IEEE 802.3 polynomial (0x04C11DB7).
This lookup table contains precomputed CRC-32 values for all possible byte values (0-255). The table is generated using the IEEE 802.3 polynomial (x³² + x²⁶ + x²³ + x²² + x¹⁶ + x¹² + x¹¹ + x¹⁰ + x⁸ + x⁷ + x⁵ + x⁴ + x² + x + 1, 0x04C11DB7). Using this table allows for O(1) CRC calculation per byte instead of O(32) bit-by-bit calculation.
|
staticconstexpr |
CRC-8 lookup table using Dallas/Maxim polynomial (0x31).
This lookup table contains precomputed CRC-8 values for all possible byte values (0-255). The table is generated using the Dallas/Maxim polynomial (x⁸ + x⁵ + x⁴ + 1, 0x31). Using this table allows for O(1) CRC calculation per byte instead of O(8) bit-by-bit calculation.
|
constexpr |
Number of decimal digits per group when formatNumberString() inserts the caller-supplied separator.
Fixed at three so grouping matches common thousands-style splitting from the right.
|
constexpr |
Precomputed exponent lookup table for efficient binary-to-decimal floating-point conversion.
This lookup table contains 32 precomputed values used to convert IEEE-754 binary floating-point exponents to decimal exponents during float-to-string conversion. The table maps groups of 8 binary exponent values to precomputed multipliers that approximate the conversion from binary to decimal representation.
|
staticconstexpr |
UTF-8 character size lookup table for efficient UTF-8 parsing.
This lookup table contains precomputed UTF-8 character sizes for all possible byte values (0-255). The table maps each byte to the number of bytes required to represent a complete UTF-8 character sequence. Using this table allows for O(1) UTF-8 character size determination instead of O(n) bit-by-bit analysis.