cpp_names.h
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_NAMES_H__
32 #define GOOGLE_PROTOBUF_COMPILER_CPP_NAMES_H__
33 
34 #include <string>
35 
36 #include <google/protobuf/port_def.inc>
37 
38 namespace google {
39 namespace protobuf {
40 
41 class Descriptor;
42 class EnumDescriptor;
44 class FieldDescriptor;
45 
46 namespace compiler {
47 namespace cpp {
48 
49 // Returns the unqualified C++ name.
50 //
51 // For example, if you had:
52 // package foo.bar;
53 // message Baz { message Qux {} }
54 // Then the non-qualified version would be:
55 // Baz_Qux
58 
59 // Returns the fully qualified C++ name.
60 //
61 // For example, if you had:
62 // package foo.bar;
63 // message Baz { message Qux {} }
64 // Then the qualified ClassName for Qux would be:
65 // ::foo::bar::Baz_Qux
69 
70 // Get the (unqualified) name that should be used for this field in C++ code.
71 // The name is coerced to lower-case to emulate proto1 behavior. People
72 // should be using lowercase-with-underscores style for proto field names
73 // anyway, so normally this just returns field->name().
75 
76 // Requires that this field is in a oneof. Returns the (unqualified) case
77 // constant for this field.
79 // Returns the quafilied case constant for this field.
81 
82 // Get the (unqualified) name that should be used for this enum value in C++
83 // code.
85 
86 // Strips ".proto" or ".protodevel" from the end of a filename.
87 PROTOC_EXPORT std::string StripProto(const std::string& filename);
88 
89 } // namespace cpp
90 } // namespace compiler
91 } // namespace protobuf
92 } // namespace google
93 
94 #include <google/protobuf/port_undef.inc>
95 
96 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_NAMES_H__
filename
const char * filename
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
google::protobuf::compiler::cpp::FieldName
std::string FieldName(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:416
google::protobuf::compiler::cpp::StripProto
std::string StripProto(const std::string &filename)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:480
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf::compiler::cpp::QualifiedClassName
std::string QualifiedClassName(const Descriptor *d, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:320
google::protobuf::compiler::cpp::EnumValueName
std::string EnumValueName(const EnumValueDescriptor *enum_value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:425
Descriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:121
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
EnumValueDescriptor
Definition: protobuf/php/ext/google/protobuf/def.c:63
cpp
Definition: third_party/bloaty/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py:1
EnumDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:143
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::compiler::cpp::OneofCaseConstantName
std::string OneofCaseConstantName(const FieldDescriptor *field)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:456
google::protobuf::compiler::cpp::QualifiedExtensionName
std::string QualifiedExtensionName(const FieldDescriptor *d, const Options &options)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:353
google::protobuf::compiler::cpp::ClassName
std::string ClassName(const Descriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:302
enum_descriptor
VALUE enum_descriptor(VALUE self)
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/message.c:794
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
compiler
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc:21
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::compiler::cpp::QualifiedOneofCaseConstantName
std::string QualifiedOneofCaseConstantName(const FieldDescriptor *field)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:462


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:05