Build fix: unknown warning -Wduplicated-branches
[lttng-tools.git] / src / bin / lttng-sessiond / stream-class.hpp
CommitLineData
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#ifndef LTTNG_STREAM_CLASS_H
9#define LTTNG_STREAM_CLASS_H
10
11#include "field.hpp"
12
13#include <vector>
14
15namespace lttng {
16namespace sessiond {
17namespace trace {
18
19class trace_class_visitor;
20
21class stream_class {
22public:
23 enum class header_type { COMPACT, LARGE };
24
25 /*
26 * Derived classes must implement _accept_on_event_classes()
27 * to continue the traversal to the stream class' event classes.
28 */
29 void accept(trace_class_visitor& visitor) const;
30 virtual ~stream_class() = default;
31
32 virtual const lttng::sessiond::trace::type& get_context() const;
33
34 const unsigned int id;
35 const header_type header_type;
36
37protected:
38 stream_class(unsigned int id, enum header_type header_type);
39 virtual void _accept_on_event_classes(trace_class_visitor& trace_class_visitor) const = 0;
40
41 lttng::sessiond::trace::type::cuptr _context;
42};
43
44} /* namespace trace */
45} /* namespace sessiond */
46} /* namespace lttng */
47
48#endif /* LTTNG_STREAM_CLASS_H */
This page took 0.025432 seconds and 4 git commands to generate.