unpack_define.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * MessagePack unpacking routine template
  3. *
  4. * Copyright (C) 2008-2010 FURUHASHI Sadayuki
  5. *
  6. * Distributed under the Boost Software License, Version 1.0.
  7. * (See accompanying file LICENSE_1_0.txt or copy at
  8. * http://www.boost.org/LICENSE_1_0.txt)
  9. */
  10. #ifndef MSGPACK_UNPACK_DEFINE_HPP
  11. #define MSGPACK_UNPACK_DEFINE_HPP
  12. #include "msgpack/sysdep.hpp"
  13. #ifndef MSGPACK_EMBED_STACK_SIZE
  14. #define MSGPACK_EMBED_STACK_SIZE 32
  15. #endif
  16. typedef enum {
  17. MSGPACK_CS_HEADER = 0x00, // nil
  18. //MSGPACK_CS_ = 0x01,
  19. //MSGPACK_CS_ = 0x02, // false
  20. //MSGPACK_CS_ = 0x03, // true
  21. MSGPACK_CS_BIN_8 = 0x04,
  22. MSGPACK_CS_BIN_16 = 0x05,
  23. MSGPACK_CS_BIN_32 = 0x06,
  24. MSGPACK_CS_EXT_8 = 0x07,
  25. MSGPACK_CS_EXT_16 = 0x08,
  26. MSGPACK_CS_EXT_32 = 0x09,
  27. MSGPACK_CS_FLOAT = 0x0a,
  28. MSGPACK_CS_DOUBLE = 0x0b,
  29. MSGPACK_CS_UINT_8 = 0x0c,
  30. MSGPACK_CS_UINT_16 = 0x0d,
  31. MSGPACK_CS_UINT_32 = 0x0e,
  32. MSGPACK_CS_UINT_64 = 0x0f,
  33. MSGPACK_CS_INT_8 = 0x10,
  34. MSGPACK_CS_INT_16 = 0x11,
  35. MSGPACK_CS_INT_32 = 0x12,
  36. MSGPACK_CS_INT_64 = 0x13,
  37. MSGPACK_CS_FIXEXT_1 = 0x14,
  38. MSGPACK_CS_FIXEXT_2 = 0x15,
  39. MSGPACK_CS_FIXEXT_4 = 0x16,
  40. MSGPACK_CS_FIXEXT_8 = 0x17,
  41. MSGPACK_CS_FIXEXT_16 = 0x18,
  42. MSGPACK_CS_STR_8 = 0x19, // str8
  43. MSGPACK_CS_STR_16 = 0x1a, // str16
  44. MSGPACK_CS_STR_32 = 0x1b, // str32
  45. MSGPACK_CS_ARRAY_16 = 0x1c,
  46. MSGPACK_CS_ARRAY_32 = 0x1d,
  47. MSGPACK_CS_MAP_16 = 0x1e,
  48. MSGPACK_CS_MAP_32 = 0x1f,
  49. //MSGPACK_ACS_BIG_INT_VALUE,
  50. //MSGPACK_ACS_BIG_FLOAT_VALUE,
  51. MSGPACK_ACS_STR_VALUE,
  52. MSGPACK_ACS_BIN_VALUE,
  53. MSGPACK_ACS_EXT_VALUE
  54. } msgpack_unpack_state;
  55. typedef enum {
  56. MSGPACK_CT_ARRAY_ITEM,
  57. MSGPACK_CT_MAP_KEY,
  58. MSGPACK_CT_MAP_VALUE
  59. } msgpack_container_type;
  60. #endif /* msgpack/unpack_define.hpp */