repeated_fields.incl 1.2 KB

123456789101112131415161718192021
  1. // Intentionally no #pragma once
  2. // (Field name == JSON key, Type, Values...)
  3. DEFINE_REPEATED_FIELD(I32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
  4. DEFINE_REPEATED_FIELD(I64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
  5. DEFINE_REPEATED_FIELD(UI32, ui32, 0ul, 1ul, Max<ui32>())
  6. DEFINE_REPEATED_FIELD(UI64, ui64, 0ull, 1ull, Max<ui64>())
  7. DEFINE_REPEATED_FIELD(SI32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
  8. DEFINE_REPEATED_FIELD(SI64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
  9. DEFINE_REPEATED_FIELD(FI32, ui32, 0, 1, Max<ui32>())
  10. DEFINE_REPEATED_FIELD(FI64, ui64, 0ull, 1ull, Max<ui64>())
  11. DEFINE_REPEATED_FIELD(SFI32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
  12. DEFINE_REPEATED_FIELD(SFI64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
  13. DEFINE_REPEATED_FIELD(Bool, bool, false, true)
  14. DEFINE_REPEATED_FIELD(String, TString, "", "Lorem ipsum", "123123")
  15. DEFINE_REPEATED_FIELD(Bytes, TString, "", "מחשב", "\x1")
  16. DEFINE_REPEATED_FIELD(Enum, EEnum, E_1, E_2, E_3)
  17. DEFINE_REPEATED_FIELD(Float, float, 0.0f, 1.0f, 1.123f)
  18. DEFINE_REPEATED_FIELD(Double, double, 0.0, 1.0, 1.123456789012)
  19. DEFINE_REPEATED_FIELD(OneString, TString, "", "Lorem ipsum dolor", "1231231")
  20. DEFINE_REPEATED_FIELD(OneTwoString, TString, "", "Lorem ipsum dolor sit", "12312312")