Commit | Line | Data |
---|---|---|
0220be14 JG |
1 | /* |
2 | * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0-only | |
5 | * | |
6 | */ | |
7 | ||
8 | #include "trace-class.hpp" | |
9 | ||
10 | namespace lst = lttng::sessiond::trace; | |
11 | ||
12 | lttng::sessiond::trace::trace_class::trace_class( | |
13 | const struct abi& in_abi, | |
14 | const lttng_uuid& in_trace_uuid) : | |
15 | abi{in_abi}, | |
16 | uuid{in_trace_uuid} | |
17 | { | |
18 | } | |
19 | ||
20 | void lttng::sessiond::trace::trace_class::accept(trace_class_visitor& trace_class_visitor) const | |
21 | { | |
22 | trace_class_visitor.visit(*this); | |
23 | _accept_on_clock_classes(trace_class_visitor); | |
24 | ||
25 | trace_class_visitor.environment_begin(); | |
26 | _visit_environment(trace_class_visitor); | |
27 | trace_class_visitor.environment_end(); | |
28 | ||
29 | _accept_on_stream_classes(trace_class_visitor); | |
30 | } | |
31 | ||
32 | void lst::trace_class_visitor::visit(const environment_field<std::string>& field) | |
33 | { | |
34 | visit(environment_field<const char *>(field.name, field.value.c_str())); | |
35 | } |