/src/monero/monero/contrib/epee/include/serialization/wire.h
Line | Count | Source |
1 | | // Copyright (c) 2021-2024, The Monero Project |
2 | | // All rights reserved. |
3 | | // |
4 | | // Redistribution and use in source and binary forms, with or without modification, are |
5 | | // permitted provided that the following conditions are met: |
6 | | // |
7 | | // 1. Redistributions of source code must retain the above copyright notice, this list of |
8 | | // conditions and the following disclaimer. |
9 | | // |
10 | | // 2. Redistributions in binary form must reproduce the above copyright notice, this list |
11 | | // of conditions and the following disclaimer in the documentation and/or other |
12 | | // materials provided with the distribution. |
13 | | // |
14 | | // 3. Neither the name of the copyright holder nor the names of its contributors may be |
15 | | // used to endorse or promote products derived from this software without specific |
16 | | // prior written permission. |
17 | | // |
18 | | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
19 | | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
20 | | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
21 | | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
22 | | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
23 | | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
24 | | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
25 | | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
26 | | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | | |
28 | | #pragma once |
29 | | |
30 | | #include "serialization/wire/error.h" |
31 | | #include "serialization/wire/fwd.h" |
32 | | #include "serialization/wire/write.h" |
33 | | |
34 | | //! Define functions that list fields in `type` (using virtual interface) |
35 | | #define WIRE_DEFINE_OBJECT(type, map) \ |
36 | | void write_bytes(::wire::writer& dest, const type& source) \ |
37 | 1.03k | { map(dest, source); } |
38 | | |
39 | | //! Define `from_bytes` and `to_bytes` for `this`. |
40 | | #define WIRE_DEFINE_CONVERSIONS() \ |
41 | | template<typename W, typename T> \ |
42 | | std::error_code to_bytes(T& dest) const \ |
43 | 1.82k | { return ::wire_write::to_bytes<W>(dest, *this); }zmq_pub.cpp:std::__1::error_code (anonymous namespace)::minimal_chain::to_bytes<wire::json_string_writer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const Line | Count | Source | 43 | 689 | { return ::wire_write::to_bytes<W>(dest, *this); } |
zmq_pub.cpp:std::__1::error_code (anonymous namespace)::miner_data::to_bytes<wire::json_string_writer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const Line | Count | Source | 43 | 1.13k | { return ::wire_write::to_bytes<W>(dest, *this); } |
Unexecuted instantiation: zmq_pub.cpp:std::__1::error_code wire::range_<boost::range_detail::transformed_range<(anonymous namespace)::minimal_txpool_format<wire::json>(epee::byte_stream&, epee::span<cryptonote::txpool_event const>)::{lambda(cryptonote::txpool_event const&)#1}, boost::range_detail::filtered_range<(anonymous namespace)::is_valid, epee::span<cryptonote::txpool_event const> > const> >::to_bytes<wire::json_string_writer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const |
44 | | |