Lines Matching refs:descriptor
108 static bool generateIncidentSectionsCpp(Descriptor const* descriptor) in generateIncidentSectionsCpp() argument
114 N = descriptor->field_count(); in generateIncidentSectionsCpp()
116 const FieldDescriptor* field = descriptor->field(i); in generateIncidentSectionsCpp()
191 static inline PrivacyFlags getPrivacyFlags(const Descriptor* descriptor) { in getPrivacyFlags() argument
192 return descriptor->options().GetExtension(msg_privacy); in getPrivacyFlags()
196 static inline Destination getMessageDest(const Descriptor* descriptor, const Destination overridden… in getMessageDest() argument
197 return overridden != DEST_UNSET ? overridden : getPrivacyFlags(descriptor).dest(); in getMessageDest()
226 static inline string getMessageName(const Descriptor* descriptor, const Destination overridden) { in getMessageName() argument
228 return replaceAll(descriptor->full_name(), '.', "_") + "__MSG__" + in getMessageName()
229 to_string(getMessageDest(descriptor, overridden)); in getMessageName()
246 static bool isDefaultMessageImpl(const Descriptor* descriptor, const Destination dest, set<string>*… in isDefaultMessageImpl() argument
247 const int N = descriptor->field_count(); in isDefaultMessageImpl()
248 const Destination messageDest = getMessageDest(descriptor, dest); in isDefaultMessageImpl()
249 parents->insert(descriptor->full_name()); in isDefaultMessageImpl()
251 const FieldDescriptor* field = descriptor->field(i); in isDefaultMessageImpl()
270 parents->erase(descriptor->full_name()); in isDefaultMessageImpl()
276 static bool isDefaultMessage(const Descriptor* descriptor, const Destination dest) { in isDefaultMessage() argument
278 return isDefaultMessageImpl(descriptor, dest, &parents); in isDefaultMessage()
287 static vector<const FieldDescriptor*> sortFields(const Descriptor* descriptor) { in sortFields() argument
289 fields.reserve(descriptor->field_count()); in sortFields()
290 for (int i=0; i<descriptor->field_count(); i++) { in sortFields()
291 fields.push_back(descriptor->field(i)); in sortFields()
301 static bool generatePrivacyFlags(const Descriptor* descriptor, const Destination overridden, in generatePrivacyFlags() argument
303 const string messageName = getMessageName(descriptor, overridden); in generatePrivacyFlags()
304 const Destination messageDest = getMessageDest(descriptor, overridden); in generatePrivacyFlags()
314 vector<const FieldDescriptor*> fieldsInOrder = sortFields(descriptor); in generatePrivacyFlags()
396 static bool generateSectionListCpp(Descriptor const* descriptor) { in generateSectionListCpp() argument
408 for (int i=0; i<descriptor->field_count(); i++) { in generateSectionListCpp()
409 const FieldDescriptor* field = descriptor->field(i); in generateSectionListCpp()
472 vector<const FieldDescriptor*> fieldsInOrder = sortFields(descriptor); in generateSectionListCpp()
474 const Destination incidentDest = getPrivacyFlags(descriptor).dest(); in generateSectionListCpp()
554 static void generateCsv(Descriptor const* descriptor, const string& indent, set<string>* parents, c… in generateCsv() argument
557 for (int i=0; i<descriptor->field_count(); i++) { in generateCsv()
558 const FieldDescriptor* field = descriptor->field(i); in generateCsv()
590 Descriptor const* descriptor = IncidentProto::descriptor(); in main() local
593 return !generateIncidentSectionsCpp(descriptor); in main()
596 return !generateSectionListCpp(descriptor); in main()
601 for (int i=0; i<descriptor->field_count(); i++) { in main()
602 const FieldDescriptor* field = descriptor->field(i); in main()