#include <google/protobuf/compiler/cpp/field.h>
#include <cstdint>
#include <memory>
#include <string>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/compiler/cpp/primitive_field.h>
#include <google/protobuf/compiler/cpp/string_field.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/compiler/cpp/enum_field.h>
#include <google/protobuf/compiler/cpp/map_field.h>
#include <google/protobuf/compiler/cpp/message_field.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
namespace protobuf {
namespace compiler {
namespace cpp {
WireFormat;
namespace {
void MaySetAnnotationVariable(const Options& options,
StringPiece annotation_name,
StringPiece substitute_template_prefix,
StringPiece prepared_template,
int field_index, StringPiece access_type,
std::map<std::string, std::string>* variables) { … }
std::string GenerateTemplateForOneofString(const FieldDescriptor* descriptor,
StringPiece proto_ns,
StringPiece field_member) { … }
std::string GenerateTemplateForSingleString(const FieldDescriptor* descriptor,
StringPiece field_member) { … }
}
void AddAccessorAnnotations(const FieldDescriptor* descriptor,
const Options& options,
std::map<std::string, std::string>* variables) { … }
void SetCommonFieldVariables(const FieldDescriptor* descriptor,
std::map<std::string, std::string>* variables,
const Options& options) { … }
void FieldGenerator::SetHasBitIndex(int32_t has_bit_index) { … }
void FieldGenerator::SetInlinedStringIndex(int32_t inlined_string_index) { … }
void FieldGenerator::GenerateAggregateInitializer(io::Printer* printer) const { … }
void FieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const { … }
void FieldGenerator::GenerateCopyAggregateInitializer(
io::Printer* printer) const { … }
void FieldGenerator::GenerateCopyConstructorCode(io::Printer* printer) const { … }
void SetCommonOneofFieldVariables(
const FieldDescriptor* descriptor,
std::map<std::string, std::string>* variables) { … }
FieldGenerator::~FieldGenerator() { … }
FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor,
const Options& options,
MessageSCCAnalyzer* scc_analyzer)
: … { … }
FieldGenerator* FieldGeneratorMap::MakeGoogleInternalGenerator(
const FieldDescriptor* field, const Options& options,
MessageSCCAnalyzer* scc_analyzer) { … }
FieldGenerator* FieldGeneratorMap::MakeGenerator(
const FieldDescriptor* field, const Options& options,
MessageSCCAnalyzer* scc_analyzer) { … }
FieldGeneratorMap::~FieldGeneratorMap() { … }
const FieldGenerator& FieldGeneratorMap::get(
const FieldDescriptor* field) const { … }
}
}
}
}