1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. 2 3 #ifndef PERFETTO_PROTOS_INTERNED_DATA_PROTO_H_ 4 #define PERFETTO_PROTOS_INTERNED_DATA_PROTO_H_ 5 6 #include <stddef.h> 7 #include <stdint.h> 8 9 #include "perfetto/protozero/message.h" 10 #include "perfetto/protozero/packed_repeated_fields.h" 11 #include "perfetto/protozero/proto_decoder.h" 12 #include "perfetto/protozero/proto_utils.h" 13 14 namespace perfetto { 15 namespace protos { 16 namespace pbzero { 17 18 class Callstack; 19 class DebugAnnotationName; 20 class EventCategory; 21 class EventName; 22 class Frame; 23 class InternedGpuRenderStageSpecification; 24 class InternedGraphicsContext; 25 class InternedString; 26 class LogMessageBody; 27 class Mapping; 28 class ProfiledFrameSymbols; 29 class SourceLocation; 30 31 class InternedData_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/24, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> { 32 public: InternedData_Decoder(const uint8_t * data,size_t len)33 InternedData_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} InternedData_Decoder(const std::string & raw)34 explicit InternedData_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {} InternedData_Decoder(const::protozero::ConstBytes & raw)35 explicit InternedData_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} has_event_categories()36 bool has_event_categories() const { return at<1>().valid(); } event_categories()37 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> event_categories() const { return GetRepeated<::protozero::ConstBytes>(1); } has_event_names()38 bool has_event_names() const { return at<2>().valid(); } event_names()39 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> event_names() const { return GetRepeated<::protozero::ConstBytes>(2); } has_debug_annotation_names()40 bool has_debug_annotation_names() const { return at<3>().valid(); } debug_annotation_names()41 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> debug_annotation_names() const { return GetRepeated<::protozero::ConstBytes>(3); } has_source_locations()42 bool has_source_locations() const { return at<4>().valid(); } source_locations()43 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> source_locations() const { return GetRepeated<::protozero::ConstBytes>(4); } has_log_message_body()44 bool has_log_message_body() const { return at<20>().valid(); } log_message_body()45 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> log_message_body() const { return GetRepeated<::protozero::ConstBytes>(20); } has_build_ids()46 bool has_build_ids() const { return at<16>().valid(); } build_ids()47 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> build_ids() const { return GetRepeated<::protozero::ConstBytes>(16); } has_mapping_paths()48 bool has_mapping_paths() const { return at<17>().valid(); } mapping_paths()49 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> mapping_paths() const { return GetRepeated<::protozero::ConstBytes>(17); } has_source_paths()50 bool has_source_paths() const { return at<18>().valid(); } source_paths()51 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> source_paths() const { return GetRepeated<::protozero::ConstBytes>(18); } has_function_names()52 bool has_function_names() const { return at<5>().valid(); } function_names()53 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> function_names() const { return GetRepeated<::protozero::ConstBytes>(5); } has_profiled_frame_symbols()54 bool has_profiled_frame_symbols() const { return at<21>().valid(); } profiled_frame_symbols()55 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> profiled_frame_symbols() const { return GetRepeated<::protozero::ConstBytes>(21); } has_mappings()56 bool has_mappings() const { return at<19>().valid(); } mappings()57 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> mappings() const { return GetRepeated<::protozero::ConstBytes>(19); } has_frames()58 bool has_frames() const { return at<6>().valid(); } frames()59 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> frames() const { return GetRepeated<::protozero::ConstBytes>(6); } has_callstacks()60 bool has_callstacks() const { return at<7>().valid(); } callstacks()61 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> callstacks() const { return GetRepeated<::protozero::ConstBytes>(7); } has_vulkan_memory_keys()62 bool has_vulkan_memory_keys() const { return at<22>().valid(); } vulkan_memory_keys()63 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> vulkan_memory_keys() const { return GetRepeated<::protozero::ConstBytes>(22); } has_graphics_contexts()64 bool has_graphics_contexts() const { return at<23>().valid(); } graphics_contexts()65 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> graphics_contexts() const { return GetRepeated<::protozero::ConstBytes>(23); } has_gpu_specifications()66 bool has_gpu_specifications() const { return at<24>().valid(); } gpu_specifications()67 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> gpu_specifications() const { return GetRepeated<::protozero::ConstBytes>(24); } 68 }; 69 70 class InternedData : public ::protozero::Message { 71 public: 72 using Decoder = InternedData_Decoder; 73 enum : int32_t { 74 kEventCategoriesFieldNumber = 1, 75 kEventNamesFieldNumber = 2, 76 kDebugAnnotationNamesFieldNumber = 3, 77 kSourceLocationsFieldNumber = 4, 78 kLogMessageBodyFieldNumber = 20, 79 kBuildIdsFieldNumber = 16, 80 kMappingPathsFieldNumber = 17, 81 kSourcePathsFieldNumber = 18, 82 kFunctionNamesFieldNumber = 5, 83 kProfiledFrameSymbolsFieldNumber = 21, 84 kMappingsFieldNumber = 19, 85 kFramesFieldNumber = 6, 86 kCallstacksFieldNumber = 7, 87 kVulkanMemoryKeysFieldNumber = 22, 88 kGraphicsContextsFieldNumber = 23, 89 kGpuSpecificationsFieldNumber = 24, 90 }; add_event_categories()91 template <typename T = EventCategory> T* add_event_categories() { 92 return BeginNestedMessage<T>(1); 93 } 94 add_event_names()95 template <typename T = EventName> T* add_event_names() { 96 return BeginNestedMessage<T>(2); 97 } 98 add_debug_annotation_names()99 template <typename T = DebugAnnotationName> T* add_debug_annotation_names() { 100 return BeginNestedMessage<T>(3); 101 } 102 add_source_locations()103 template <typename T = SourceLocation> T* add_source_locations() { 104 return BeginNestedMessage<T>(4); 105 } 106 add_log_message_body()107 template <typename T = LogMessageBody> T* add_log_message_body() { 108 return BeginNestedMessage<T>(20); 109 } 110 add_build_ids()111 template <typename T = InternedString> T* add_build_ids() { 112 return BeginNestedMessage<T>(16); 113 } 114 add_mapping_paths()115 template <typename T = InternedString> T* add_mapping_paths() { 116 return BeginNestedMessage<T>(17); 117 } 118 add_source_paths()119 template <typename T = InternedString> T* add_source_paths() { 120 return BeginNestedMessage<T>(18); 121 } 122 add_function_names()123 template <typename T = InternedString> T* add_function_names() { 124 return BeginNestedMessage<T>(5); 125 } 126 add_profiled_frame_symbols()127 template <typename T = ProfiledFrameSymbols> T* add_profiled_frame_symbols() { 128 return BeginNestedMessage<T>(21); 129 } 130 add_mappings()131 template <typename T = Mapping> T* add_mappings() { 132 return BeginNestedMessage<T>(19); 133 } 134 add_frames()135 template <typename T = Frame> T* add_frames() { 136 return BeginNestedMessage<T>(6); 137 } 138 add_callstacks()139 template <typename T = Callstack> T* add_callstacks() { 140 return BeginNestedMessage<T>(7); 141 } 142 add_vulkan_memory_keys()143 template <typename T = InternedString> T* add_vulkan_memory_keys() { 144 return BeginNestedMessage<T>(22); 145 } 146 add_graphics_contexts()147 template <typename T = InternedGraphicsContext> T* add_graphics_contexts() { 148 return BeginNestedMessage<T>(23); 149 } 150 add_gpu_specifications()151 template <typename T = InternedGpuRenderStageSpecification> T* add_gpu_specifications() { 152 return BeginNestedMessage<T>(24); 153 } 154 155 }; 156 157 } // Namespace. 158 } // Namespace. 159 } // Namespace. 160 #endif // Include guard. 161