clang-tidy: add a subset of cppcoreguidelines and other style checks
[lttng-tools.git] / src / bin / lttng-sessiond / clock-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_CLOCK_CLASS_H
9#define LTTNG_CLOCK_CLASS_H
10
11#include <common/compat/time.hpp>
12#include <common/uuid.hpp>
13#include <vendor/optional.hpp>
14
15#include <stddef.h>
16#include <stdint.h>
17#include <stdio.h>
18#include <string>
19#include <sys/time.h>
20#include <urcu/arch.h>
21#include <urcu/system.h>
22
23namespace lttng {
24namespace sessiond {
25namespace trace {
26
27class trace_class_visitor;
28
29class clock_class {
30public:
31 using cycles_t = uint64_t;
32 using scycles_t = int64_t;
042670db 33 using cuptr = std::unique_ptr<const clock_class>;
0220be14 34
9d89db29
JG
35 virtual ~clock_class() = default;
36 clock_class(const clock_class&) = delete;
37 clock_class(clock_class&&) = delete;
38 clock_class& operator=(clock_class&&) = delete;
39 clock_class& operator=(const clock_class&) = delete;
40
41 virtual void accept(trace_class_visitor& visitor) const;
42
0220be14
JG
43 const std::string name;
44 const std::string description;
45 const nonstd::optional<lttng_uuid> uuid;
46 const scycles_t offset;
47 const cycles_t frequency;
48
0220be14
JG
49protected:
50 clock_class(std::string name,
9d89db29
JG
51 std::string description,
52 nonstd::optional<lttng_uuid> uuid,
53 scycles_t offset,
54 cycles_t frequency);
0220be14
JG
55};
56
57} /* namespace trace */
58} /* namespace sessiond */
59} /* namespace lttng */
60
61#endif /* LTTNG_CLOCK_CLASS_H */
This page took 0.027353 seconds and 4 git commands to generate.