1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/common/builtin_clock.proto
3
4 #include "protos/perfetto/common/builtin_clock.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14
15 PROTOBUF_PRAGMA_INIT_SEG
16
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19
20 namespace perfetto {
21 namespace protos {
22 } // namespace protos
23 } // namespace perfetto
24 namespace perfetto {
25 namespace protos {
BuiltinClock_IsValid(int value)26 bool BuiltinClock_IsValid(int value) {
27 switch (value) {
28 case 0:
29 case 1:
30 case 2:
31 case 3:
32 case 4:
33 case 5:
34 case 6:
35 case 9:
36 case 10:
37 case 63:
38 return true;
39 default:
40 return false;
41 }
42 }
43
44 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> BuiltinClock_strings[10] = {};
45
46 static const char BuiltinClock_names[] =
47 "BUILTIN_CLOCK_BOOTTIME"
48 "BUILTIN_CLOCK_MAX_ID"
49 "BUILTIN_CLOCK_MONOTONIC"
50 "BUILTIN_CLOCK_MONOTONIC_COARSE"
51 "BUILTIN_CLOCK_MONOTONIC_RAW"
52 "BUILTIN_CLOCK_PERF"
53 "BUILTIN_CLOCK_REALTIME"
54 "BUILTIN_CLOCK_REALTIME_COARSE"
55 "BUILTIN_CLOCK_TSC"
56 "BUILTIN_CLOCK_UNKNOWN";
57
58 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BuiltinClock_entries[] = {
59 { {BuiltinClock_names + 0, 22}, 6 },
60 { {BuiltinClock_names + 22, 20}, 63 },
61 { {BuiltinClock_names + 42, 23}, 3 },
62 { {BuiltinClock_names + 65, 30}, 4 },
63 { {BuiltinClock_names + 95, 27}, 5 },
64 { {BuiltinClock_names + 122, 18}, 10 },
65 { {BuiltinClock_names + 140, 22}, 1 },
66 { {BuiltinClock_names + 162, 29}, 2 },
67 { {BuiltinClock_names + 191, 17}, 9 },
68 { {BuiltinClock_names + 208, 21}, 0 },
69 };
70
71 static const int BuiltinClock_entries_by_number[] = {
72 9, // 0 -> BUILTIN_CLOCK_UNKNOWN
73 6, // 1 -> BUILTIN_CLOCK_REALTIME
74 7, // 2 -> BUILTIN_CLOCK_REALTIME_COARSE
75 2, // 3 -> BUILTIN_CLOCK_MONOTONIC
76 3, // 4 -> BUILTIN_CLOCK_MONOTONIC_COARSE
77 4, // 5 -> BUILTIN_CLOCK_MONOTONIC_RAW
78 0, // 6 -> BUILTIN_CLOCK_BOOTTIME
79 8, // 9 -> BUILTIN_CLOCK_TSC
80 5, // 10 -> BUILTIN_CLOCK_PERF
81 1, // 63 -> BUILTIN_CLOCK_MAX_ID
82 };
83
BuiltinClock_Name(BuiltinClock value)84 const std::string& BuiltinClock_Name(
85 BuiltinClock value) {
86 static const bool dummy =
87 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
88 BuiltinClock_entries,
89 BuiltinClock_entries_by_number,
90 10, BuiltinClock_strings);
91 (void) dummy;
92 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
93 BuiltinClock_entries,
94 BuiltinClock_entries_by_number,
95 10, value);
96 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
97 BuiltinClock_strings[idx].get();
98 }
BuiltinClock_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,BuiltinClock * value)99 bool BuiltinClock_Parse(
100 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BuiltinClock* value) {
101 int int_value;
102 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
103 BuiltinClock_entries, 10, name, &int_value);
104 if (success) {
105 *value = static_cast<BuiltinClock>(int_value);
106 }
107 return success;
108 }
109
110 // @@protoc_insertion_point(namespace_scope)
111 } // namespace protos
112 } // namespace perfetto
113 PROTOBUF_NAMESPACE_OPEN
114 PROTOBUF_NAMESPACE_CLOSE
115
116 // @@protoc_insertion_point(global_scope)
117 #include <google/protobuf/port_undef.inc>
118