1Types of items
2===============================================
3
4Every :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard <http://tools.ietf.org/html/rfc7049>`_:
5
6.. doxygenenum:: cbor_type
7
8To find out the type of an item, one can use
9
10.. doxygenfunction:: cbor_typeof
11
12Please note the distinction between functions like :func:`cbor_isa_uint()` and :func:`cbor_is_int()`. The following functions work solely with the major type value.
13
14
15Binary queries
16------------------------
17
18Alternatively, there are functions to query each particular type.
19
20.. warning:: Passing an invalid :type:`cbor_item_t` reference to any of these functions results in undefined behavior.
21
22.. doxygenfunction:: cbor_isa_uint
23.. doxygenfunction:: cbor_isa_negint
24.. doxygenfunction:: cbor_isa_bytestring
25.. doxygenfunction:: cbor_isa_string
26.. doxygenfunction:: cbor_isa_array
27.. doxygenfunction:: cbor_isa_map
28.. doxygenfunction:: cbor_isa_tag
29.. doxygenfunction:: cbor_isa_float_ctrl
30
31
32Logical queries
33------------------------
34
35These functions provide information about the item type from a more high-level perspective
36
37.. doxygenfunction:: cbor_is_int
38.. doxygenfunction:: cbor_is_float
39.. doxygenfunction:: cbor_is_bool
40.. doxygenfunction:: cbor_is_null
41.. doxygenfunction:: cbor_is_undef
42