Spicy
util.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <optional>
6 #include <string>
7 #include <tuple>
8 
9 #include <hilti/rt/types/integer.h>
10 #include <hilti/rt/types/vector.h>
11 
12 namespace hilti::rt {
13 class Bytes;
14 
15 namespace type_info {
16 class Struct;
17 class Value;
18 }; // namespace type_info
19 } // namespace hilti::rt
20 
21 namespace spicy::rt {
22 
24 extern std::string version();
25 
27 extern std::string bytes_to_hexstring(const hilti::rt::Bytes& value);
28 
30 extern const hilti::rt::Vector<
31  std::optional<std::tuple<hilti::rt::integer::safe<uint64_t>, std::optional<hilti::rt::integer::safe<uint64_t>>>>>*
32 get_offsets_for_unit(const hilti::rt::type_info::Struct& struct_, const hilti::rt::type_info::Value& value);
33 
34 } // namespace spicy::rt
Definition: any.h:7
Definition: bytes.h:153
Definition: type-info.h:82
Definition: vector.h:249
std::string version()
Definition: util.cc:22
Definition: type-info.h:883