1 // Protocol Buffers - Google's data interchange format 2 // Copyright 2023 Google LLC. All rights reserved. 3 // 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file or at 6 // https://developers.google.com/open-source/licenses/bsd 7 8 #ifndef PROTOBUF_COMPILER_HBP_GEN_ENUMS_H_ 9 #define PROTOBUF_COMPILER_HBP_GEN_ENUMS_H_ 10 11 #include "google/protobuf/descriptor.h" 12 #include "google/protobuf/compiler/hpb/output.h" 13 14 namespace google::protobuf::hpb_generator { 15 16 namespace protobuf = ::proto2; 17 18 std::string EnumTypeName(const protobuf::EnumDescriptor* enum_descriptor); 19 std::string EnumValueSymbolInNameSpace( 20 const protobuf::EnumDescriptor* desc, 21 const protobuf::EnumValueDescriptor* value); 22 void WriteHeaderEnumForwardDecls( 23 std::vector<const protobuf::EnumDescriptor*>& enums, Output& output); 24 void WriteEnumDeclarations( 25 const std::vector<const protobuf::EnumDescriptor*>& enums, Output& output); 26 27 } // namespace protobuf 28 } // namespace google::hpb_generator 29 30 #endif // PROTOBUF_COMPILER_HBP_GEN_ENUMS_H_ 31