| 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_EVENT_CLASS_H |
| 9 | #define LTTNG_EVENT_CLASS_H |
| 10 | |
| 11 | #include "field.hpp" |
| 12 | |
| 13 | #include <common/uuid.hpp> |
| 14 | #include <vendor/optional.hpp> |
| 15 | |
| 16 | #include <string> |
| 17 | |
| 18 | namespace lttng { |
| 19 | namespace sessiond { |
| 20 | namespace trace { |
| 21 | |
| 22 | class trace_class_visitor; |
| 23 | |
| 24 | class event_class { |
| 25 | public: |
| 26 | event_class(const event_class&) = delete; |
| 27 | event_class(event_class&&) = delete; |
| 28 | event_class& operator=(event_class&&) = delete; |
| 29 | event_class& operator=(const event_class&) = delete; |
| 30 | virtual ~event_class() = default; |
| 31 | |
| 32 | virtual void accept(trace_class_visitor& visitor) const; |
| 33 | |
| 34 | const unsigned int id; |
| 35 | const unsigned int stream_class_id; |
| 36 | const int log_level; |
| 37 | const std::string name; |
| 38 | const nonstd::optional<std::string> model_emf_uri; |
| 39 | const lttng::sessiond::trace::type::cuptr payload; |
| 40 | |
| 41 | protected: |
| 42 | event_class(unsigned int id, |
| 43 | unsigned int stream_class_id, |
| 44 | int log_level, |
| 45 | std::string name, |
| 46 | nonstd::optional<std::string> model_emf_uri, |
| 47 | lttng::sessiond::trace::type::cuptr payload); |
| 48 | }; |
| 49 | |
| 50 | } /* namespace trace */ |
| 51 | } /* namespace sessiond */ |
| 52 | } /* namespace lttng */ |
| 53 | |
| 54 | #endif /* LTTNG_EVENT_CLASS_H */ |