cpp_primitive_field.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 // Author: kenton@google.com (Kenton Varda)
32 // Based on original Protocol Buffers design by
33 // Sanjay Ghemawat, Jeff Dean, and others.
34 
35 #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__
36 #define GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__
37 
38 #include <map>
39 #include <string>
41 
42 namespace google {
43 namespace protobuf {
44 namespace compiler {
45 namespace cpp {
46 
48  public:
50  const Options& options);
52 
53  // implements FieldGenerator ---------------------------------------
54  void GeneratePrivateMembers(io::Printer* printer) const;
55  void GenerateAccessorDeclarations(io::Printer* printer) const;
57  void GenerateClearingCode(io::Printer* printer) const;
58  void GenerateMergingCode(io::Printer* printer) const;
59  void GenerateSwappingCode(io::Printer* printer) const;
60  void GenerateConstructorCode(io::Printer* printer) const;
61  void GenerateCopyConstructorCode(io::Printer* printer) const;
62  void GenerateMergeFromCodedStream(io::Printer* printer) const;
63  void GenerateSerializeWithCachedSizes(io::Printer* printer) const;
65  void GenerateByteSize(io::Printer* printer) const;
66 
67  private:
69 };
70 
72  public:
74  const Options& options);
76 
77  // implements FieldGenerator ---------------------------------------
79  void GenerateClearingCode(io::Printer* printer) const;
80  void GenerateSwappingCode(io::Printer* printer) const;
81  void GenerateConstructorCode(io::Printer* printer) const;
82  void GenerateMergeFromCodedStream(io::Printer* printer) const;
83 
84  private:
86 };
87 
89  public:
91  const Options& options);
93 
94  // implements FieldGenerator ---------------------------------------
95  void GeneratePrivateMembers(io::Printer* printer) const;
96  void GenerateAccessorDeclarations(io::Printer* printer) const;
98  void GenerateClearingCode(io::Printer* printer) const;
99  void GenerateMergingCode(io::Printer* printer) const;
100  void GenerateSwappingCode(io::Printer* printer) const;
101  void GenerateConstructorCode(io::Printer* printer) const;
102  void GenerateCopyConstructorCode(io::Printer* printer) const;
103  void GenerateMergeFromCodedStream(io::Printer* printer) const;
105  void GenerateSerializeWithCachedSizes(io::Printer* printer) const;
107  void GenerateByteSize(io::Printer* printer) const;
108 
109  private:
111 };
112 
113 } // namespace cpp
114 } // namespace compiler
115 } // namespace protobuf
116 } // namespace google
117 
118 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__
google::protobuf::FieldDescriptor
Definition: src/google/protobuf/descriptor.h:515
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateCopyConstructorCode
void GenerateCopyConstructorCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:180
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateSwappingCode
void GenerateSwappingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:369
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::PrimitiveOneofFieldGenerator
PrimitiveOneofFieldGenerator(const FieldDescriptor *descriptor, const Options &options)
Definition: cpp_primitive_field.cc:229
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GenerateMergeFromCodedStream
void GenerateMergeFromCodedStream(io::Printer *printer) const
Definition: cpp_primitive_field.cc:275
options
Message * options
Definition: src/google/protobuf/descriptor.cc:3119
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstructorCode
void GenerateConstructorCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:174
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveOneofFieldGenerator)
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray
void GenerateSerializeWithCachedSizesToArray(io::Printer *printer) const
Definition: cpp_primitive_field.cc:449
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::~PrimitiveFieldGenerator
~PrimitiveFieldGenerator()
Definition: cpp_primitive_field.cc:127
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateByteSize
void GenerateByteSize(io::Printer *printer) const
Definition: cpp_primitive_field.cc:475
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateSwappingCode
void GenerateSwappingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:169
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateSerializeWithCachedSizes
void GenerateSerializeWithCachedSizes(io::Printer *printer) const
Definition: cpp_primitive_field.cc:197
descriptor
Descriptor * descriptor
Definition: php/ext/google/protobuf/protobuf.h:936
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateInlineAccessorDefinitions
void GenerateInlineAccessorDefinitions(io::Printer *printer) const
Definition: cpp_primitive_field.cc:144
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GenerateSwappingCode
void GenerateSwappingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:264
google::protobuf::compiler::cpp::FieldGenerator
Definition: cpp_field.h:71
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator)
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GenerateClearingCode
void GenerateClearingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:258
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GeneratePrivateMembers
void GeneratePrivateMembers(io::Printer *printer) const
Definition: cpp_primitive_field.cc:129
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateSerializeWithCachedSizes
void GenerateSerializeWithCachedSizes(io::Printer *printer) const
Definition: cpp_primitive_field.cc:406
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateClearingCode
void GenerateClearingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:159
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations
void GenerateAccessorDeclarations(io::Printer *printer) const
Definition: cpp_primitive_field.cc:135
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator)
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray
void GenerateSerializeWithCachedSizesToArray(io::Printer *printer) const
Definition: cpp_primitive_field.cc:205
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateMergeFromCodedStream
void GenerateMergeFromCodedStream(io::Printer *printer) const
Definition: cpp_primitive_field.cc:386
cpp
Definition: third_party/googletest/googlemock/scripts/generator/cpp/__init__.py:1
google::protobuf::compiler::cpp::Options
Definition: cpp_options.h:52
google::protobuf::compiler::cpp::PrimitiveFieldGenerator
Definition: cpp_primitive_field.h:47
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::PrimitiveFieldGenerator
PrimitiveFieldGenerator(const FieldDescriptor *descriptor, const Options &options)
Definition: cpp_primitive_field.cc:121
google::protobuf::io::Printer
Definition: printer.h:181
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::RepeatedPrimitiveFieldGenerator
RepeatedPrimitiveFieldGenerator(const FieldDescriptor *descriptor, const Options &options)
Definition: cpp_primitive_field.cc:289
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateConstructorCode
void GenerateConstructorCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:375
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::~RepeatedPrimitiveFieldGenerator
~RepeatedPrimitiveFieldGenerator()
Definition: cpp_primitive_field.cc:303
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateMergeFromCodedStream
void GenerateMergeFromCodedStream(io::Printer *printer) const
Definition: cpp_primitive_field.cc:186
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GenerateInlineAccessorDefinitions
void GenerateInlineAccessorDefinitions(io::Printer *printer) const
Definition: cpp_primitive_field.cc:237
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateAccessorDeclarations
void GenerateAccessorDeclarations(io::Printer *printer) const
Definition: cpp_primitive_field.cc:315
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions
void GenerateInlineAccessorDefinitions(io::Printer *printer) const
Definition: cpp_primitive_field.cc:329
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateMergingCode
void GenerateMergingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:164
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateByteSize
void GenerateByteSize(io::Printer *printer) const
Definition: cpp_primitive_field.cc:214
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateMergeFromCodedStreamWithPacking
void GenerateMergeFromCodedStreamWithPacking(io::Printer *printer) const
Definition: cpp_primitive_field.cc:396
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateCopyConstructorCode
void GenerateCopyConstructorCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:380
cpp_field.h
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator
Definition: cpp_primitive_field.h:71
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::GenerateConstructorCode
void GenerateConstructorCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:269
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateMergingCode
void GenerateMergingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:363
compiler
Definition: plugin.pb.cc:22
google
Definition: data_proto2_to_proto3_util.h:11
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateClearingCode
void GenerateClearingCode(io::Printer *printer) const
Definition: cpp_primitive_field.cc:357
google::protobuf::compiler::cpp::PrimitiveOneofFieldGenerator::~PrimitiveOneofFieldGenerator
~PrimitiveOneofFieldGenerator()
Definition: cpp_primitive_field.cc:235
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GeneratePrivateMembers
void GeneratePrivateMembers(io::Printer *printer) const
Definition: cpp_primitive_field.cc:305
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator
Definition: cpp_primitive_field.h:88


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:49