5 #include "core_export.h" 51 static constexpr
uint32 __endian_value__ = 0x01020304;
52 static constexpr
xtd::byte __endian_query__ =
static_cast<const xtd::byte&
>(__endian_value__);
73 static constexpr
bool is_big_endian = __endian_query__ == 0x01
u;
80 static constexpr
bool is_little_endian = __endian_query__ == 0x04
u;
87 static constexpr
endian endianness = is_little_endian ? endian::little : endian::big;
100 static int64 double_to_int64_bits(
double value) noexcept;
108 static std::vector<xtd::byte> get_bytes(
bool value) noexcept;
116 static std::vector<xtd::byte> get_bytes(
char value) noexcept;
124 static std::vector<xtd::byte> get_bytes(
char16 value) noexcept;
132 static std::vector<xtd::byte> get_bytes(
char32 value) noexcept;
140 static std::vector<xtd::byte> get_bytes(
wchar value) noexcept;
148 static std::vector<xtd::byte> get_bytes(
double value) noexcept;
153 static std::vector<xtd::byte> get_bytes(
sbyte value) noexcept;
161 static std::vector<xtd::byte> get_bytes(
int16 value) noexcept;
169 static std::vector<xtd::byte> get_bytes(
int32 value) noexcept;
177 static std::vector<xtd::byte> get_bytes(
int64 value) noexcept;
185 static std::vector<xtd::byte> get_bytes(
float value) noexcept;
190 static std::vector<xtd::byte> get_bytes(
xtd::byte value) noexcept;
198 static std::vector<xtd::byte> get_bytes(
uint16 value) noexcept;
206 static std::vector<xtd::byte> get_bytes(
uint32 value) noexcept;
214 static std::vector<xtd::byte> get_bytes(
uint64 value) noexcept;
217 static std::vector<xtd::byte> get_bytes(
slong value) noexcept;
218 static std::vector<xtd::byte> get_bytes(
xtd::ulong value) noexcept;
225 static float int32_bits_to_single(
int32 value) noexcept;
231 static double int64_bits_to_double(
int64 value) noexcept;
237 static int32 single_to_int32_bits(
float value) noexcept;
248 static bool to_boolean(
const std::vector<xtd::byte>& value,
size_t start_index);
258 static char32 to_char(
const std::vector<xtd::byte>& value,
size_t start_index);
268 static double to_double(
const std::vector<xtd::byte>& value,
size_t start_index);
278 static int16 to_int16(
const std::vector<xtd::byte>& value,
size_t start_index);
288 static int32 to_int32(
const std::vector<xtd::byte>& value,
size_t start_index);
298 static int64 to_int64(
const std::vector<xtd::byte>& value,
size_t start_index);
308 static float to_single(
const std::vector<xtd::byte>& value,
size_t start_index);
318 static uint16 to_uint16(
const std::vector<xtd::byte>& value,
size_t start_index);
328 static uint32 to_uint32(
const std::vector<xtd::byte>& value,
size_t start_index);
338 static uint64 to_uint64(
const std::vector<xtd::byte>& value,
size_t start_index);
375 static xtd::ustring to_string(
const std::vector<xtd::byte>& value,
size_t start_index,
size_t length);
Contains xtd::static_object class.
Contains xtd fundamental types.
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition: types.h:173
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition: static.h:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
Represnets "Big-endian" order.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
std::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition: enum_collection.h:19
Contains enum_ and enum_ut_ keywords.
Converts base data types to an std::vector of bytes, and an std::vector of bytes to base data types...
Definition: bit_converter.h:49
Represnets "Little-endian" order.
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition: types.h:206
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
endian
Represents the xtd::byte order ("endianness") in which data is stored in this computer architecture...
Definition: bit_converter.h:57
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition: types.h:272
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
wchar_t wchar
Represents a wide character.
Definition: types.h:284
Provides the registration struct for enumerations.
Definition: enum_register.h:36