Coverage Report

Created: 2026-03-15 06:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/msgpack-c/include/msgpack/v2/null_visitor.hpp
Line
Count
Source
1
//
2
// MessagePack for C++ deserializing routine
3
//
4
// Copyright (C) 2017 KONDO Takatoshi
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_V2_NULL_VISITOR_HPP
11
#define MSGPACK_V2_NULL_VISITOR_HPP
12
13
#include "msgpack/v2/null_visitor_decl.hpp"
14
15
namespace msgpack {
16
17
/// @cond
18
MSGPACK_API_VERSION_NAMESPACE(v2) {
19
/// @endcond
20
21
struct null_visitor {
22
0
    bool visit_nil() {
23
0
        return true;
24
0
    }
25
0
    bool visit_boolean(bool /*v*/) {
26
0
        return true;
27
0
    }
28
0
    bool visit_positive_integer(uint64_t /*v*/) {
29
0
        return true;
30
0
    }
31
0
    bool visit_negative_integer(int64_t /*v*/) {
32
0
        return true;
33
0
    }
34
0
    bool visit_float32(float /*v*/) {
35
0
        return true;
36
0
    }
37
0
    bool visit_float64(double /*v*/) {
38
0
        return true;
39
0
    }
40
0
    bool visit_str(const char* /*v*/, uint32_t /*size*/) {
41
0
        return true;
42
0
    }
43
0
    bool visit_bin(const char* /*v*/, uint32_t /*size*/) {
44
0
        return true;
45
0
    }
46
0
    bool visit_ext(const char* /*v*/, uint32_t /*size*/) {
47
0
        return true;
48
0
    }
49
0
    bool start_array(uint32_t /*num_elements*/) {
50
0
        return true;
51
0
    }
52
0
    bool start_array_item() {
53
0
        return true;
54
0
    }
55
0
    bool end_array_item() {
56
0
        return true;
57
0
    }
58
0
    bool end_array() {
59
0
        return true;
60
0
    }
61
0
    bool start_map(uint32_t /*num_kv_pairs*/) {
62
0
        return true;
63
0
    }
64
0
    bool start_map_key() {
65
0
        return true;
66
0
    }
67
0
    bool end_map_key() {
68
0
        return true;
69
0
    }
70
0
    bool start_map_value() {
71
0
        return true;
72
0
    }
73
0
    bool end_map_value() {
74
0
        return true;
75
0
    }
76
0
    bool end_map() {
77
0
        return true;
78
0
    }
79
0
    void parse_error(size_t /*parsed_offset*/, size_t /*error_offset*/) {
80
0
    }
81
0
    void insufficient_bytes(size_t /*parsed_offset*/, size_t /*error_offset*/) {
82
0
    }
83
0
    bool referenced() const {
84
0
        return false;
85
0
    }
86
0
    void set_referenced(bool /*referenced*/) {
87
0
    }
88
};
89
90
/// @cond
91
}  // MSGPACK_API_VERSION_NAMESPACE(v2)
92
/// @endcond
93
94
}  // namespace msgpack
95
96
#endif // MSGPACK_V2_NULL_VISITOR_HPP