Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:11:58

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2008 Google Inc.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 // Author: kenton@google.com (Kenton Varda)
0009 //  Based on original Protocol Buffers design by
0010 //  Sanjay Ghemawat, Jeff Dean, and others.
0011 
0012 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__
0013 #define GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__
0014 
0015 #include "absl/strings/string_view.h"
0016 #include "google/protobuf/compiler/java/options.h"
0017 #include "google/protobuf/descriptor.h"
0018 
0019 // Must be included last.
0020 #include "google/protobuf/port_def.inc"
0021 
0022 namespace google {
0023 namespace protobuf {
0024 namespace io {
0025 class Printer;  // printer.h
0026 }
0027 }  // namespace protobuf
0028 }  // namespace google
0029 
0030 namespace google {
0031 namespace protobuf {
0032 namespace compiler {
0033 namespace java {
0034 
0035 enum FieldAccessorType {
0036   HAZZER,
0037   GETTER,
0038   SETTER,
0039   CLEARER,
0040   // Repeated
0041   LIST_COUNT,
0042   LIST_GETTER,
0043   LIST_INDEXED_GETTER,
0044   LIST_INDEXED_SETTER,
0045   LIST_ADDER,
0046   LIST_MULTI_ADDER
0047 };
0048 
0049 void WriteMessageDocComment(io::Printer* printer, const Descriptor* message,
0050                             Options options, bool kdoc = false);
0051 void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field,
0052                           Options options, bool kdoc = false);
0053 void WriteFieldAccessorDocComment(io::Printer* printer,
0054                                   const FieldDescriptor* field,
0055                                   FieldAccessorType type, Options options,
0056                                   bool builder = false, bool kdoc = false);
0057 void WriteFieldEnumValueAccessorDocComment(
0058     io::Printer* printer, const FieldDescriptor* field, FieldAccessorType type,
0059     Options options, bool builder = false, bool kdoc = false);
0060 void WriteFieldStringBytesAccessorDocComment(
0061     io::Printer* printer, const FieldDescriptor* field, FieldAccessorType type,
0062     Options options, bool builder = false, bool kdoc = false);
0063 void WriteEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_,
0064                          Options options, bool kdoc = false);
0065 void WriteEnumValueDocComment(io::Printer* printer,
0066                               const EnumValueDescriptor* value,
0067                               Options options);
0068 void WriteServiceDocComment(io::Printer* printer,
0069                             const ServiceDescriptor* service, Options options);
0070 void WriteMethodDocComment(io::Printer* printer, const MethodDescriptor* method,
0071                            Options options);
0072 
0073 // Exposed for testing only.
0074 // Also called by proto1-Java code generator.
0075 PROTOC_EXPORT std::string EscapeJavadoc(absl::string_view input);
0076 
0077 }  // namespace java
0078 }  // namespace compiler
0079 }  // namespace protobuf
0080 }  // namespace google
0081 
0082 #include "google/protobuf/port_undef.inc"
0083 
0084 #endif  // GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__