Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
types.h File Reference

Project-wide fixed-width integer aliases (var8, var16, ...). More...

#include <cstdint>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using uvar8s = std::uint_least8_t
 Fully Detailed.
using uvar16s = std::uint_least16_t
 Unsigned, at least 16-bit, smallest such type.
using uvar32s = std::uint_least32_t
 Unsigned, at least 32-bit, smallest such type.
using uvar64s = std::uint_least64_t
 Unsigned, at least 64-bit, smallest such type.
using svar8s = std::int_least8_t
 Signed, at least 8-bit, smallest such type.
using svar16s = std::int_least16_t
 Signed, at least 16-bit, smallest such type.
using svar32s = std::int_least32_t
 Signed, at least 32-bit, smallest such type.
using svar64s = std::int_least64_t
 Signed, at least 64-bit, smallest such type.
using uvar8f = std::uint_fast8_t
 Unsigned, at least 8-bit, fastest such type.
using uvar16f = std::uint_fast16_t
 Unsigned, at least 16-bit, fastest such type.
using uvar32f = std::uint_fast32_t
 Unsigned, at least 32-bit, fastest such type.
using uvar64f = std::uint_fast64_t
 Unsigned, at least 64-bit, fastest such type.
using svar8f = std::int_fast8_t
 Signed, at least 8-bit, fastest such type.
using svar16f = std::int_fast16_t
 Signed, at least 16-bit, fastest such type.
using svar32f = std::int_fast32_t
 Signed, at least 32-bit, fastest such type.
using svar64f = std::int_fast64_t
 Signed, at least 64-bit, fastest such type.
using uvar8e = std::uint8_t
 Unsigned, exactly 8-bit (platform must support it).
using uvar16e = std::uint16_t
 Unsigned, exactly 16-bit (platform must support it).
using uvar32e = std::uint32_t
 Unsigned, exactly 32-bit (platform must support it).
using uvar64e = std::uint64_t
 Unsigned, exactly 64-bit (platform must support it).
using svar8e = std::int8_t
 Signed, exactly 8-bit (platform must support it).
using svar16e = std::int16_t
 Signed, exactly 16-bit (platform must support it).
using svar32e = std::int32_t
 Signed, exactly 32-bit (platform must support it).
using svar64e = std::int64_t
 Signed, exactly 64-bit (platform must support it).
using var8s = uvar8s
 Shorthand with default assumptions.
using var16s = uvar16s
 Smallest >=16-bit, default (unsigned) signing.
using var32s = uvar32s
 Smallest >=32-bit, default (unsigned) signing.
using var64s = uvar64s
 Smallest >=64-bit, default (unsigned) signing.
using var8f = uvar8f
 Fastest >=8-bit, default (unsigned) signing.
using var16f = uvar16f
 Fastest >=16-bit, default (unsigned) signing.
using var32f = uvar32f
 Fastest >=32-bit, default (unsigned) signing.
using var64f = uvar64f
 Fastest >=64-bit, default (unsigned) signing.
using var8e = uvar8e
 Exactly 8-bit, default (unsigned) signing.
using var16e = uvar16e
 Exactly 16-bit, default (unsigned) signing.
using var32e = uvar32e
 Exactly 32-bit, default (unsigned) signing.
using var64e = uvar64e
 Exactly 64-bit, default (unsigned) signing.
using svar8 = svar8e
 Smaller Shorthand with most default assumptions.
using svar16 = svar16e
 Signed, exactly 16-bit (shorthand for svar16e).
using svar32 = svar32e
 Signed, exactly 32-bit (shorthand for svar32e).
using svar64 = svar64e
 Signed, exactly 64-bit (shorthand for svar64e).
using uvar8 = uvar8e
 Unsigned, exactly 8-bit (shorthand for uvar8e).
using uvar16 = uvar16e
 Unsigned, exactly 16-bit (shorthand for uvar16e).
using uvar32 = uvar32e
 Unsigned, exactly 32-bit (shorthand for uvar32e).
using uvar64 = uvar64e
 Unsigned, exactly 64-bit (shorthand for uvar64e).
using var8 = var8e
 Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
using var16 = var16e
 Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.
using var32 = var32e
 Everyday 32-bit alias. Exact width to avoid the "fastest" widening bug.
using var64 = var64e
 Everyday 64-bit alias. Exact width to avoid the "fastest" widening bug.

Detailed Description

Project-wide fixed-width integer aliases (var8, var16, ...).

A save-file editor lives and dies by exact byte widths, so the whole project spells out integer sizes explicitly rather than trusting int/short. These aliases wrap the <cstdint> least/fast/exact families behind one short, consistent naming scheme so call sites read as "an N-bit value" instead of a platform-dependent built-in type.

Naming scheme
[us]var[#][sfe]
  • [us] – u nsigned or s igned. Omitted => defaults to unsigned.
  • [#] – minimum bit width needed: 8, 16, 32, or 64.
  • [sfe] – s mallest, f astest, or e xact minimum size. Omitted => defaults to smallest. exact means no more or fewer bits than requested and may not be supported on every platform.

The blocks below build up from the fully-spelled-out forms to the everyday shorthand (var8/var16/...) that the rest of the codebase actually uses.

Definition in file types.h.

Typedef Documentation

◆ svar16

using svar16 = svar16e

Signed, exactly 16-bit (shorthand for svar16e).

Definition at line 110 of file types.h.

◆ svar16e

using svar16e = std::int16_t

Signed, exactly 16-bit (platform must support it).

Definition at line 79 of file types.h.

◆ svar16f

using svar16f = std::int_fast16_t

Signed, at least 16-bit, fastest such type.

Definition at line 67 of file types.h.

◆ svar16s

using svar16s = std::int_least16_t

Signed, at least 16-bit, smallest such type.

Definition at line 55 of file types.h.

◆ svar32

using svar32 = svar32e

Signed, exactly 32-bit (shorthand for svar32e).

Definition at line 111 of file types.h.

◆ svar32e

using svar32e = std::int32_t

Signed, exactly 32-bit (platform must support it).

Definition at line 80 of file types.h.

◆ svar32f

using svar32f = std::int_fast32_t

Signed, at least 32-bit, fastest such type.

Definition at line 68 of file types.h.

◆ svar32s

using svar32s = std::int_least32_t

Signed, at least 32-bit, smallest such type.

Definition at line 56 of file types.h.

◆ svar64

using svar64 = svar64e

Signed, exactly 64-bit (shorthand for svar64e).

Definition at line 112 of file types.h.

◆ svar64e

using svar64e = std::int64_t

Signed, exactly 64-bit (platform must support it).

Definition at line 81 of file types.h.

◆ svar64f

using svar64f = std::int_fast64_t

Signed, at least 64-bit, fastest such type.

Definition at line 69 of file types.h.

◆ svar64s

using svar64s = std::int_least64_t

Signed, at least 64-bit, smallest such type.

Definition at line 57 of file types.h.

◆ svar8

using svar8 = svar8e

Smaller Shorthand with most default assumptions.

Signed, exactly 8-bit (shorthand for svar8e).

Definition at line 109 of file types.h.

◆ svar8e

using svar8e = std::int8_t

Signed, exactly 8-bit (platform must support it).

Definition at line 78 of file types.h.

◆ svar8f

using svar8f = std::int_fast8_t

Signed, at least 8-bit, fastest such type.

Definition at line 66 of file types.h.

◆ svar8s

using svar8s = std::int_least8_t

Signed, at least 8-bit, smallest such type.

Definition at line 54 of file types.h.

◆ uvar16

using uvar16 = uvar16e

Unsigned, exactly 16-bit (shorthand for uvar16e).

Definition at line 115 of file types.h.

◆ uvar16e

using uvar16e = std::uint16_t

Unsigned, exactly 16-bit (platform must support it).

Definition at line 73 of file types.h.

◆ uvar16f

using uvar16f = std::uint_fast16_t

Unsigned, at least 16-bit, fastest such type.

Definition at line 61 of file types.h.

◆ uvar16s

using uvar16s = std::uint_least16_t

Unsigned, at least 16-bit, smallest such type.

Definition at line 49 of file types.h.

◆ uvar32

using uvar32 = uvar32e

Unsigned, exactly 32-bit (shorthand for uvar32e).

Definition at line 116 of file types.h.

◆ uvar32e

using uvar32e = std::uint32_t

Unsigned, exactly 32-bit (platform must support it).

Definition at line 74 of file types.h.

◆ uvar32f

using uvar32f = std::uint_fast32_t

Unsigned, at least 32-bit, fastest such type.

Definition at line 62 of file types.h.

◆ uvar32s

using uvar32s = std::uint_least32_t

Unsigned, at least 32-bit, smallest such type.

Definition at line 50 of file types.h.

◆ uvar64

using uvar64 = uvar64e

Unsigned, exactly 64-bit (shorthand for uvar64e).

Definition at line 117 of file types.h.

◆ uvar64e

using uvar64e = std::uint64_t

Unsigned, exactly 64-bit (platform must support it).

Definition at line 75 of file types.h.

◆ uvar64f

using uvar64f = std::uint_fast64_t

Unsigned, at least 64-bit, fastest such type.

Definition at line 63 of file types.h.

◆ uvar64s

using uvar64s = std::uint_least64_t

Unsigned, at least 64-bit, smallest such type.

Definition at line 51 of file types.h.

◆ uvar8

using uvar8 = uvar8e

Unsigned, exactly 8-bit (shorthand for uvar8e).

Definition at line 114 of file types.h.

◆ uvar8e

using uvar8e = std::uint8_t

Unsigned, exactly 8-bit (platform must support it).

Definition at line 72 of file types.h.

◆ uvar8f

using uvar8f = std::uint_fast8_t

Unsigned, at least 8-bit, fastest such type.

Definition at line 60 of file types.h.

◆ uvar8s

using uvar8s = std::uint_least8_t

Fully Detailed.

Unsigned, at least 8-bit, smallest such type.

Definition at line 48 of file types.h.

◆ var16

using var16 = var16e

Everyday 16-bit alias. Exact width to avoid the "fastest" widening bug.

Definition at line 125 of file types.h.

◆ var16e

using var16e = uvar16e

Exactly 16-bit, default (unsigned) signing.

Definition at line 101 of file types.h.

◆ var16f

using var16f = uvar16f

Fastest >=16-bit, default (unsigned) signing.

Definition at line 95 of file types.h.

◆ var16s

using var16s = uvar16s

Smallest >=16-bit, default (unsigned) signing.

Definition at line 89 of file types.h.

◆ var32

using var32 = var32e

Everyday 32-bit alias. Exact width to avoid the "fastest" widening bug.

Definition at line 126 of file types.h.

◆ var32e

using var32e = uvar32e

Exactly 32-bit, default (unsigned) signing.

Definition at line 102 of file types.h.

◆ var32f

using var32f = uvar32f

Fastest >=32-bit, default (unsigned) signing.

Definition at line 96 of file types.h.

◆ var32s

using var32s = uvar32s

Smallest >=32-bit, default (unsigned) signing.

Definition at line 90 of file types.h.

◆ var64

using var64 = var64e

Everyday 64-bit alias. Exact width to avoid the "fastest" widening bug.

Definition at line 127 of file types.h.

◆ var64e

using var64e = uvar64e

Exactly 64-bit, default (unsigned) signing.

Definition at line 103 of file types.h.

◆ var64f

using var64f = uvar64f

Fastest >=64-bit, default (unsigned) signing.

Definition at line 97 of file types.h.

◆ var64s

using var64s = uvar64s

Smallest >=64-bit, default (unsigned) signing.

Definition at line 91 of file types.h.

◆ var8

using var8 = var8e

Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.

Definition at line 124 of file types.h.

◆ var8e

using var8e = uvar8e

Exactly 8-bit, default (unsigned) signing.

Definition at line 100 of file types.h.

◆ var8f

using var8f = uvar8f

Fastest >=8-bit, default (unsigned) signing.

Definition at line 94 of file types.h.

◆ var8s

using var8s = uvar8s

Shorthand with default assumptions.

Smallest >=8-bit, default (unsigned) signing.

Definition at line 88 of file types.h.