10 #ifndef TurtleBrains_Types_hpp
11 #define TurtleBrains_Types_hpp
13 #include <turtle_brains/core/tb_configuration.hpp>
14 #include <turtle_brains/core/tb_defines.hpp>
23 using byte = std::uint8_t;
39 explicit size(
const std::size_t value) :
45 return tbCore::RangedCast<tbCore::uint32>(mValue);
48 operator int()
const {
49 return tbCore::RangedCast<int>(mValue);
52 operator size_t()
const {
67 size32(
const std::size_t value) :
68 mValue(tbCore::RangedCast<tbCore::uint32>(value))
87 size64(
const std::size_t value) :
96 using InputFile = std::istream;
97 using OutputFile = std::ostream;
105 inline constexpr
size_t OneKilobyte(
void) {
return 1024; }
106 inline constexpr
size_t TwoKilobytes(
void) {
return OneKilobyte() * 2; }
107 inline constexpr
size_t FourKilobytes(
void) {
return OneKilobyte() * 4; }
108 inline constexpr
size_t OneMegabyte(
void) {
return 1024 * 1024; }
109 inline constexpr
size_t OneGigabyte(
void) {
return 1024 * 1024 * 1024; }
Definition: tb_types.hpp:60
Definition: tb_types.hpp:80
Definition: tb_types.hpp:32
Contains core functionality for each component of the API.
Definition: tb_debug_logger.hpp:125
std::uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:22
std::uint16_t uint16
Unsigned integer with a size of 16 bits. Supports values from 0 to 65535.
Definition: tb_types.hpp:25
std::int64_t int64
Signed integer with a size of 64 bits. Supports values from -(2^63) to (2^63 - 1).
Definition: tb_types.hpp:28
std::int16_t int16
Signed integer with a size of 16 bits. Supports values from -32768 to 32767.
Definition: tb_types.hpp:24
std::int8_t int8
Signed integer with a size of 8 bits. Supports values from -128 to 127.
Definition: tb_types.hpp:21
std::uint32_t uint32
Unsigned integer with a size of 32 bits. Supports values from 0 to 4294967295, (2^32 - 1).
Definition: tb_types.hpp:27
std::uint64_t uint64
Unsigned integer with a size of 64 bits, Supports values from 0 to (2^64 - 1).
Definition: tb_types.hpp:29
std::int32_t int32
Signed integer with a size of 32 bits. Supports values from -2147483648 to 2147483647.
Definition: tb_types.hpp:26
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:22