1#ifndef SDL3PP_STDINC_H_
2#define SDL3PP_STDINC_H_
6#include <SDL3/SDL_stdinc.h>
7#include "SDL3pp_callbackWrapper.h"
8#include "SDL3pp_error.h"
9#include "SDL3pp_optionalRef.h"
10#include "SDL3pp_ownPtr.h"
11#include "SDL3pp_resource.h"
12#include "SDL3pp_spanRef.h"
13#include "SDL3pp_strings.h"
98#define SDL_NOLONGLONG 1
114#define SDL_SIZE_MAX SIZE_MAX
147#define SDL_COMPILE_TIME_ASSERT(name, x) FailToCompileIf_x_IsFalse(x)
159template<
class T, std::
size_t N>
162 return std::size(array);
174#define SDL_STRINGIFY_ARG(arg) #arg
193 return SDL_FOURCC(a, b, c, d);
209#define SDL_SINT64_C(c) c##LL
222#define SDL_UINT64_C(c) c##ULL
373 constexpr Time() =
default;
396 constexpr explicit operator bool()
const
398 return m_time != std::chrono::nanoseconds{};
419 return Time{std::chrono::nanoseconds{time}};
492 return std::chrono::duration_cast<std::chrono::nanoseconds>(
497 constexpr Time&
operator+=(std::chrono::nanoseconds interval)
504 constexpr Time&
operator-=(std::chrono::nanoseconds interval)
537concept Interface =
requires(I* iface) { (iface)->version =
sizeof(I); };
580 SDL_INIT_INTERFACE(iface);
608inline void*
malloc(
size_t size) {
return SDL_malloc(size); }
633inline void*
calloc(
size_t nmemb,
size_t size)
635 return SDL_calloc(nmemb, size);
674inline void*
realloc(
void* mem,
size_t size) {
return SDL_realloc(mem, size); }
694inline void free(
void* mem) { SDL_free(mem); }
797 SDL_GetOriginalMemoryFunctions(
884 return SDL_aligned_alloc(alignment, size);
1045 using EnvironmentBase::EnvironmentBase;
1171 return SDL_GetEnvironmentVariable(env, name);
1233 CheckError(SDL_SetEnvironmentVariable(env, name, value, overwrite));
1263 CheckError(SDL_UnsetEnvironmentVariable(env, name));
1285 SDL_DestroyEnvironment(env);
1330 return SDL_getenv_unsafe(name);
1351 return SDL_setenv_unsafe(name, value, overwrite);
1369 return SDL_unsetenv_unsafe(name);
1437 SDL_qsort(base, nmemb, size, compare);
1495 return SDL_bsearch(key, base, nmemb, size, compare);
1532using CompareCB = std::function<int(
const void* a,
const void* b)>;
1592 SDL_qsort_r(base, nmemb, size, compare, userdata);
1652 [](
void* userdata,
const void* a,
const void* b) {
1653 auto& cb = *
static_cast<const CompareCB*
>(userdata);
1723 return SDL_bsearch_r(key, base, nmemb, size, compare, userdata);
1793 [](
void* userdata,
const void* a,
const void* b) {
1794 auto& cb = *
static_cast<const CompareCB*
>(userdata);
1810inline int abs(
int x) {
return SDL_abs(x); }
1831inline double abs(
double x) {
return SDL_fabs(x); }
1852inline float abs(
float x) {
return SDL_fabsf(x); }
1870template<
class T,
class U>
1873 return SDL_min(x, y);
1892template<
class T,
class U>
1895 return SDL_max(x, y);
1920template<
class T,
class U,
class V>
1923 return SDL_clamp(x, a, b);
1939inline int isalpha(
int x) {
return SDL_isalpha(x); }
1954inline int isalnum(
int x) {
return SDL_isalnum(x); }
1969inline int isblank(
int x) {
return SDL_isblank(x); }
1984inline int iscntrl(
int x) {
return SDL_iscntrl(x); }
1999inline int isdigit(
int x) {
return SDL_isdigit(x); }
2032inline int ispunct(
int x) {
return SDL_ispunct(x); }
2054inline int isspace(
int x) {
return SDL_isspace(x); }
2069inline int isupper(
int x) {
return SDL_isupper(x); }
2084inline int islower(
int x) {
return SDL_islower(x); }
2103inline int isprint(
int x) {
return SDL_isprint(x); }
2124inline int isgraph(
int x) {
return SDL_isgraph(x); }
2142inline int toupper(
int x) {
return SDL_toupper(x); }
2160inline int tolower(
int x) {
return SDL_tolower(x); }
2183 return SDL_crc16(crc, data, len);
2207 return SDL_crc32(crc, data, len);
2236 return SDL_murmur3_32(data, len, seed);
2257inline void*
memcpy(
void* dst,
const void* src,
size_t len)
2259#ifdef SDL_SLOW_MEMCPY
2260 return SDL_memcpy(dst, src, len);
2262 return ::memcpy(dst, src, len);
2290template<
typename T,
typename U>
2293 SDL_copyp(dst, src);
2314inline void*
memmove(
void* dst,
const void* src,
size_t len)
2316#ifdef SDL_SLOW_MEMMOVE
2317 return SDL_memmove(dst, src, len);
2319 return ::memmove(dst, src, len);
2341inline void*
memset(
void* dst,
int c,
size_t len)
2343#ifdef SDL_SLOW_MEMSET
2344 return SDL_memset(dst, c, len);
2346 return ::memset(dst, c, len);
2370 return SDL_memset4(dst, val, dwords);
2436template<
class T, std::
size_t N>
2456inline int memcmp(
const void* s1,
const void* s2,
size_t len)
2458 return SDL_memcmp(s1, s2, len);
2485inline size_t wcslen(
const wchar_t* wstr) {
return SDL_wcslen(wstr); }
2515inline size_t wcsnlen(
const wchar_t* wstr,
size_t maxlen)
2517 return SDL_wcsnlen(wstr, maxlen);
2545inline size_t wcslcpy(
wchar_t* dst,
const wchar_t* src,
size_t maxlen)
2547 return SDL_wcslcpy(dst, src, maxlen);
2576inline size_t wcslcat(
wchar_t* dst,
const wchar_t* src,
size_t maxlen)
2578 return SDL_wcslcat(dst, src, maxlen);
2597inline wchar_t*
wcsdup(
const wchar_t* wstr) {
return SDL_wcsdup(wstr); }
2617inline wchar_t*
wcsstr(
const wchar_t* haystack,
const wchar_t* needle)
2619 return SDL_wcsstr(haystack, needle);
2644 const wchar_t* needle,
2647 return SDL_wcsnstr(haystack, needle, maxlen);
2666inline int wcscmp(
const wchar_t* str1,
const wchar_t* str2)
2668 return SDL_wcscmp(str1, str2);
2698inline int wcsncmp(
const wchar_t* str1,
const wchar_t* str2,
size_t maxlen)
2700 return SDL_wcsncmp(str1, str2, maxlen);
2732 return SDL_wcscasecmp(str1, str2);
2774inline int wcsncasecmp(
const wchar_t* str1,
const wchar_t* str2,
size_t maxlen)
2776 return SDL_wcsncasecmp(str1, str2, maxlen);
2803inline long wcstol(
const wchar_t* str,
wchar_t** endp,
int base)
2805 return SDL_wcstol(str, endp, base);
2851 return SDL_strnlen(str, maxlen);
2881 return SDL_strlcpy(dst, src, maxlen);
2912 return SDL_utf8strlcpy(dst, src, dst_bytes);
2943 return SDL_strlcat(dst, src, maxlen);
2989 return SDL_strndup(str, maxlen);
3011inline char*
strrev(
char* str) {
return SDL_strrev(str); }
3032inline char*
strupr(
char* str) {
return SDL_strupr(str); }
3053inline char*
strlwr(
char* str) {
return SDL_strlwr(str); }
3114 return SDL_strstr(haystack, needle);
3140 return SDL_strnstr(haystack, needle, maxlen);
3171 return SDL_strcasestr(haystack, needle);
3202 return SDL_strtok_r(str, delim, saveptr);
3263 return SDL_utf8strnlen(str, bytes);
3291inline char*
itoa(
int value,
char* str,
int radix)
3293 return SDL_itoa(value, str, radix);
3321inline char*
uitoa(
unsigned int value,
char* str,
int radix)
3323 return SDL_uitoa(value, str, radix);
3351inline char*
ltoa(
long value,
char* str,
int radix)
3353 return SDL_ltoa(value, str, radix);
3381inline char*
ultoa(
unsigned long value,
char* str,
int radix)
3383 return SDL_ultoa(value, str, radix);
3386#ifndef SDL_NOLONGLONG
3413inline char* lltoa(
long long value,
char* str,
int radix)
3415 return SDL_lltoa(value, str, radix);
3443inline char* ulltoa(
unsigned long long value,
char* str,
int radix)
3445 return SDL_ulltoa(value, str, radix);
3527 return SDL_strtol(str, endp, base);
3562 return SDL_strtoul(str, endp, base);
3565#ifndef SDL_NOLONGLONG
3597inline long long strtoll(StringParam str,
char** endp,
int base)
3599 return SDL_strtoll(str, endp, base);
3632inline unsigned long long strtoull(
StringParam str,
char** endp,
int base)
3634 return SDL_strtoull(str, endp, base);
3668 return SDL_strtod(str, endp);
3690 return SDL_strcmp(str1, str2);
3722 return SDL_strncmp(str1, str2, maxlen);
3752 return SDL_strcasecmp(str1, str2);
3793 return SDL_strncasecmp(str1, str2, maxlen);
3814 return SDL_strpbrk(str, breakset);
3875 return SDL_StepUTF8(pstr, pslen);
3907 return SDL_StepBackUTF8(start, pstr);
3939 return SDL_UCS4ToUTF8(codepoint, dst);
3958 SDL_SCANF_FORMAT_STRING
const char* fmt,
3964 rc = SDL_vsscanf(text, fmt, ap);
3986 SDL_SCANF_FORMAT_STRING
const char* fmt,
3989 return SDL_vsscanf(text, fmt, ap);
4024 SDL_PRINTF_FORMAT_STRING
const char* fmt,
4031 result = SDL_vsnprintf(text, maxlen, fmt, ap);
4070 SDL_PRINTF_FORMAT_STRING
const wchar_t* fmt,
4077 result = SDL_vswprintf(text, maxlen, fmt, ap);
4103 SDL_PRINTF_FORMAT_STRING
const char* fmt,
4106 return SDL_vsnprintf(text, maxlen, fmt, ap);
4130 SDL_PRINTF_FORMAT_STRING
const wchar_t* fmt,
4133 return SDL_vswprintf(text, maxlen, fmt, ap);
4162inline int asprintf(
char** strp, SDL_PRINTF_FORMAT_STRING
const char* fmt, ...)
4168 result = SDL_vasprintf(strp, fmt, ap);
4192 SDL_PRINTF_FORMAT_STRING
const char* fmt,
4195 return SDL_vasprintf(strp, fmt, ap);
4245 constexpr operator Uint64()
const {
return m_state; }
4302 float randf() {
return SDL_randf_r(&m_state); }
4450inline float randf() {
return SDL_randf(); }
4622inline double acos(
double x) {
return SDL_acos(x); }
4651inline float acos(
float x) {
return SDL_acosf(x); }
4680inline double asin(
double x) {
return SDL_asin(x); }
4709inline float asin(
float x) {
return SDL_asinf(x); }
4740inline double atan(
double x) {
return SDL_atan(x); }
4771inline float atan(
float x) {
return SDL_atanf(x); }
4805inline double atan2(
double y,
double x) {
return SDL_atan2(y, x); }
4840inline float atan2(
float y,
float x) {
return SDL_atan2f(y, x); }
4868inline double ceil(
double x) {
return SDL_ceil(x); }
4896inline float ceil(
float x) {
return SDL_ceilf(x); }
4921inline double copysign(
double x,
double y) {
return SDL_copysign(x, y); }
4946inline float copysign(
float x,
float y) {
return SDL_copysignf(x, y); }
4973inline double cos(
double x) {
return SDL_cos(x); }
5000inline float cos(
float x) {
return SDL_cosf(x); }
5031inline double exp(
double x) {
return SDL_exp(x); }
5062inline float exp(
float x) {
return SDL_expf(x); }
5090inline double floor(
double x) {
return SDL_floor(x); }
5118inline float floor(
float x) {
return SDL_floorf(x); }
5147inline double trunc(
double x) {
return SDL_trunc(x); }
5176inline float trunc(
float x) {
return SDL_truncf(x); }
5206inline double fmod(
double x,
double y) {
return SDL_fmod(x, y); }
5236inline float fmod(
float x,
float y) {
return SDL_fmodf(x, y); }
5250inline int isinf(
double x) {
return SDL_isinf(x); }
5264inline int isinf(
float x) {
return SDL_isinff(x); }
5278inline int isnan(
double x) {
return SDL_isnan(x); }
5292inline int isnan(
float x) {
return SDL_isnanf(x); }
5321inline double log(
double x) {
return SDL_log(x); }
5349inline float log(
float x) {
return SDL_logf(x); }
5378inline double log10(
double x) {
return SDL_log10(x); }
5407inline float log10(
float x) {
return SDL_log10f(x); }
5427inline double modf(
double x,
double* y) {
return SDL_modf(x, y); }
5447inline float modf(
float x,
float* y) {
return SDL_modff(x, y); }
5477inline double pow(
double x,
double y) {
return SDL_pow(x, y); }
5507inline float pow(
float x,
float y) {
return SDL_powf(x, y); }
5536inline double round(
double x) {
return SDL_round(x); }
5565inline float round(
float x) {
return SDL_roundf(x); }
5594inline long lround(
double x) {
return SDL_lround(x); }
5623inline long lround(
float x) {
return SDL_lroundf(x); }
5648inline double scalbn(
double x,
int n) {
return SDL_scalbn(x, n); }
5673inline float scalbn(
float x,
int n) {
return SDL_scalbnf(x, n); }
5700inline double sin(
double x) {
return SDL_sin(x); }
5727inline float sin(
float x) {
return SDL_sinf(x); }
5752inline double sqrt(
double x) {
return SDL_sqrt(x); }
5777inline float sqrt(
float x) {
return SDL_sqrtf(x); }
5806inline double tan(
double x) {
return SDL_tan(x); }
5835inline float tan(
float x) {
return SDL_tanf(x); }
5847 explicit operator bool() const noexcept
5849 return reinterpret_cast<size_t>(
get()) != SDL_ICONV_ERROR;
5903 size_t iconv(
const char** inbuf,
5904 size_t* inbytesleft,
5906 size_t* outbytesleft)
const;
5921 using IConvBase::IConvBase;
5924 IConv(std::nullptr_t =
nullptr) noexcept
5943 :
IConv(other.release())
5994 return IConv(tocode, fromcode);
5998 :
IConv(SDL_iconv_open(tocode, fromcode))
6059 size_t* inbytesleft,
6061 size_t* outbytesleft)
6063 return CheckError(SDL_iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft));
6067 size_t* inbytesleft,
6069 size_t* outbytesleft)
const
6071 return SDL::iconv(
get(), inbuf, inbytesleft, outbuf, outbytesleft);
6114 SDL_iconv_string(tocode, fromcode, inbuf.
data(), inbuf.
size_bytes())};
6152 auto data = SDL_iconv_string(
"UCS-2",
"UTF-8", S.data(), S.size());
6172 auto data = SDL_iconv_string(
"UCS-4",
"UTF-8", S.data(), S.size());
6214 return SDL_size_mul_check_overflow(a, b, ret);
6236 return SDL_size_add_check_overflow(a, b, ret);
6258inline void PtrDeleter::operator()(
void* ptr)
const { SDL_free(ptr); }
6261template<std::
integral T>
6264 if constexpr (std::is_signed_v<T>) {
6266 value <= std::numeric_limits<Sint32>::max());
6270 return static_cast<Sint32>(value);
6274template<std::
integral T>
6278 return static_cast<Uint32>(value);
6283concept Number = std::integral<T> || std::floating_point<T>;
Base class for SDL memory allocated array wrap.
Definition SDL3pp_ownPtr.h:44
A independent pseudo random state.
Definition SDL3pp_stdinc.h:4228
constexpr Random(Uint64 state)
Init state with the given value.
Definition SDL3pp_stdinc.h:4239
float randf()
Generate a uniform pseudo-random floating point number less than 1.0.
Definition SDL3pp_stdinc.h:4302
constexpr Random()
Default constructor initializes state to zero.
Definition SDL3pp_stdinc.h:4233
Uint32 rand_bits()
Generate 32 pseudo-random bits.
Definition SDL3pp_stdinc.h:4325
Sint32 rand(Sint32 n)
Generate a pseudo-random number less than n for positive n.
Definition SDL3pp_stdinc.h:4278
constexpr RawPointer release() noexcept
Definition SDL3pp_resource.h:57
friend constexpr void swap(ResourceBaseT &lhs, ResourceBaseT &rhs) noexcept
Definition SDL3pp_resource.h:65
constexpr RawPointer get() const noexcept
Definition SDL3pp_resource.h:54
constexpr ResourceBaseT()=default
Default constructor, creates null/invalid resource.
Source byte stream.
Definition SDL3pp_strings.h:246
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition SDL3pp_strings.h:310
constexpr const char * data() const
Retrieves contained data.
Definition SDL3pp_strings.h:313
Helpers to use C++ strings parameters.
Definition SDL3pp_strings.h:58
SDL times are signed, 64-bit integers representing nanoseconds since the Unix epoch (Jan 1,...
Definition SDL3pp_stdinc.h:369
constexpr Sint64 ToNS() const
Converts to nanoseconds Sint64.
Definition SDL3pp_stdinc.h:423
constexpr Time & operator+=(std::chrono::nanoseconds interval)
Increment time.
Definition SDL3pp_stdinc.h:497
constexpr float ToSeconds() const
Converts a time to seconds (float) since epoch.
Definition SDL3pp_stdinc.h:487
constexpr Time(Nanoseconds time) noexcept
Wraps Time.
Definition SDL3pp_stdinc.h:390
constexpr Time & operator-=(std::chrono::nanoseconds interval)
Decrement.
Definition SDL3pp_stdinc.h:504
constexpr Time(TimeRaw time) noexcept
Wraps Time.
Definition SDL3pp_stdinc.h:380
static constexpr Time FromNS(Sint64 time)
Create from a nanoseconds Sint64.
Definition SDL3pp_stdinc.h:417
static constexpr Time FromSeconds(float interval)
Converts a time to seconds (float) since epoch.
Definition SDL3pp_stdinc.h:490
Concept of interface.
Definition SDL3pp_stdinc.h:537
Either integral or floating point.
Definition SDL3pp_stdinc.h:6283
#define SDL_assert_paranoid(condition)
An assertion test that is performed only when built with paranoid settings.
Definition SDL3pp_assert.h:383
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition SDL3pp_error.h:199
int wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen)
Compare two wide strings up to a number of wchar_t values.
Definition SDL3pp_stdinc.h:2698
double log(double x)
Compute the natural logarithm of x.
Definition SDL3pp_stdinc.h:5321
char * UCS4ToUTF8(Uint32 codepoint, char *dst)
Convert a single Unicode codepoint to UTF-8.
Definition SDL3pp_stdinc.h:3937
long wcstol(const wchar_t *str, wchar_t **endp, int base)
Parse a long from a wide string.
Definition SDL3pp_stdinc.h:2803
char * strdup(StringParam str)
Allocate a copy of a string.
Definition SDL3pp_stdinc.h:2962
void SetMemoryFunctions(malloc_func malloc_func, calloc_func calloc_func, realloc_func realloc_func, free_func free_func)
Replace SDL's memory allocation functions with a custom set.
Definition SDL3pp_stdinc.h:851
double strtod(StringParam str, char **endp)
Parse a double from a string.
Definition SDL3pp_stdinc.h:3666
constexpr Sint8 MIN_SINT8
Min representable value.
Definition SDL3pp_stdinc.h:237
char * strcasestr(StringParam haystack, StringParam needle)
Search a UTF-8 string for the first instance of a specific substring, case-insensitively.
Definition SDL3pp_stdinc.h:3169
void UnsetVariable(StringParam name)
Clear a variable from the environment.
Definition SDL3pp_stdinc.h:1266
double atan(double x)
Compute the arc tangent of x.
Definition SDL3pp_stdinc.h:4740
int asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt,...)
This works exactly like asprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4162
double ceil(double x)
Compute the ceiling of x.
Definition SDL3pp_stdinc.h:4868
void SetEnvironmentVariable(EnvironmentRef env, StringParam name, StringParam value, bool overwrite)
Set the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1228
char * strlwr(char *str)
Convert a string to lowercase.
Definition SDL3pp_stdinc.h:3053
void * memmove(void *dst, const void *src, size_t len)
Copy memory ranges that might overlap.
Definition SDL3pp_stdinc.h:2314
::Sint32 Sint32
A signed 32-bit integer type.
Definition SDL3pp_stdinc.h:283
int memcmp(const void *s1, const void *s2, size_t len)
Compare two buffers of memory.
Definition SDL3pp_stdinc.h:2456
constexpr Uint16 MIN_UINT16
Min representable value.
Definition SDL3pp_stdinc.h:276
std::chrono::nanoseconds Nanoseconds
Duration in Nanoseconds (Uint64).
Definition SDL3pp_stdinc.h:338
constexpr std::size_t arraysize(const T(&array)[N])
The number of elements in a static array.
Definition SDL3pp_stdinc.h:160
char * strnstr(StringParam haystack, StringParam needle, size_t maxlen)
Search a string, up to n bytes, for the first instance of a specific substring.
Definition SDL3pp_stdinc.h:3138
OwnArray< Uint16 > iconv_utf8_ucs2(std::string_view S)
Convert a UTF-8 string to UCS-2.
Definition SDL3pp_stdinc.h:6150
int isnan(double x)
Return whether the value is NaN.
Definition SDL3pp_stdinc.h:5278
constexpr Uint32 INVALID_UNICODE_CODEPOINT
The Unicode REPLACEMENT CHARACTER codepoint.
Definition SDL3pp_stdinc.h:3830
double scalbn(double x, int n)
Scale x by an integer power of two.
Definition SDL3pp_stdinc.h:5648
char * ultoa(unsigned long value, char *str, int radix)
Convert an unsigned long integer into a string.
Definition SDL3pp_stdinc.h:3381
wchar_t * wcsdup(const wchar_t *wstr)
Allocate a copy of a wide string.
Definition SDL3pp_stdinc.h:2597
int isgraph(int x)
Report if a character is any "printable" except space.
Definition SDL3pp_stdinc.h:2124
const char * GetVariable(StringParam name)
Get the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1174
constexpr Sint16 MIN_SINT16
Min representable value.
Definition SDL3pp_stdinc.h:263
int strncmp(StringParam str1, StringParam str2, size_t maxlen)
Compare two UTF-8 strings up to a number of bytes.
Definition SDL3pp_stdinc.h:3720
double asin(double x)
Compute the arc sine of x.
Definition SDL3pp_stdinc.h:4680
Uint16 crc16(Uint16 crc, const void *data, size_t len)
Calculate a CRC-16 value.
Definition SDL3pp_stdinc.h:2181
char * strrev(char *str)
Reverse a string's contents.
Definition SDL3pp_stdinc.h:3011
OwnArray< char * > GetVariables()
Get all variables in the environment.
Definition SDL3pp_stdinc.h:1203
int strncasecmp(StringParam str1, StringParam str2, size_t maxlen)
Compare two UTF-8 strings, case-insensitively, up to a number of bytes.
Definition SDL3pp_stdinc.h:3791
constexpr T min(T x, U y)
Return the lesser of two values.
Definition SDL3pp_stdinc.h:1871
unsigned long strtoul(StringParam str, char **endp, int base)
Parse an unsigned long from a string.
Definition SDL3pp_stdinc.h:3560
int isdigit(int x)
Report if a character is a numeric digit.
Definition SDL3pp_stdinc.h:1999
double exp(double x)
Compute the exponential of x.
Definition SDL3pp_stdinc.h:5031
char * strstr(StringParam haystack, StringParam needle)
Search a string for the first instance of a specific substring.
Definition SDL3pp_stdinc.h:3112
constexpr Uint32 MAX_UINT32
Max representable value.
Definition SDL3pp_stdinc.h:299
IConv iconv_open(StringParam tocode, StringParam fromcode)
This function allocates a context for the specified character set conversion.
Definition SDL3pp_stdinc.h:5992
int vsnprintf(char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap)
This works exactly like vsnprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4101
char * strchr(StringParam str, int c)
Search a string for the first instance of a specific byte.
Definition SDL3pp_stdinc.h:3073
int close()
This function frees a context used for character set conversion.
Definition SDL3pp_stdinc.h:6019
double copysign(double x, double y)
Copy the sign of one floating-point value to another.
Definition SDL3pp_stdinc.h:4921
Environment CreateEnvironment(bool populated)
Create a set of environment variables.
Definition SDL3pp_stdinc.h:1141
void * malloc(size_t size)
Allocate uninitialized memory.
Definition SDL3pp_stdinc.h:608
constexpr float FLT_EPSILON
Epsilon constant, used for comparing floating-point numbers.
Definition SDL3pp_stdinc.h:527
double modf(double x, double *y)
Split x into integer and fractional parts.
Definition SDL3pp_stdinc.h:5427
void zero(T &x)
Clear an object's memory to zero.
Definition SDL3pp_stdinc.h:2391
size_t strlcat(char *dst, StringParam src, size_t maxlen)
Concatenate strings.
Definition SDL3pp_stdinc.h:2941
void zeroa(T(&x)[N])
Clear an array's memory to zero.
Definition SDL3pp_stdinc.h:2437
char * strndup(StringParam str, size_t maxlen)
Allocate a copy of a string, up to n characters.
Definition SDL3pp_stdinc.h:2987
constexpr Uint8 MIN_UINT64
Min representable value.
Definition SDL3pp_stdinc.h:332
void(SDLCALL *)() FunctionPointer
A generic function pointer.
Definition SDL3pp_stdinc.h:6254
int snprintf(char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt,...)
This works exactly like snprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4022
double round(double x)
Round x to the nearest integer.
Definition SDL3pp_stdinc.h:5536
int sscanf(StringParam text, SDL_SCANF_FORMAT_STRING const char *fmt,...)
This works exactly like sscanf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:3957
size_t strlcpy(char *dst, StringParam src, size_t maxlen)
Copy a string.
Definition SDL3pp_stdinc.h:2879
void * memset(void *dst, int c, size_t len)
Initialize all bytes of buffer of memory to a specific value.
Definition SDL3pp_stdinc.h:2341
constexpr Uint64 MAX_UINT64
Max representable value.
Definition SDL3pp_stdinc.h:329
bool size_mul_check_overflow(size_t a, size_t b, size_t *ret)
Multiply two integers, checking for overflow.
Definition SDL3pp_stdinc.h:6212
int iconv_close(IConvRaw cd)
This function frees a context used for character set conversion.
Definition SDL3pp_stdinc.h:6017
ResourceRefT< EnvironmentBase > EnvironmentRef
Reference for Environment.
Definition SDL3pp_stdinc.h:62
void GetOriginalMemoryFunctions(malloc_func *malloc_func, calloc_func *calloc_func, realloc_func *realloc_func, free_func *free_func)
Get the original set of SDL memory functions.
Definition SDL3pp_stdinc.h:792
int strcmp(StringParam str1, StringParam str2)
Compare two null-terminated UTF-8 strings.
Definition SDL3pp_stdinc.h:3688
::Sint64 Sint64
A signed 64-bit integer type.
Definition SDL3pp_stdinc.h:311
SDL_Time TimeRaw
Alias to raw representation for Time.
Definition SDL3pp_stdinc.h:43
bool size_add_check_overflow(size_t a, size_t b, size_t *ret)
Add two integers, checking for overflow.
Definition SDL3pp_stdinc.h:6234
void UnsetEnvironmentVariable(EnvironmentRef env, StringParam name)
Clear a variable from the environment.
Definition SDL3pp_stdinc.h:1261
SDL_iconv_t IConvRaw
Alias to raw representation for IConv.
Definition SDL3pp_stdinc.h:71
std::function< int(const void *a, const void *b)> CompareCB
A callback used with SDL sorting and binary search functions.
Definition SDL3pp_stdinc.h:1532
char * uitoa(unsigned int value, char *str, int radix)
Convert an unsigned integer into a string.
Definition SDL3pp_stdinc.h:3321
double pow(double x, double y)
Raise x to the power y.
Definition SDL3pp_stdinc.h:5477
constexpr T * copyp(T *dst, const U *src)
A macro to copy memory between objects, with basic type checking.
Definition SDL3pp_stdinc.h:2291
constexpr Sint32 MIN_SINT32
Min representable value.
Definition SDL3pp_stdinc.h:289
EnvironmentRaw GetEnvironment()
Get the process environment.
Definition SDL3pp_stdinc.h:1119
int isprint(int x)
Report if a character is "printable".
Definition SDL3pp_stdinc.h:2103
long lround(double x)
Round x to the nearest integer representable as a long.
Definition SDL3pp_stdinc.h:5594
int isxdigit(int x)
Report if a character is a hexadecimal digit.
Definition SDL3pp_stdinc.h:2014
constexpr T max(T x, U y)
Return the greater of two values.
Definition SDL3pp_stdinc.h:1893
int atoi(StringParam str)
Parse an int from a string.
Definition SDL3pp_stdinc.h:3471
OwnArray< char > iconv_string(StringParam tocode, StringParam fromcode, SourceBytes inbuf)
Helper function to convert a string's encoding in one call.
Definition SDL3pp_stdinc.h:6109
int tolower(int x)
Convert low-ASCII English letters to lowercase.
Definition SDL3pp_stdinc.h:2160
::Uint16 Uint16
An unsigned 16-bit integer type.
Definition SDL3pp_stdinc.h:270
int isalpha(int x)
Query if a character is alphabetic (a letter).
Definition SDL3pp_stdinc.h:1939
constexpr size_t ICONV_E2BIG
Output buffer was too small.
Definition SDL3pp_stdinc.h:6077
OwnArray< char > iconv_utf8_locale(std::string_view S)
Convert a UTF-8 string to the current locale's character encoding.
Definition SDL3pp_stdinc.h:6131
OwnArray< Uint32 > iconv_utf8_ucs4(std::string_view S)
Convert a UTF-8 string to UCS-4.
Definition SDL3pp_stdinc.h:6170
int unsetenv_unsafe(StringParam name)
Clear a variable from the environment.
Definition SDL3pp_stdinc.h:1367
constexpr float ToSeconds(Seconds duration)
Converts a time duration to seconds (float).
Definition SDL3pp_stdinc.h:344
char * strupr(char *str)
Convert a string to uppercase.
Definition SDL3pp_stdinc.h:3032
size_t utf8strlen(StringParam str)
Count the number of codepoints in a UTF-8 string.
Definition SDL3pp_stdinc.h:3229
constexpr Seconds FromSeconds(float duration)
Converts a float to seconds representation.
Definition SDL3pp_stdinc.h:347
size_t utf8strnlen(StringParam str, size_t bytes)
Count the number of codepoints in a UTF-8 string, up to n bytes.
Definition SDL3pp_stdinc.h:3261
int vswprintf(wchar_t *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const wchar_t *fmt, va_list ap)
This works exactly like vswprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4128
int isupper(int x)
Report if a character is upper case.
Definition SDL3pp_stdinc.h:2069
size_t wcsnlen(const wchar_t *wstr, size_t maxlen)
This works exactly like wcsnlen() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:2515
double sqrt(double x)
Compute the square root of x.
Definition SDL3pp_stdinc.h:5752
::Uint32 Uint32
An unsigned 32-bit integer type.
Definition SDL3pp_stdinc.h:296
void *(SDLCALL *)(size_t nmemb, size_t size) calloc_func
A callback used to implement calloc().
Definition SDL3pp_stdinc.h:734
constexpr Sint16 MAX_SINT16
Max representable value.
Definition SDL3pp_stdinc.h:260
void srand(Uint64 seed)
Seeds the pseudo-random number generator.
Definition SDL3pp_stdinc.h:4215
constexpr Uint8 MAX_UINT8
Max representable value.
Definition SDL3pp_stdinc.h:247
double tan(double x)
Compute the tangent of x.
Definition SDL3pp_stdinc.h:5806
double sin(double x)
Compute the sine of x.
Definition SDL3pp_stdinc.h:5700
constexpr size_t ICONV_EILSEQ
Invalid input sequence was encountered.
Definition SDL3pp_stdinc.h:6080
const char * getenv_unsafe(StringParam name)
Get the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1328
size_t utf8strlcpy(char *dst, StringParam src, size_t dst_bytes)
Copy an UTF-8 string.
Definition SDL3pp_stdinc.h:2910
constexpr Sint64 MIN_SINT64
Min representable value.
Definition SDL3pp_stdinc.h:317
char * strtok_r(char *str, StringParam delim, char **saveptr)
This works exactly like strtok_r() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:3200
void * memset4(void *dst, Uint32 val, size_t dwords)
Initialize all 32-bit words of buffer of memory to a specific value.
Definition SDL3pp_stdinc.h:2368
constexpr size_t ICONV_ERROR
Generic error. Check GetError()?
Definition SDL3pp_stdinc.h:6074
ResourceRefT< IConvBase > IConvRef
Reference for IConv.
Definition SDL3pp_stdinc.h:78
void(SDLCALL *)(void *mem) free_func
A callback used to implement free().
Definition SDL3pp_stdinc.h:773
int iscntrl(int x)
Report if a character is a control character.
Definition SDL3pp_stdinc.h:1984
int swprintf(wchar_t *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const wchar_t *fmt,...)
This works exactly like swprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4068
constexpr double PI_D
The value of Pi, as a double-precision floating point literal.
Definition SDL3pp_stdinc.h:4584
int islower(int x)
Report if a character is lower case.
Definition SDL3pp_stdinc.h:2084
int isinf(double x)
Return whether the value is infinity.
Definition SDL3pp_stdinc.h:5250
int isspace(int x)
Report if a character is whitespace.
Definition SDL3pp_stdinc.h:2054
void DestroyEnvironment(EnvironmentRaw env)
Destroy a set of environment variables.
Definition SDL3pp_stdinc.h:1283
size_t strnlen(StringParam str, size_t maxlen)
This works exactly like strnlen() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:2849
int strcasecmp(StringParam str1, StringParam str2)
Compare two null-terminated UTF-8 strings, case-insensitively.
Definition SDL3pp_stdinc.h:3750
size_t strlen(StringParam str)
This works exactly like strlen() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:2826
constexpr Uint16 MAX_UINT16
Max representable value.
Definition SDL3pp_stdinc.h:273
const char * getenv(StringParam name)
Get the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1305
int setenv_unsafe(StringParam name, StringParam value, int overwrite)
Set the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1349
constexpr void InitInterface(I *iface)
A macro to initialize an SDL interface.
Definition SDL3pp_stdinc.h:578
::Sint16 Sint16
A signed 16-bit integer type.
Definition SDL3pp_stdinc.h:257
size_t iconv(IConvRef cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
This function converts text between encodings, reading from and writing to a buffer.
Definition SDL3pp_stdinc.h:6057
int wcscmp(const wchar_t *str1, const wchar_t *str2)
Compare two null-terminated wide strings.
Definition SDL3pp_stdinc.h:2666
double acos(double x)
Compute the arc cosine of x.
Definition SDL3pp_stdinc.h:4622
void SetVariable(StringParam name, StringParam value, bool overwrite)
Set the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1236
Sint32 rand(Sint32 n)
Generate a pseudo-random number less than n for positive n.
Definition SDL3pp_stdinc.h:4358
constexpr Sint64 MAX_SINT64
Max representable value.
Definition SDL3pp_stdinc.h:314
void qsort_r(void *base, size_t nmemb, size_t size, CompareCallback_r compare, void *userdata)
Sort an array, passing a userdata pointer to the compare function.
Definition SDL3pp_stdinc.h:1586
double floor(double x)
Compute the floor of x.
Definition SDL3pp_stdinc.h:5090
void *(SDLCALL *)(size_t size) malloc_func
A callback used to implement malloc().
Definition SDL3pp_stdinc.h:713
Uint32 StepUTF8(const char **pstr, size_t *pslen)
Decode a UTF-8 string, one Unicode codepoint at a time.
Definition SDL3pp_stdinc.h:3873
int toupper(int x)
Convert low-ASCII English letters to uppercase.
Definition SDL3pp_stdinc.h:2142
Uint32 murmur3_32(const void *data, size_t len, Uint32 seed)
Calculate a 32-bit MurmurHash3 value for a block of data.
Definition SDL3pp_stdinc.h:2234
size_t iconv(const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) const
This function converts text between encodings, reading from and writing to a buffer.
Definition SDL3pp_stdinc.h:6066
::Uint8 Uint8
An unsigned 8-bit integer type.
Definition SDL3pp_stdinc.h:244
std::chrono::duration< float > Seconds
Duration in seconds (float).
Definition SDL3pp_stdinc.h:335
constexpr Uint32 FourCC(Uint8 a, Uint8 b, Uint8 c, Uint8 d)
Define a four character code as a Uint32.
Definition SDL3pp_stdinc.h:191
Uint32 StepBackUTF8(StringParam start, const char **pstr)
Decode a UTF-8 string in reverse, one Unicode codepoint at a time.
Definition SDL3pp_stdinc.h:3905
size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen)
Copy a wide string.
Definition SDL3pp_stdinc.h:2545
float randf()
Generate a uniform pseudo-random floating point number less than 1.0.
Definition SDL3pp_stdinc.h:4450
constexpr T clamp(T x, U a, V b)
Return a value clamped to a range.
Definition SDL3pp_stdinc.h:1921
constexpr Time MAX_TIME
Max allowed time representation.
Definition SDL3pp_stdinc.h:512
constexpr Nanoseconds FromNS(Sint64 duration)
Converts a Sint64 to nanoseconds representation.
Definition SDL3pp_stdinc.h:353
int wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen)
Compare two wide strings, case-insensitively, up to a number of wchar_t.
Definition SDL3pp_stdinc.h:2774
void aligned_free(void *mem)
Free memory allocated by aligned_alloc().
Definition SDL3pp_stdinc.h:903
void zerop(T *x)
Clear an object's memory to zero, using a pointer.
Definition SDL3pp_stdinc.h:2414
int abs(int x)
Compute the absolute value of x.
Definition SDL3pp_stdinc.h:1810
void * calloc(size_t nmemb, size_t size)
Allocate a zero-initialized array.
Definition SDL3pp_stdinc.h:633
void GetMemoryFunctions(malloc_func *malloc_func, calloc_func *calloc_func, realloc_func *realloc_func, free_func *free_func)
Get the current set of SDL memory functions.
Definition SDL3pp_stdinc.h:818
OwnArray< char * > GetEnvironmentVariables(EnvironmentRef env)
Get all variables in the environment.
Definition SDL3pp_stdinc.h:1198
void qsort(void *base, size_t nmemb, size_t size, CompareCallback compare)
Sort an array.
Definition SDL3pp_stdinc.h:1432
constexpr Time MIN_TIME
Min allowed time representation.
Definition SDL3pp_stdinc.h:515
constexpr Sint64 ToNS(Nanoseconds duration)
Converts a time duration to nanoseconds (Sint64);.
Definition SDL3pp_stdinc.h:350
SDL_Environment * EnvironmentRaw
Alias to raw representation for Environment.
Definition SDL3pp_stdinc.h:55
int isblank(int x)
Report if a character is blank (a space or tab).
Definition SDL3pp_stdinc.h:1969
void * realloc(void *mem, size_t size)
Change the size of allocated memory.
Definition SDL3pp_stdinc.h:674
void Destroy()
Destroy a set of environment variables.
Definition SDL3pp_stdinc.h:1288
int vasprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap)
This works exactly like vasprintf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:4191
::Sint8 Sint8
A signed 8-bit integer type.
Definition SDL3pp_stdinc.h:231
char * itoa(int value, char *str, int radix)
Convert an integer into a string.
Definition SDL3pp_stdinc.h:3291
int ispunct(int x)
Report if a character is a punctuation mark.
Definition SDL3pp_stdinc.h:2032
int vsscanf(StringParam text, SDL_SCANF_FORMAT_STRING const char *fmt, va_list ap)
This works exactly like vsscanf() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:3985
constexpr Uint8 MIN_UINT8
Min representable value.
Definition SDL3pp_stdinc.h:250
int(SDLCALL *)(const void *a, const void *b) CompareCallback
A callback used with SDL sorting and binary search functions.
Definition SDL3pp_stdinc.h:1386
wchar_t * wcsnstr(const wchar_t *haystack, const wchar_t *needle, size_t maxlen)
Search a wide string, up to n wide chars, for the first instance of a specific substring.
Definition SDL3pp_stdinc.h:2643
Uint32 crc32(Uint32 crc, const void *data, size_t len)
Calculate a CRC-32 value.
Definition SDL3pp_stdinc.h:2205
double log10(double x)
Compute the base-10 logarithm of x.
Definition SDL3pp_stdinc.h:5378
const char * GetEnvironmentVariable(EnvironmentRef env, StringParam name)
Get the value of a variable in the environment.
Definition SDL3pp_stdinc.h:1169
constexpr float PI_F
The value of Pi, as a single-precision floating point literal.
Definition SDL3pp_stdinc.h:4593
wchar_t * wcsstr(const wchar_t *haystack, const wchar_t *needle)
Search a wide string for the first instance of a specific substring.
Definition SDL3pp_stdinc.h:2617
void * bsearch(const void *key, const void *base, size_t nmemb, size_t size, CompareCallback compare)
Perform a binary search on a previously sorted array.
Definition SDL3pp_stdinc.h:1489
std::chrono::milliseconds Milliseconds
Duration in Miliseconds (Uint32).
Definition SDL3pp_stdinc.h:341
double cos(double x)
Compute the cosine of x.
Definition SDL3pp_stdinc.h:4973
void free(void *mem)
Free allocated memory.
Definition SDL3pp_stdinc.h:694
double atan2(double y, double x)
Compute the arc tangent of y / x, using the signs of x and y to adjust the result's quadrant.
Definition SDL3pp_stdinc.h:4805
void *(SDLCALL *)(void *mem, size_t size) realloc_func
A callback used to implement realloc().
Definition SDL3pp_stdinc.h:755
int wcscasecmp(const wchar_t *str1, const wchar_t *str2)
Compare two null-terminated wide strings, case-insensitively.
Definition SDL3pp_stdinc.h:2730
char * strpbrk(StringParam str, StringParam breakset)
Searches a string for the first occurrence of any character contained in a breakset,...
Definition SDL3pp_stdinc.h:3812
void * aligned_alloc(size_t alignment, size_t size)
Allocate memory aligned to a specific alignment.
Definition SDL3pp_stdinc.h:882
int GetNumAllocations()
Get the number of outstanding (unfreed) allocations.
Definition SDL3pp_stdinc.h:914
Uint32 rand_bits()
Generate 32 pseudo-random bits.
Definition SDL3pp_stdinc.h:4525
constexpr Sint8 MAX_SINT8
Max representable value.
Definition SDL3pp_stdinc.h:234
constexpr Uint8 MIN_UINT32
Min representable value.
Definition SDL3pp_stdinc.h:302
double trunc(double x)
Truncate x to an integer.
Definition SDL3pp_stdinc.h:5147
int(SDLCALL *)(void *userdata, const void *a, const void *b) CompareCallback_r
A callback used with SDL sorting and binary search functions.
Definition SDL3pp_stdinc.h:1513
char * ltoa(long value, char *str, int radix)
Convert a long integer into a string.
Definition SDL3pp_stdinc.h:3351
size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen)
Concatenate wide strings.
Definition SDL3pp_stdinc.h:2576
double atof(StringParam str)
Parse a double from a string.
Definition SDL3pp_stdinc.h:3492
constexpr size_t ICONV_EINVAL
Incomplete input sequence was encountered.
Definition SDL3pp_stdinc.h:6083
constexpr Sint32 MAX_SINT32
Max representable value.
Definition SDL3pp_stdinc.h:286
::Uint64 Uint64
An unsigned 64-bit integer type.
Definition SDL3pp_stdinc.h:326
void * bsearch_r(const void *key, const void *base, size_t nmemb, size_t size, CompareCallback_r compare, void *userdata)
Perform a binary search on a previously sorted array, passing a userdata pointer to the compare funct...
Definition SDL3pp_stdinc.h:1716
long strtol(StringParam str, char **endp, int base)
Parse a long from a string.
Definition SDL3pp_stdinc.h:3525
OwnArray< char > iconv_wchar_utf8(std::wstring_view S)
Convert a wchar_t string to UTF-8.
Definition SDL3pp_stdinc.h:6190
char * strrchr(StringParam str, int c)
Search a string for the last instance of a specific byte.
Definition SDL3pp_stdinc.h:3092
size_t wcslen(const wchar_t *wstr)
This works exactly like wcslen() but doesn't require access to a C runtime.
Definition SDL3pp_stdinc.h:2485
int isalnum(int x)
Query if a character is alphabetic (a letter) or a number.
Definition SDL3pp_stdinc.h:1954
double fmod(double x, double y)
Return the floating-point remainder of x / y.
Definition SDL3pp_stdinc.h:5206
void * memcpy(void *dst, const void *src, size_t len)
Copy non-overlapping memory.
Definition SDL3pp_stdinc.h:2257
static Time FromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime)
Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time.
Definition SDL3pp_time.h:467
void ToWindows(Uint32 *dwLowDateTime, Uint32 *dwHighDateTime) const
Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1,...
Definition SDL3pp_time.h:442
static Time Current()
Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coo...
Definition SDL3pp_time.h:369
constexpr Sint64 ToPosix() const
Convert nanoseconds to seconds.
Definition SDL3pp_timer.h:139
static constexpr Time FromPosix(Sint64 time)
Convert seconds to nanoseconds.
Definition SDL3pp_timer.h:105
Main include header for the SDL3pp library.
Uint32 narrowU32(T value)
Narrows to Uint32.
Definition SDL3pp_stdinc.h:6275
Sint32 narrowS32(T value)
Narrows to Sint32.
Definition SDL3pp_stdinc.h:6262
Base class to Environment.
Definition SDL3pp_stdinc.h:922
Uint64 GetVariableCount()
Get the Variables count.
Definition SDL3pp_stdinc.h:984
constexpr ResourceBaseT()=default
Default constructor, creates null/invalid resource.
A thread-safe set of environment variables.
Definition SDL3pp_stdinc.h:1044
constexpr Environment(EnvironmentRaw resource) noexcept
Constructs from raw Environment.
Definition SDL3pp_stdinc.h:1054
constexpr Environment & operator=(Environment &&other) noexcept
Assignment operator.
Definition SDL3pp_stdinc.h:1091
~Environment()
Destructor.
Definition SDL3pp_stdinc.h:1088
constexpr Environment(Environment &&other) noexcept
Move constructor.
Definition SDL3pp_stdinc.h:1060
Base class to IConv.
Definition SDL3pp_stdinc.h:5843
constexpr ResourceBaseT()=default
Default constructor, creates null/invalid resource.
An opaque handle representing string encoding conversion state.
Definition SDL3pp_stdinc.h:5920
IConv(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition SDL3pp_stdinc.h:5924
constexpr IConv & operator=(IConv &&other) noexcept
Assignment operator.
Definition SDL3pp_stdinc.h:5969
~IConv()
Destructor.
Definition SDL3pp_stdinc.h:5966
constexpr IConv(IConvRaw resource) noexcept
Constructs from raw IConv.
Definition SDL3pp_stdinc.h:5936
constexpr IConv(IConv &&other) noexcept
Move constructor.
Definition SDL3pp_stdinc.h:5942
A non-owning reference wrapper for a given resource.
Definition SDL3pp_resource.h:93