Go to the documentation of this file.
70 if (name1 +
"Count" == name2) {
71 *info =
"both repeated field \"" + field1->
name() +
"\" and singular " +
72 "field \"" + field2->
name() +
"\" generate the method \"" +
73 "get" + name1 +
"Count()\"";
76 if (name1 +
"List" == name2) {
77 *info =
"both repeated field \"" + field1->
name() +
"\" and singular " +
78 "field \"" + field2->
name() +
"\" generate the method \"" +
79 "get" + name1 +
"List()\"";
91 return IsConflicting(field2, name2, field1, name1, info);
108 for (
int i = 0;
i <
message->nested_type_count(); ++
i) {
111 std::vector<const FieldDescriptor*>
fields;
112 for (
int i = 0;
i <
message->field_count(); ++
i) {
117 for (
int i = 0;
i <
message->oneof_decl_count(); ++
i) {
127 const std::vector<const FieldDescriptor*>&
fields) {
130 std::vector<bool> is_conflict(
fields.size());
131 std::vector<std::string> conflict_reason(
fields.size());
132 for (
int i = 0;
i <
fields.size(); ++
i) {
135 for (
int j =
i + 1; j <
fields.size(); ++j) {
138 if (
name == other_name) {
139 is_conflict[
i] = is_conflict[j] =
true;
140 conflict_reason[
i] = conflict_reason[j] =
141 "capitalized name of field \"" +
field->name() +
142 "\" conflicts with field \"" + other->
name() +
"\"";
143 }
else if (IsConflicting(
field,
name, other, other_name,
144 &conflict_reason[j])) {
145 is_conflict[
i] = is_conflict[j] =
true;
146 conflict_reason[
i] = conflict_reason[j];
149 if (is_conflict[
i]) {
151 <<
"with another field: " << conflict_reason[
i];
154 for (
int i = 0;
i <
fields.size(); ++
i) {
161 if (is_conflict[
i]) {
174 if (result ==
NULL) {
176 <<
field->full_name();
185 if (result ==
NULL) {
std::string UnderscoresToCamelCase(const std::string &input, bool cap_next_letter)
void InitializeFieldGeneratorInfoForFields(const std::vector< const FieldDescriptor * > &fields)
GLuint const GLchar * name
string StrCat(const AlphaNum &a, const AlphaNum &b)
std::map< const FieldDescriptor *, FieldGeneratorInfo > field_generator_info_map_
std::map< const OneofDescriptor *, OneofGeneratorInfo > oneof_generator_info_map_
std::string UnderscoresToCapitalizedCamelCase(const FieldDescriptor *field)
GLsizei const GLchar *const * string
const std::string & name() const
std::string CamelCaseFieldName(const FieldDescriptor *field)
const Collection::value_type::second_type * FindOrNull(const Collection &collection, const typename Collection::value_type::first_type &key)
const FieldGeneratorInfo * GetFieldGeneratorInfo(const FieldDescriptor *field) const
#define GOOGLE_LOG(LEVEL)
static const LogLevel WARNING
const FieldDescriptor * field
void InitializeFieldGeneratorInfo(const FileDescriptor *file)
Context(const FileDescriptor *file, const Options &options)
std::string capitalized_name
bool HasGeneratedMethods(const Descriptor *descriptor) const
static const upb_fielddef fields[107]
void InitializeFieldGeneratorInfoForMessage(const Descriptor *message)
const std::string & name() const
const Descriptor * message_type(int index) const
std::unique_ptr< ClassNameResolver > name_resolver_
ClassNameResolver * GetNameResolver() const
std::string capitalized_name
static constexpr OptimizeMode CODE_SIZE
const OneofGeneratorInfo * GetOneofGeneratorInfo(const OneofDescriptor *oneof) const
int message_type_count() const
GLenum GLuint GLenum GLsizei const GLchar * message
DebugStringOptions options_
std::string disambiguated_reason
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:54