PrimitiveTypes.h 878 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #pragma once
  4. #include <cstddef> // std::byte
  5. // User can inject Urho3D::PrimitiveTypes into other namespace
  6. namespace Urho3D::PrimitiveTypes
  7. {
  8. // https://en.cppreference.com/w/cpp/language/types
  9. using i8 = signed char;
  10. using u8 = unsigned char;
  11. using i16 = short;
  12. using u16 = unsigned short;
  13. using i32 = int;
  14. using u32 = unsigned;
  15. using i64 = long long;
  16. using u64 = unsigned long long;
  17. // Unicode code point (UTF-32 code unit)
  18. using c32 = char32_t;
  19. // For raw data
  20. using std::byte;
  21. // Some hash value (checksum for example)
  22. using hash16 = u16;
  23. using hash32 = u32;
  24. using hash64 = u64;
  25. // Some ID
  26. using id32 = u32;
  27. // Some mask
  28. using mask32 = u32;
  29. // Some flags
  30. using flagset32 = u32;
  31. } // namespace Urho3D::PrimitiveTypes
  32. namespace Urho3D
  33. {
  34. using namespace Urho3D::PrimitiveTypes;
  35. } // namespace Urho3D