1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/common/protolog_common.proto
3
4 #include "protos/perfetto/common/protolog_common.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 {
ProtoLogLevel_IsValid(int value)26 bool ProtoLogLevel_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 return true;
36 default:
37 return false;
38 }
39 }
40
41 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ProtoLogLevel_strings[7] = {};
42
43 static const char ProtoLogLevel_names[] =
44 "PROTOLOG_LEVEL_DEBUG"
45 "PROTOLOG_LEVEL_ERROR"
46 "PROTOLOG_LEVEL_INFO"
47 "PROTOLOG_LEVEL_UNDEFINED"
48 "PROTOLOG_LEVEL_VERBOSE"
49 "PROTOLOG_LEVEL_WARN"
50 "PROTOLOG_LEVEL_WTF";
51
52 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ProtoLogLevel_entries[] = {
53 { {ProtoLogLevel_names + 0, 20}, 1 },
54 { {ProtoLogLevel_names + 20, 20}, 5 },
55 { {ProtoLogLevel_names + 40, 19}, 3 },
56 { {ProtoLogLevel_names + 59, 24}, 0 },
57 { {ProtoLogLevel_names + 83, 22}, 2 },
58 { {ProtoLogLevel_names + 105, 19}, 4 },
59 { {ProtoLogLevel_names + 124, 18}, 6 },
60 };
61
62 static const int ProtoLogLevel_entries_by_number[] = {
63 3, // 0 -> PROTOLOG_LEVEL_UNDEFINED
64 0, // 1 -> PROTOLOG_LEVEL_DEBUG
65 4, // 2 -> PROTOLOG_LEVEL_VERBOSE
66 2, // 3 -> PROTOLOG_LEVEL_INFO
67 5, // 4 -> PROTOLOG_LEVEL_WARN
68 1, // 5 -> PROTOLOG_LEVEL_ERROR
69 6, // 6 -> PROTOLOG_LEVEL_WTF
70 };
71
ProtoLogLevel_Name(ProtoLogLevel value)72 const std::string& ProtoLogLevel_Name(
73 ProtoLogLevel value) {
74 static const bool dummy =
75 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
76 ProtoLogLevel_entries,
77 ProtoLogLevel_entries_by_number,
78 7, ProtoLogLevel_strings);
79 (void) dummy;
80 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
81 ProtoLogLevel_entries,
82 ProtoLogLevel_entries_by_number,
83 7, value);
84 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
85 ProtoLogLevel_strings[idx].get();
86 }
ProtoLogLevel_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ProtoLogLevel * value)87 bool ProtoLogLevel_Parse(
88 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProtoLogLevel* value) {
89 int int_value;
90 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
91 ProtoLogLevel_entries, 7, name, &int_value);
92 if (success) {
93 *value = static_cast<ProtoLogLevel>(int_value);
94 }
95 return success;
96 }
97
98 // @@protoc_insertion_point(namespace_scope)
99 } // namespace protos
100 } // namespace perfetto
101 PROTOBUF_NAMESPACE_OPEN
102 PROTOBUF_NAMESPACE_CLOSE
103
104 // @@protoc_insertion_point(global_scope)
105 #include <google/protobuf/port_undef.inc>
106