2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef LTTNG_STREAM_CLASS_H
9 #define LTTNG_STREAM_CLASS_H
19 class trace_class_visitor;
23 enum class header_type { COMPACT, LARGE };
26 * Derived classes must implement _accept_on_event_classes()
27 * to continue the traversal to the stream class' event classes.
29 void accept(trace_class_visitor& visitor) const;
30 virtual ~stream_class() = default;
32 virtual const lttng::sessiond::trace::type& get_context() const;
34 const unsigned int id;
36 * header_type is suffixed with '_' to work-around a bug in older
37 * GCCs (before 6) that do not recognize hidden/shadowed enumeration as valid
38 * nested-name-specifiers.
40 const header_type header_type_;
43 stream_class(unsigned int id, enum header_type header_type);
44 virtual void _accept_on_event_classes(trace_class_visitor& trace_class_visitor) const = 0;
46 lttng::sessiond::trace::type::cuptr _context;
49 } /* namespace trace */
50 } /* namespace sessiond */
51 } /* namespace lttng */
53 #endif /* LTTNG_STREAM_CLASS_H */