| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // Defined in command_line_interface.cc | 121 // Defined in command_line_interface.cc |
| 122 namespace compiler { | 122 namespace compiler { |
| 123 class CommandLineInterface; | 123 class CommandLineInterface; |
| 124 } // namespace compiler | 124 } // namespace compiler |
| 125 | 125 |
| 126 namespace descriptor_unittest { | 126 namespace descriptor_unittest { |
| 127 class DescriptorTest; | 127 class DescriptorTest; |
| 128 } // namespace descriptor_unittest | 128 } // namespace descriptor_unittest |
| 129 | 129 |
| 130 // Defined in printer.h |
| 131 namespace io { |
| 132 class Printer; |
| 133 } // namespace io |
| 134 |
| 130 // NB, all indices are zero-based. | 135 // NB, all indices are zero-based. |
| 131 struct SourceLocation { | 136 struct SourceLocation { |
| 132 int start_line; | 137 int start_line; |
| 133 int end_line; | 138 int end_line; |
| 134 int start_column; | 139 int start_column; |
| 135 int end_column; | 140 int end_column; |
| 136 | 141 |
| 137 // Doc comments found at the source location. | 142 // Doc comments found at the source location. |
| 138 // See the comments in SourceCodeInfo.Location (descriptor.proto) for details. | 143 // See the comments in SourceCodeInfo.Location (descriptor.proto) for details. |
| 139 string leading_comments; | 144 string leading_comments; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // extent of this message declaration. Returns false and leaves | 357 // extent of this message declaration. Returns false and leaves |
| 353 // |*out_location| unchanged iff location information was not available. | 358 // |*out_location| unchanged iff location information was not available. |
| 354 bool GetSourceLocation(SourceLocation* out_location) const; | 359 bool GetSourceLocation(SourceLocation* out_location) const; |
| 355 | 360 |
| 356 private: | 361 private: |
| 357 typedef MessageOptions OptionsType; | 362 typedef MessageOptions OptionsType; |
| 358 | 363 |
| 359 // Allows tests to test CopyTo(proto, true). | 364 // Allows tests to test CopyTo(proto, true). |
| 360 friend class ::google::protobuf::descriptor_unittest::DescriptorTest; | 365 friend class ::google::protobuf::descriptor_unittest::DescriptorTest; |
| 361 | 366 |
| 367 // Allows access to GetLocationPath for annotations. |
| 368 friend class ::google::protobuf::io::Printer; |
| 369 |
| 362 // Fill the json_name field of FieldDescriptorProto. | 370 // Fill the json_name field of FieldDescriptorProto. |
| 363 void CopyJsonNameTo(DescriptorProto* proto) const; | 371 void CopyJsonNameTo(DescriptorProto* proto) const; |
| 364 | 372 |
| 365 // Internal version of DebugString; controls the level of indenting for | 373 // Internal version of DebugString; controls the level of indenting for |
| 366 // correct depth. Takes |options| to control debug-string options, and | 374 // correct depth. Takes |options| to control debug-string options, and |
| 367 // |include_opening_clause| to indicate whether the "message ... " part of the | 375 // |include_opening_clause| to indicate whether the "message ... " part of the |
| 368 // clause has already been generated (this varies depending on context). | 376 // clause has already been generated (this varies depending on context). |
| 369 void DebugString(int depth, string *contents, | 377 void DebugString(int depth, string *contents, |
| 370 const DebugStringOptions& options, | 378 const DebugStringOptions& options, |
| 371 bool include_opening_clause) const; | 379 bool include_opening_clause) const; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 // Source Location --------------------------------------------------- | 645 // Source Location --------------------------------------------------- |
| 638 | 646 |
| 639 // Updates |*out_location| to the source location of the complete | 647 // Updates |*out_location| to the source location of the complete |
| 640 // extent of this field declaration. Returns false and leaves | 648 // extent of this field declaration. Returns false and leaves |
| 641 // |*out_location| unchanged iff location information was not available. | 649 // |*out_location| unchanged iff location information was not available. |
| 642 bool GetSourceLocation(SourceLocation* out_location) const; | 650 bool GetSourceLocation(SourceLocation* out_location) const; |
| 643 | 651 |
| 644 private: | 652 private: |
| 645 typedef FieldOptions OptionsType; | 653 typedef FieldOptions OptionsType; |
| 646 | 654 |
| 655 // Allows access to GetLocationPath for annotations. |
| 656 friend class ::google::protobuf::io::Printer; |
| 657 |
| 647 // Fill the json_name field of FieldDescriptorProto. | 658 // Fill the json_name field of FieldDescriptorProto. |
| 648 void CopyJsonNameTo(FieldDescriptorProto* proto) const; | 659 void CopyJsonNameTo(FieldDescriptorProto* proto) const; |
| 649 | 660 |
| 650 // See Descriptor::DebugString(). | 661 // See Descriptor::DebugString(). |
| 651 enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL }; | 662 enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL }; |
| 652 void DebugString(int depth, PrintLabelFlag print_label_flag, | 663 void DebugString(int depth, PrintLabelFlag print_label_flag, |
| 653 string* contents, const DebugStringOptions& options) const; | 664 string* contents, const DebugStringOptions& options) const; |
| 654 | 665 |
| 655 // formats the default value appropriately and returns it as a string. | 666 // formats the default value appropriately and returns it as a string. |
| 656 // Must have a default value to call this. If quote_string_type is true, then | 667 // Must have a default value to call this. If quote_string_type is true, then |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 string DebugStringWithOptions(const DebugStringOptions& options) const; | 760 string DebugStringWithOptions(const DebugStringOptions& options) const; |
| 750 | 761 |
| 751 // Source Location --------------------------------------------------- | 762 // Source Location --------------------------------------------------- |
| 752 | 763 |
| 753 // Updates |*out_location| to the source location of the complete | 764 // Updates |*out_location| to the source location of the complete |
| 754 // extent of this oneof declaration. Returns false and leaves | 765 // extent of this oneof declaration. Returns false and leaves |
| 755 // |*out_location| unchanged iff location information was not available. | 766 // |*out_location| unchanged iff location information was not available. |
| 756 bool GetSourceLocation(SourceLocation* out_location) const; | 767 bool GetSourceLocation(SourceLocation* out_location) const; |
| 757 | 768 |
| 758 private: | 769 private: |
| 770 // Allows access to GetLocationPath for annotations. |
| 771 friend class ::google::protobuf::io::Printer; |
| 772 |
| 759 // See Descriptor::DebugString(). | 773 // See Descriptor::DebugString(). |
| 760 void DebugString(int depth, string* contents, | 774 void DebugString(int depth, string* contents, |
| 761 const DebugStringOptions& options) const; | 775 const DebugStringOptions& options) const; |
| 762 | 776 |
| 763 // Walks up the descriptor tree to generate the source location path | 777 // Walks up the descriptor tree to generate the source location path |
| 764 // to this descriptor from the file root. | 778 // to this descriptor from the file root. |
| 765 void GetLocationPath(std::vector<int>* output) const; | 779 void GetLocationPath(std::vector<int>* output) const; |
| 766 | 780 |
| 767 const string* name_; | 781 const string* name_; |
| 768 const string* full_name_; | 782 const string* full_name_; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 // Source Location --------------------------------------------------- | 853 // Source Location --------------------------------------------------- |
| 840 | 854 |
| 841 // Updates |*out_location| to the source location of the complete | 855 // Updates |*out_location| to the source location of the complete |
| 842 // extent of this enum declaration. Returns false and leaves | 856 // extent of this enum declaration. Returns false and leaves |
| 843 // |*out_location| unchanged iff location information was not available. | 857 // |*out_location| unchanged iff location information was not available. |
| 844 bool GetSourceLocation(SourceLocation* out_location) const; | 858 bool GetSourceLocation(SourceLocation* out_location) const; |
| 845 | 859 |
| 846 private: | 860 private: |
| 847 typedef EnumOptions OptionsType; | 861 typedef EnumOptions OptionsType; |
| 848 | 862 |
| 863 // Allows access to GetLocationPath for annotations. |
| 864 friend class ::google::protobuf::io::Printer; |
| 865 |
| 849 // Looks up a value by number. If the value does not exist, dynamically | 866 // Looks up a value by number. If the value does not exist, dynamically |
| 850 // creates a new EnumValueDescriptor for that value, assuming that it was | 867 // creates a new EnumValueDescriptor for that value, assuming that it was |
| 851 // unknown. If a new descriptor is created, this is done in a thread-safe way, | 868 // unknown. If a new descriptor is created, this is done in a thread-safe way, |
| 852 // and future calls will return the same value descriptor pointer. | 869 // and future calls will return the same value descriptor pointer. |
| 853 // | 870 // |
| 854 // This is private but is used by GeneratedMessageReflection (which is | 871 // This is private but is used by GeneratedMessageReflection (which is |
| 855 // friended below) to return a valid EnumValueDescriptor from GetEnum() when | 872 // friended below) to return a valid EnumValueDescriptor from GetEnum() when |
| 856 // this feature is enabled. | 873 // this feature is enabled. |
| 857 const EnumValueDescriptor* | 874 const EnumValueDescriptor* |
| 858 FindValueByNumberCreatingIfUnknown(int number) const; | 875 FindValueByNumberCreatingIfUnknown(int number) const; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 // Source Location --------------------------------------------------- | 952 // Source Location --------------------------------------------------- |
| 936 | 953 |
| 937 // Updates |*out_location| to the source location of the complete | 954 // Updates |*out_location| to the source location of the complete |
| 938 // extent of this enum value declaration. Returns false and leaves | 955 // extent of this enum value declaration. Returns false and leaves |
| 939 // |*out_location| unchanged iff location information was not available. | 956 // |*out_location| unchanged iff location information was not available. |
| 940 bool GetSourceLocation(SourceLocation* out_location) const; | 957 bool GetSourceLocation(SourceLocation* out_location) const; |
| 941 | 958 |
| 942 private: | 959 private: |
| 943 typedef EnumValueOptions OptionsType; | 960 typedef EnumValueOptions OptionsType; |
| 944 | 961 |
| 962 // Allows access to GetLocationPath for annotations. |
| 963 friend class ::google::protobuf::io::Printer; |
| 964 |
| 945 // See Descriptor::DebugString(). | 965 // See Descriptor::DebugString(). |
| 946 void DebugString(int depth, string *contents, | 966 void DebugString(int depth, string *contents, |
| 947 const DebugStringOptions& options) const; | 967 const DebugStringOptions& options) const; |
| 948 | 968 |
| 949 // Walks up the descriptor tree to generate the source location path | 969 // Walks up the descriptor tree to generate the source location path |
| 950 // to this descriptor from the file root. | 970 // to this descriptor from the file root. |
| 951 void GetLocationPath(std::vector<int>* output) const; | 971 void GetLocationPath(std::vector<int>* output) const; |
| 952 | 972 |
| 953 const string* name_; | 973 const string* name_; |
| 954 const string* full_name_; | 974 const string* full_name_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 // Source Location --------------------------------------------------- | 1031 // Source Location --------------------------------------------------- |
| 1012 | 1032 |
| 1013 // Updates |*out_location| to the source location of the complete | 1033 // Updates |*out_location| to the source location of the complete |
| 1014 // extent of this service declaration. Returns false and leaves | 1034 // extent of this service declaration. Returns false and leaves |
| 1015 // |*out_location| unchanged iff location information was not available. | 1035 // |*out_location| unchanged iff location information was not available. |
| 1016 bool GetSourceLocation(SourceLocation* out_location) const; | 1036 bool GetSourceLocation(SourceLocation* out_location) const; |
| 1017 | 1037 |
| 1018 private: | 1038 private: |
| 1019 typedef ServiceOptions OptionsType; | 1039 typedef ServiceOptions OptionsType; |
| 1020 | 1040 |
| 1041 // Allows access to GetLocationPath for annotations. |
| 1042 friend class ::google::protobuf::io::Printer; |
| 1043 |
| 1021 // See Descriptor::DebugString(). | 1044 // See Descriptor::DebugString(). |
| 1022 void DebugString(string *contents, const DebugStringOptions& options) const; | 1045 void DebugString(string *contents, const DebugStringOptions& options) const; |
| 1023 | 1046 |
| 1024 // Walks up the descriptor tree to generate the source location path | 1047 // Walks up the descriptor tree to generate the source location path |
| 1025 // to this descriptor from the file root. | 1048 // to this descriptor from the file root. |
| 1026 void GetLocationPath(std::vector<int>* output) const; | 1049 void GetLocationPath(std::vector<int>* output) const; |
| 1027 | 1050 |
| 1028 const string* name_; | 1051 const string* name_; |
| 1029 const string* full_name_; | 1052 const string* full_name_; |
| 1030 const FileDescriptor* file_; | 1053 const FileDescriptor* file_; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 // Source Location --------------------------------------------------- | 1112 // Source Location --------------------------------------------------- |
| 1090 | 1113 |
| 1091 // Updates |*out_location| to the source location of the complete | 1114 // Updates |*out_location| to the source location of the complete |
| 1092 // extent of this method declaration. Returns false and leaves | 1115 // extent of this method declaration. Returns false and leaves |
| 1093 // |*out_location| unchanged iff location information was not available. | 1116 // |*out_location| unchanged iff location information was not available. |
| 1094 bool GetSourceLocation(SourceLocation* out_location) const; | 1117 bool GetSourceLocation(SourceLocation* out_location) const; |
| 1095 | 1118 |
| 1096 private: | 1119 private: |
| 1097 typedef MethodOptions OptionsType; | 1120 typedef MethodOptions OptionsType; |
| 1098 | 1121 |
| 1122 // Allows access to GetLocationPath for annotations. |
| 1123 friend class ::google::protobuf::io::Printer; |
| 1124 |
| 1099 // See Descriptor::DebugString(). | 1125 // See Descriptor::DebugString(). |
| 1100 void DebugString(int depth, string *contents, | 1126 void DebugString(int depth, string *contents, |
| 1101 const DebugStringOptions& options) const; | 1127 const DebugStringOptions& options) const; |
| 1102 | 1128 |
| 1103 // Walks up the descriptor tree to generate the source location path | 1129 // Walks up the descriptor tree to generate the source location path |
| 1104 // to this descriptor from the file root. | 1130 // to this descriptor from the file root. |
| 1105 void GetLocationPath(std::vector<int>* output) const; | 1131 void GetLocationPath(std::vector<int>* output) const; |
| 1106 | 1132 |
| 1107 const string* name_; | 1133 const string* name_; |
| 1108 const string* full_name_; | 1134 const string* full_name_; |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range, | 1664 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range, |
| 1639 const Descriptor::ExtensionRange*) | 1665 const Descriptor::ExtensionRange*) |
| 1640 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension, | 1666 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension, |
| 1641 const FieldDescriptor*) | 1667 const FieldDescriptor*) |
| 1642 | 1668 |
| 1643 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int) | 1669 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int) |
| 1644 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range, | 1670 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range, |
| 1645 const Descriptor::ReservedRange*) | 1671 const Descriptor::ReservedRange*) |
| 1646 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int) | 1672 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int) |
| 1647 | 1673 |
| 1648 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions); | 1674 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions) |
| 1649 PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool) | 1675 PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool) |
| 1650 | 1676 |
| 1651 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name) | 1677 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name) |
| 1652 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name) | 1678 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name) |
| 1653 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, json_name) | 1679 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, json_name) |
| 1654 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, lowercase_name) | 1680 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, lowercase_name) |
| 1655 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, camelcase_name) | 1681 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, camelcase_name) |
| 1656 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*) | 1682 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*) |
| 1657 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, number, int) | 1683 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, number, int) |
| 1658 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool) | 1684 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1683 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*) | 1709 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*) |
| 1684 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int) | 1710 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int) |
| 1685 | 1711 |
| 1686 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, name) | 1712 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, name) |
| 1687 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, full_name) | 1713 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, full_name) |
| 1688 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, file, const FileDescriptor*) | 1714 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, file, const FileDescriptor*) |
| 1689 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*) | 1715 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*) |
| 1690 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int) | 1716 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int) |
| 1691 PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value, | 1717 PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value, |
| 1692 const EnumValueDescriptor*) | 1718 const EnumValueDescriptor*) |
| 1693 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions); | 1719 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions) |
| 1694 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool) | 1720 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool) |
| 1695 | 1721 |
| 1696 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name) | 1722 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name) |
| 1697 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, full_name) | 1723 PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, full_name) |
| 1698 PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, number, int) | 1724 PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, number, int) |
| 1699 PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, type, const EnumDescriptor*) | 1725 PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, type, const EnumDescriptor*) |
| 1700 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions) | 1726 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions) |
| 1701 | 1727 |
| 1702 PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, name) | 1728 PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, name) |
| 1703 PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, full_name) | 1729 PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, full_name) |
| 1704 PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*) | 1730 PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*) |
| 1705 PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int) | 1731 PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int) |
| 1706 PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method, | 1732 PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method, |
| 1707 const MethodDescriptor*) | 1733 const MethodDescriptor*) |
| 1708 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions); | 1734 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions) |
| 1709 | 1735 |
| 1710 PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name) | 1736 PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name) |
| 1711 PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name) | 1737 PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name) |
| 1712 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*) | 1738 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*) |
| 1713 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*) | 1739 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*) |
| 1714 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*) | 1740 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*) |
| 1715 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions); | 1741 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions) |
| 1716 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool) | 1742 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool) |
| 1717 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool) | 1743 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool) |
| 1718 | 1744 |
| 1719 PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name) | 1745 PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name) |
| 1720 PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package) | 1746 PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package) |
| 1721 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*) | 1747 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*) |
| 1722 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, dependency_count, int) | 1748 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, dependency_count, int) |
| 1723 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, public_dependency_count, int) | 1749 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, public_dependency_count, int) |
| 1724 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, weak_dependency_count, int) | 1750 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, weak_dependency_count, int) |
| 1725 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int) | 1751 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int) |
| 1726 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int) | 1752 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int) |
| 1727 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int) | 1753 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int) |
| 1728 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int) | 1754 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int) |
| 1729 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions); | 1755 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions) |
| 1730 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool) | 1756 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool) |
| 1731 | 1757 |
| 1732 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*) | 1758 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*) |
| 1733 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*) | 1759 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*) |
| 1734 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, service, | 1760 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, service, |
| 1735 const ServiceDescriptor*) | 1761 const ServiceDescriptor*) |
| 1736 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, extension, | 1762 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, extension, |
| 1737 const FieldDescriptor*) | 1763 const FieldDescriptor*) |
| 1738 | 1764 |
| 1739 #undef PROTOBUF_DEFINE_ACCESSOR | 1765 #undef PROTOBUF_DEFINE_ACCESSOR |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1877 // Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because fields_ is actually an array | 1903 // Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because fields_ is actually an array |
| 1878 // of pointers rather than the usual array of objects. | 1904 // of pointers rather than the usual array of objects. |
| 1879 inline const FieldDescriptor* OneofDescriptor::field(int index) const { | 1905 inline const FieldDescriptor* OneofDescriptor::field(int index) const { |
| 1880 return fields_[index]; | 1906 return fields_[index]; |
| 1881 } | 1907 } |
| 1882 | 1908 |
| 1883 } // namespace protobuf | 1909 } // namespace protobuf |
| 1884 | 1910 |
| 1885 } // namespace google | 1911 } // namespace google |
| 1886 #endif // GOOGLE_PROTOBUF_DESCRIPTOR_H__ | 1912 #endif // GOOGLE_PROTOBUF_DESCRIPTOR_H__ |
| OLD | NEW |