#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
Protocol buffer representations of descriptors.
This file defines a set of protocol message classes which represent the same information represented by the classes defined in descriptor.h. You can convert a FileDescriptorProto to a FileDescriptor using the DescriptorPool class. Thus, the classes in this file allow protocol type definitions to be communicated efficiently between processes.
The protocol compiler currently doesn't support auto-generated documentation, hence this page contains no descriptions. This file was generated by the protocol compiler from descriptor.proto
, whose contents are as follows:
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // The messages in this file describe the definitions found in .proto files. // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). syntax = "proto2"; package google.protobuf; option go_package = "descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; option csharp_namespace = "Google.Protobuf.Reflection"; option objc_class_prefix = "GPB"; // descriptor.proto must be optimized for speed because reflection-based // algorithms don't work during bootstrapping. option optimize_for = SPEED; // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. message FileDescriptorSet { repeated FileDescriptorProto file = 1; } // Describes a complete .proto file. message FileDescriptorProto { optional string name = 1; // file name, relative to root of source tree optional string package = 2; // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. repeated string dependency = 3; // Indexes of the public imported files in the dependency list above. repeated int32 public_dependency = 10; // Indexes of the weak imported files in the dependency list. // For Google-internal migration only. Do not use. repeated int32 weak_dependency = 11; // All top-level definitions in this file. repeated DescriptorProto message_type = 4; repeated EnumDescriptorProto enum_type = 5; repeated ServiceDescriptorProto service = 6; repeated FieldDescriptorProto extension = 7; optional FileOptions options = 8; // This field contains optional information about the original source code. // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; // The syntax of the proto file. // The supported values are "proto2" and "proto3". optional string syntax = 12; } // Describes a message type. message DescriptorProto { optional string name = 1; repeated FieldDescriptorProto field = 2; repeated FieldDescriptorProto extension = 6; repeated DescriptorProto nested_type = 3; repeated EnumDescriptorProto enum_type = 4; message ExtensionRange { optional int32 start = 1; optional int32 end = 2; } repeated ExtensionRange extension_range = 5; repeated OneofDescriptorProto oneof_decl = 8; optional MessageOptions options = 7; // Range of reserved tag numbers. Reserved tag numbers may not be used by // fields or extension ranges in the same message. Reserved ranges may // not overlap. message ReservedRange { optional int32 start = 1; // Inclusive. optional int32 end = 2; // Exclusive. } repeated ReservedRange reserved_range = 9; // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. repeated string reserved_name = 10; } // Describes a field within a message. message FieldDescriptorProto { enum Type { // 0 is reserved for errors. // Order is weird for historical reasons. TYPE_DOUBLE = 1; TYPE_FLOAT = 2; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. TYPE_INT64 = 3; TYPE_UINT64 = 4; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. TYPE_INT32 = 5; TYPE_FIXED64 = 6; TYPE_FIXED32 = 7; TYPE_BOOL = 8; TYPE_STRING = 9; TYPE_GROUP = 10; // Tag-delimited aggregate. TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. TYPE_BYTES = 12; TYPE_UINT32 = 13; TYPE_ENUM = 14; TYPE_SFIXED32 = 15; TYPE_SFIXED64 = 16; TYPE_SINT32 = 17; // Uses ZigZag encoding. TYPE_SINT64 = 18; // Uses ZigZag encoding. }; enum Label { // 0 is reserved for errors LABEL_OPTIONAL = 1; LABEL_REQUIRED = 2; LABEL_REPEATED = 3; }; optional string name = 1; optional int32 number = 3; optional Label label = 4; // If type_name is set, this need not be set. If both this and type_name // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. optional Type type = 5; // For message and enum types, this is the name of the type. If the name // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping // rules are used to find the type (i.e. first the nested types within this // message are searched, then within the parent, on up to the root // namespace). optional string type_name = 6; // For extensions, this is the name of the type being extended. It is // resolved in the same manner as type_name. optional string extendee = 2; // For numeric types, contains the original text representation of the value. // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. // TODO(kenton): Base-64 encode? optional string default_value = 7; // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. optional int32 oneof_index = 9; // JSON name of this field. The value is set by protocol compiler. If the // user has set a "json_name" option on this field, that option's value // will be used. Otherwise, it's deduced from the field's name by converting // it to camelCase. optional string json_name = 10; optional FieldOptions options = 8; } // Describes a oneof. message OneofDescriptorProto { optional string name = 1; optional OneofOptions options = 2; } // Describes an enum type. message EnumDescriptorProto { optional string name = 1; repeated EnumValueDescriptorProto value = 2; optional EnumOptions options = 3; } // Describes a value within an enum. message EnumValueDescriptorProto { optional string name = 1; optional int32 number = 2; optional EnumValueOptions options = 3; } // Describes a service. message ServiceDescriptorProto { optional string name = 1; repeated MethodDescriptorProto method = 2; optional ServiceOptions options = 3; } // Describes a method of a service. message MethodDescriptorProto { optional string name = 1; // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. optional string input_type = 2; optional string output_type = 3; optional MethodOptions options = 4; // Identifies if client streams multiple client messages optional bool client_streaming = 5 [[]default=false]; // Identifies if server streams multiple server messages optional bool server_streaming = 6 [[]default=false]; } // =================================================================== // Options // Each of the definitions above may have "options" attached. These are // just annotations which may cause code to be generated slightly differently // or may contain hints for code that manipulates protocol messages. // // Clients may define custom options as extensions of the *Options messages. // These extensions may not yet be known at parsing time, so the parser cannot // store the values in them. Instead it stores them in a field in the *Options // message called uninterpreted_option. This field must have the same name // across all *Options messages. We then use this field to populate the // extensions when we build a descriptor, at which point all protos have been // parsed and so all extensions are known. // // Extension numbers for custom options may be chosen as follows: // * For options which will only be used within a single application or // organization, or for experimental options, use field numbers 50000 // through 99999. It is up to you to ensure that you do not use the // same number for multiple options. // * For options which will be published and used publicly by multiple // independent entities, e-mail protobuf-global-extension-registry@google.com // to reserve extension numbers. Simply provide your project name (e.g. // Objective-C plugin) and your project website (if available) -- there's no // need to explain how you intend to use them. Usually you only need one // extension number. You can declare multiple options with only one extension // number by putting them in a sub-message. See the Custom Options section of // the docs for examples: // https://developers.google.com/protocol-buffers/docs/proto#options // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. message FileOptions { // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards // domain names. optional string java_package = 1; // If set, all the classes from the .proto file are wrapped in a single // outer class with the given name. This applies to both Proto1 // (equivalent to the old "--one_java_file" option) and Proto2 (where // a .proto always translates to a single class, but you may want to // explicitly choose the class name). optional string java_outer_classname = 8; // If set true, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto // file. Thus, these types will *not* be nested inside the outer class // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. optional bool java_multiple_files = 10 [[]default=false]; // This option does nothing. optional bool java_generate_equals_and_hash = 20 [[]deprecated=true]; // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 // byte sequence to a string field. // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime. optional bool java_string_check_utf8 = 27 [[]default=false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode { SPEED = 1; // Generate complete code for parsing, serialization, // etc. CODE_SIZE = 2; // Use ReflectionOps to implement these methods. LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. } optional OptimizeMode optimize_for = 9 [[]default=SPEED]; // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following: // - The basename of the package import path, if provided. // - Otherwise, the package statement in the .proto file, if present. // - Otherwise, the basename of the .proto file, without extension. optional string go_package = 11; // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). // Generic services were the only kind of service generation supported by // early versions of google.protobuf. // // Generic services are now considered deprecated in favor of using plugins // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true. optional bool cc_generic_services = 16 [[]default=false]; optional bool java_generic_services = 17 [[]default=false]; optional bool py_generic_services = 18 [[]default=false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files. optional bool deprecated = 23 [[]default=false]; // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. optional bool cc_enable_arenas = 31 [[]default=false]; // Sets the objective c class prefix which is prepended to all objective c // generated classes from this .proto. There is no default. optional string objc_class_prefix = 36; // Namespace for generated classes; defaults to the package. optional string csharp_namespace = 37; // By default Swift generators will take the proto package and CamelCase it // replacing '.' with underscore and use that to prefix the types/symbols // defined. When this options is provided, they will use this value instead // to prefix the types/symbols defined. optional string swift_prefix = 39; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; reserved 38; } message MessageOptions { // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less // efficient, has fewer features, and is more complicated. // // The message must be defined exactly as follows: // message Foo { // option message_set_wire_format = true; // extensions 4 to max; // } // Note that the message cannot have any defined fields; MessageSets only // have extensions. // // All extensions of your type must be singular messages; e.g. they cannot // be int32s, enums, or repeated messages. // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. optional bool message_set_wire_format = 1 [[]default=false]; // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor". optional bool no_standard_descriptor_accessor = 2 [[]default=false]; // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. optional bool deprecated = 3 [[]default=false]; // Whether the message is an automatically generated map entry type for the // maps field. // // For maps fields: // map<KeyType, ValueType> map_field = 1; // The parsed descriptor looks like: // message MapFieldEntry { // option map_entry = true; // optional KeyType key = 1; // optional ValueType value = 2; // } // repeated MapFieldEntry map_field = 1; // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementions still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax // instead. The option should only be implicitly set by the proto compiler // parser. optional bool map_entry = 7; reserved 8; // javalite_serializable // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message FieldOptions { // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is not yet implemented in the open source // release -- sorry, we'll try to include it in a future version! optional CType ctype = 1 [[]default = STRING]; enum CType { // Default mode. STRING = 0; CORD = 1; STRING_PIECE = 2; } // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as // a single length-delimited blob. In proto3, only explicit setting it to // false will avoid using packed encoding. optional bool packed = 2; // The jstype option determines the JavaScript type used for values of the // field. The option is permitted only for 64 bit integral and fixed types // (int64, uint64, sint64, fixed64, sfixed64). By default these types are // represented as JavaScript strings. This avoids loss of precision that can // happen when a large value is converted to a floating point JavaScript // numbers. Specifying JS_NUMBER for the jstype causes the generated // JavaScript code to use the JavaScript "number" type instead of strings. // This option is an enum to permit additional types to be added, // e.g. goog.math.Integer. optional JSType jstype = 6 [[]default = JS_NORMAL]; enum JSType { // Use the default type. JS_NORMAL = 0; // Use JavaScript strings. JS_STRING = 1; // Use JavaScript numbers. JS_NUMBER = 2; } // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the // inner message's contents will not be parsed but instead stored in encoded // form. The inner message will actually be parsed when it is first accessed. // // This is only a hint. Implementations are free to choose whether to use // eager or lazy parsing regardless of the value of this option. However, // setting this option true suggests that the protocol author believes that // using lazy parsing on this field is worth the additional bookkeeping // overhead typically needed to implement it. // // This option does not affect the public interface of any generated code; // all method signatures remain the same. Furthermore, thread-safety of the // interface is not affected by this option; const methods remain safe to // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // // // Note that implementations may choose not to check required fields within // a lazy sub-message. That is, calling IsInitialized() on the outer message // may return true even if the inner message has missing required fields. // This is necessary because otherwise the inner message would have to be // parsed in order to perform the check, defeating the purpose of lazy // parsing. An implementation which chooses not to check required fields // must be consistent about it. That is, for any particular sub-message, the // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. optional bool lazy = 5 [[]default=false]; // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. optional bool deprecated = 3 [[]default=false]; // For Google-internal migration only. Do not use. optional bool weak = 10 [[]default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; reserved 4; // removed jtype } message OneofOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message EnumOptions { // Set this option to true to allow mapping different tag names to the same // value. optional bool allow_alias = 2; // Is this enum deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. optional bool deprecated = 3 [[]default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message EnumValueOptions { // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. optional bool deprecated = 1 [[]default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message ServiceOptions { // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers. // Is this service deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services. optional bool deprecated = 33 [[]default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message MethodOptions { // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers. // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods. optional bool deprecated = 33 [[]default=false]; // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0; NO_SIDE_EFFECTS = 1; // implies idempotent IDEMPOTENT = 2; // idempotent, but may have side effects } optional IdempotencyLevel idempotency_level = 34 [[]default=IDEMPOTENCY_UNKNOWN]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } // A message representing a option the parser does not recognize. This only // appears in options protos created by the compiler::Parser class. // DescriptorPool resolves these when building Descriptor objects. Therefore, // options protos in descriptor objects (e.g. returned by Descriptor::options(), // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. message UninterpretedOption { // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). // E.g.,{ [[]"foo", false], [[]"bar.baz", true], [[]"qux", false] } represents // "foo.(bar.baz).qux". message NamePart { required string name_part = 1; required bool is_extension = 2; } repeated NamePart name = 2; // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. optional string identifier_value = 3; optional uint64 positive_int_value = 4; optional int64 negative_int_value = 5; optional double double_value = 6; optional bytes string_value = 7; optional string aggregate_value = 8; } // =================================================================== // Optional source code info // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. message SourceCodeInfo { // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar // tools. // // For example, say we have a file like: // message Foo { // optional string foo = 1; // } // Let's look at just the field definition: // optional string foo = 1; // ^ ^^ ^^ ^ ^^^ // a bc de f ghi // We have the following locations: // span path represents // [[]a,i) [[] 4, 0, 2, 0 ] The whole field definition. // [[]a,b) [[] 4, 0, 2, 0, 4 ] The label (optional). // [[]c,d) [[] 4, 0, 2, 0, 5 ] The type (string). // [[]e,f) [[] 4, 0, 2, 0, 1 ] The name (foo). // [[]g,h) [[] 4, 0, 2, 0, 3 ] The number (1). // // Notes: // - A location may refer to a repeated field itself (i.e. not to any // particular index within it). This is used whenever a set of elements are // logically enclosed in a single code segment. For example, an entire // extend block (possibly containing multiple extension definitions) will // have an outer location whose path refers to the "extensions" repeated // field without an index. // - Multiple locations may have the same path. This happens when a single // logical declaration is spread out across multiple places. The most // obvious example is the "extend" block again -- there may be multiple // extend blocks in the same scope, each of which will have the same path. // - A location's span is not always a subset of its parent's span. For // example, the "extendee" of an extension declaration appears at the // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span // does not mean that it is a descendent. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. repeated Location location = 1; message Location { // Identifies which part of the FileDescriptorProto was defined at this // location. // // Each element is a field number or an index. They form a path from // the root FileDescriptorProto to the place where the definition. For // example, this path: // [[] 4, 3, 2, 7, 1 ] // refers to: // file.message_type(3) // 4, 3 // .field(7) // 2, 7 // .name() // 1 // This is because FileDescriptorProto.message_type has field number 4: // repeated DescriptorProto message_type = 4; // and DescriptorProto.field has field number 2: // repeated FieldDescriptorProto field = 2; // and FieldDescriptorProto.name has field number 1: // optional string name = 1; // // Thus, the above path gives the location of a field name. If we removed // the last element: // [[] 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). repeated int32 path = 1 [[]packed=true]; // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user. repeated int32 span = 2 [[]packed=true]; // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be // attached to the declaration. // // A series of line comments appearing on consecutive lines, with no other // tokens appearing on those lines, will be treated as a single comment. // // leading_detached_comments will keep paragraphs of comments that appear // before (but not connected to) the current element. Each paragraph, // separated by empty lines, will be one comment element in the repeated // field. // // Only the comment content is provided; comment markers (e.g. //) are // stripped out. For block comments, leading whitespace and an asterisk // will be stripped from the beginning of each line other than the first. // Newlines are included in the output. // // Examples: // // optional int32 foo = 1; // Comment attached to foo. // // Comment attached to bar. // optional int32 bar = 2; // // optional string baz = 3; // // Comment attached to baz. // // Another line attached to baz. // // // Comment attached to qux. // // // // Another line attached to qux. // optional double qux = 4; // // // Detached comment for corge. This is not leading or trailing comments // // to qux or corge because there are blank lines separating it from // // both. // // // Detached comment for corge paragraph 2. // // optional string corge = 5; // /* Block comment attached // * to corge. Leading asterisks // * will be removed. */ // /* Block comment attached to // * grault. */ // optional int32 grault = 6; // // // ignored detached comments. optional string leading_comments = 3; optional string trailing_comments = 4; repeated string leading_detached_comments = 6; } } // Describes the relationship between generated code and its original source // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. message GeneratedCodeInfo { // An Annotation connects some span of text in generated code to an element // of its generating .proto file. repeated Annotation annotation = 1; message Annotation { // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. repeated int32 path = 1 [[]packed=true]; // Identifies the filesystem path to the original source .proto. optional string source_file = 2; // Identifies the starting offset in bytes in the generated code // that relates to the identified object. optional int32 begin = 3; // Identifies the ending offset in bytes in the generated code that // relates to the identified offset. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). optional int32 end = 4; } }
Classes in this file | |
---|---|
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. | |
See the docs for descriptor.pb.h for more information about this class. |
File MembersThese definitions are not part of any class. | |
---|---|
enum | FieldDescriptorProto_Type |
enum | FieldDescriptorProto_Label |
enum | FileOptions_OptimizeMode |
enum | FieldOptions_CType |
enum | FieldOptions_JSType |
enum | MethodOptions_IdempotencyLevel |
const FieldDescriptorProto_Type | FieldDescriptorProto_Type_Type_MIN = = FieldDescriptorProto_Type_TYPE_DOUBLE |
const FieldDescriptorProto_Type | FieldDescriptorProto_Type_Type_MAX = = FieldDescriptorProto_Type_TYPE_SINT64 |
const int | FieldDescriptorProto_Type_Type_ARRAYSIZE = = FieldDescriptorProto_Type_Type_MAX + 1 |
const FieldDescriptorProto_Label | FieldDescriptorProto_Label_Label_MIN = = FieldDescriptorProto_Label_LABEL_OPTIONAL |
const FieldDescriptorProto_Label | FieldDescriptorProto_Label_Label_MAX = = FieldDescriptorProto_Label_LABEL_REPEATED |
const int | FieldDescriptorProto_Label_Label_ARRAYSIZE = = FieldDescriptorProto_Label_Label_MAX + 1 |
const FileOptions_OptimizeMode | FileOptions_OptimizeMode_OptimizeMode_MIN = = FileOptions_OptimizeMode_SPEED |
const FileOptions_OptimizeMode | FileOptions_OptimizeMode_OptimizeMode_MAX = = FileOptions_OptimizeMode_LITE_RUNTIME |
const int | FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE = = FileOptions_OptimizeMode_OptimizeMode_MAX + 1 |
const FieldOptions_CType | FieldOptions_CType_CType_MIN = = FieldOptions_CType_STRING |
const FieldOptions_CType | FieldOptions_CType_CType_MAX = = FieldOptions_CType_STRING_PIECE |
const int | FieldOptions_CType_CType_ARRAYSIZE = = FieldOptions_CType_CType_MAX + 1 |
const FieldOptions_JSType | FieldOptions_JSType_JSType_MIN = = FieldOptions_JSType_JS_NORMAL |
const FieldOptions_JSType | FieldOptions_JSType_JSType_MAX = = FieldOptions_JSType_JS_NUMBER |
const int | FieldOptions_JSType_JSType_ARRAYSIZE = = FieldOptions_JSType_JSType_MAX + 1 |
const MethodOptions_IdempotencyLevel | MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN = = MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN |
const MethodOptions_IdempotencyLevel | MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX = = MethodOptions_IdempotencyLevel_IDEMPOTENT |
const int | MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE = = MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX + 1 |
void | protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() Internal implementation detail – do not call these. |
void | protobuf_InitDefaults_google_2fprotobuf_2fdescriptor_2eproto() |
bool | FieldDescriptorProto_Type_IsValid(int value) |
const EnumDescriptor * | FieldDescriptorProto_Type_descriptor() |
const ::std::string & | FieldDescriptorProto_Type_Name(FieldDescriptorProto_Type value) |
bool | FieldDescriptorProto_Type_Parse(const ::std::string & name, FieldDescriptorProto_Type * value) |
bool | FieldDescriptorProto_Label_IsValid(int value) |
const EnumDescriptor * | FieldDescriptorProto_Label_descriptor() |
const ::std::string & | FieldDescriptorProto_Label_Name(FieldDescriptorProto_Label value) |
bool | FieldDescriptorProto_Label_Parse(const ::std::string & name, FieldDescriptorProto_Label * value) |
bool | FileOptions_OptimizeMode_IsValid(int value) |
const EnumDescriptor * | FileOptions_OptimizeMode_descriptor() |
const ::std::string & | FileOptions_OptimizeMode_Name(FileOptions_OptimizeMode value) |
bool | FileOptions_OptimizeMode_Parse(const ::std::string & name, FileOptions_OptimizeMode * value) |
bool | FieldOptions_CType_IsValid(int value) |
const EnumDescriptor * | FieldOptions_CType_descriptor() |
const ::std::string & | FieldOptions_CType_Name(FieldOptions_CType value) |
bool | FieldOptions_CType_Parse(const ::std::string & name, FieldOptions_CType * value) |
bool | FieldOptions_JSType_IsValid(int value) |
const EnumDescriptor * | FieldOptions_JSType_descriptor() |
const ::std::string & | FieldOptions_JSType_Name(FieldOptions_JSType value) |
bool | FieldOptions_JSType_Parse(const ::std::string & name, FieldOptions_JSType * value) |
bool | MethodOptions_IdempotencyLevel_IsValid(int value) |
const EnumDescriptor * | MethodOptions_IdempotencyLevel_descriptor() |
const ::std::string & | MethodOptions_IdempotencyLevel_Name(MethodOptions_IdempotencyLevel value) |
bool | MethodOptions_IdempotencyLevel_Parse(const ::std::string & name, MethodOptions_IdempotencyLevel * value) |
const EnumDescriptor * | GetEnumDescriptor< FieldDescriptorProto_Type >() |
const EnumDescriptor * | GetEnumDescriptor< FieldDescriptorProto_Label >() |
const EnumDescriptor * | GetEnumDescriptor< FileOptions_OptimizeMode >() |
const EnumDescriptor * | GetEnumDescriptor< FieldOptions_CType >() |
const EnumDescriptor * | GetEnumDescriptor< FieldOptions_JSType >() |
const EnumDescriptor * | GetEnumDescriptor< MethodOptions_IdempotencyLevel >() |
enum protobuf::FieldDescriptorProto_Type {
FieldDescriptorProto_Type_TYPE_DOUBLE = = 1,
FieldDescriptorProto_Type_TYPE_FLOAT = = 2,
FieldDescriptorProto_Type_TYPE_INT64 = = 3,
FieldDescriptorProto_Type_TYPE_UINT64 = = 4,
FieldDescriptorProto_Type_TYPE_INT32 = = 5,
FieldDescriptorProto_Type_TYPE_FIXED64 = = 6,
FieldDescriptorProto_Type_TYPE_FIXED32 = = 7,
FieldDescriptorProto_Type_TYPE_BOOL = = 8,
FieldDescriptorProto_Type_TYPE_STRING = = 9,
FieldDescriptorProto_Type_TYPE_GROUP = = 10,
FieldDescriptorProto_Type_TYPE_MESSAGE = = 11,
FieldDescriptorProto_Type_TYPE_BYTES = = 12,
FieldDescriptorProto_Type_TYPE_UINT32 = = 13,
FieldDescriptorProto_Type_TYPE_ENUM = = 14,
FieldDescriptorProto_Type_TYPE_SFIXED32 = = 15,
FieldDescriptorProto_Type_TYPE_SFIXED64 = = 16,
FieldDescriptorProto_Type_TYPE_SINT32 = = 17,
FieldDescriptorProto_Type_TYPE_SINT64 = = 18
}
FieldDescriptorProto_Type_TYPE_DOUBLE = = 1,
FieldDescriptorProto_Type_TYPE_FLOAT = = 2,
FieldDescriptorProto_Type_TYPE_INT64 = = 3,
FieldDescriptorProto_Type_TYPE_UINT64 = = 4,
FieldDescriptorProto_Type_TYPE_INT32 = = 5,
FieldDescriptorProto_Type_TYPE_FIXED64 = = 6,
FieldDescriptorProto_Type_TYPE_FIXED32 = = 7,
FieldDescriptorProto_Type_TYPE_BOOL = = 8,
FieldDescriptorProto_Type_TYPE_STRING = = 9,
FieldDescriptorProto_Type_TYPE_GROUP = = 10,
FieldDescriptorProto_Type_TYPE_MESSAGE = = 11,
FieldDescriptorProto_Type_TYPE_BYTES = = 12,
FieldDescriptorProto_Type_TYPE_UINT32 = = 13,
FieldDescriptorProto_Type_TYPE_ENUM = = 14,
FieldDescriptorProto_Type_TYPE_SFIXED32 = = 15,
FieldDescriptorProto_Type_TYPE_SFIXED64 = = 16,
FieldDescriptorProto_Type_TYPE_SINT32 = = 17,
FieldDescriptorProto_Type_TYPE_SINT64 = = 18
}
FieldDescriptorProto_Type_TYPE_DOUBLE | |
FieldDescriptorProto_Type_TYPE_FLOAT | |
FieldDescriptorProto_Type_TYPE_INT64 | |
FieldDescriptorProto_Type_TYPE_UINT64 | |
FieldDescriptorProto_Type_TYPE_INT32 | |
FieldDescriptorProto_Type_TYPE_FIXED64 | |
FieldDescriptorProto_Type_TYPE_FIXED32 | |
FieldDescriptorProto_Type_TYPE_BOOL | |
FieldDescriptorProto_Type_TYPE_STRING | |
FieldDescriptorProto_Type_TYPE_GROUP | |
FieldDescriptorProto_Type_TYPE_MESSAGE | |
FieldDescriptorProto_Type_TYPE_BYTES | |
FieldDescriptorProto_Type_TYPE_UINT32 | |
FieldDescriptorProto_Type_TYPE_ENUM | |
FieldDescriptorProto_Type_TYPE_SFIXED32 | |
FieldDescriptorProto_Type_TYPE_SFIXED64 | |
FieldDescriptorProto_Type_TYPE_SINT32 | |
FieldDescriptorProto_Type_TYPE_SINT64 |
enum protobuf::FieldDescriptorProto_Label {
FieldDescriptorProto_Label_LABEL_OPTIONAL = = 1,
FieldDescriptorProto_Label_LABEL_REQUIRED = = 2,
FieldDescriptorProto_Label_LABEL_REPEATED = = 3
}
FieldDescriptorProto_Label_LABEL_OPTIONAL = = 1,
FieldDescriptorProto_Label_LABEL_REQUIRED = = 2,
FieldDescriptorProto_Label_LABEL_REPEATED = = 3
}
FieldDescriptorProto_Label_LABEL_OPTIONAL | |
FieldDescriptorProto_Label_LABEL_REQUIRED | |
FieldDescriptorProto_Label_LABEL_REPEATED |
enum protobuf::FileOptions_OptimizeMode {
FileOptions_OptimizeMode_SPEED = = 1,
FileOptions_OptimizeMode_CODE_SIZE = = 2,
FileOptions_OptimizeMode_LITE_RUNTIME = = 3
}
FileOptions_OptimizeMode_SPEED = = 1,
FileOptions_OptimizeMode_CODE_SIZE = = 2,
FileOptions_OptimizeMode_LITE_RUNTIME = = 3
}
FileOptions_OptimizeMode_SPEED | |
FileOptions_OptimizeMode_CODE_SIZE | |
FileOptions_OptimizeMode_LITE_RUNTIME |
enum protobuf::FieldOptions_CType {
FieldOptions_CType_STRING = = 0,
FieldOptions_CType_CORD = = 1,
FieldOptions_CType_STRING_PIECE = = 2
}
FieldOptions_CType_STRING = = 0,
FieldOptions_CType_CORD = = 1,
FieldOptions_CType_STRING_PIECE = = 2
}
FieldOptions_CType_STRING | |
FieldOptions_CType_CORD | |
FieldOptions_CType_STRING_PIECE |
enum protobuf::FieldOptions_JSType {
FieldOptions_JSType_JS_NORMAL = = 0,
FieldOptions_JSType_JS_STRING = = 1,
FieldOptions_JSType_JS_NUMBER = = 2
}
FieldOptions_JSType_JS_NORMAL = = 0,
FieldOptions_JSType_JS_STRING = = 1,
FieldOptions_JSType_JS_NUMBER = = 2
}
FieldOptions_JSType_JS_NORMAL | |
FieldOptions_JSType_JS_STRING | |
FieldOptions_JSType_JS_NUMBER |
enum protobuf::MethodOptions_IdempotencyLevel {
MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN = = 0,
MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS = = 1,
MethodOptions_IdempotencyLevel_IDEMPOTENT = = 2
}
MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN = = 0,
MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS = = 1,
MethodOptions_IdempotencyLevel_IDEMPOTENT = = 2
}
MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN | |
MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS | |
MethodOptions_IdempotencyLevel_IDEMPOTENT |
class FileDescriptorSet: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| FileDescriptorSet() |
virtual | ~FileDescriptorSet() |
| FileDescriptorSet(const FileDescriptorSet & from) |
FileDescriptorSet & | operator=(const FileDescriptorSet & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(FileDescriptorSet * other) |
static const Descriptor * | descriptor() |
static const FileDescriptorSet & | default_instance() |
static const FileDescriptorSet * | internal_default_instance() |
implements Message | |
virtual FileDescriptorSet * | New() const Construct a new instance of the same type. more... |
virtual FileDescriptorSet * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const FileDescriptorSet & from) |
void | MergeFrom(const FileDescriptorSet & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kFileFieldNumber = = 1 |
int | file_size() const repeated .google.protobuf.FileDescriptorProto file = 1; |
void | clear_file() |
const FileDescriptorProto & | file(int index) const |
FileDescriptorProto * | mutable_file(int index) |
FileDescriptorProto * | add_file() |
RepeatedPtrField< FileDescriptorProto > * | mutable_file() |
const RepeatedPtrField< FileDescriptorProto > & | file() const |
virtual FileDescriptorSet *
FileDescriptorSet::New() const
FileDescriptorSet::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual FileDescriptorSet *
FileDescriptorSet::New(
Arena * arena) const
FileDescriptorSet::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void FileDescriptorSet::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void FileDescriptorSet::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void FileDescriptorSet::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t FileDescriptorSet::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool FileDescriptorSet::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void FileDescriptorSet::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * FileDescriptorSet::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int FileDescriptorSet::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata FileDescriptorSet::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class FileDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| FileDescriptorProto() |
virtual | ~FileDescriptorProto() |
| FileDescriptorProto(const FileDescriptorProto & from) |
FileDescriptorProto & | operator=(const FileDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(FileDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const FileDescriptorProto & | default_instance() |
static const FileDescriptorProto * | internal_default_instance() |
implements Message | |
virtual FileDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual FileDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const FileDescriptorProto & from) |
void | MergeFrom(const FileDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kPackageFieldNumber = = 2 |
const int | kDependencyFieldNumber = = 3 |
const int | kPublicDependencyFieldNumber = = 10 |
const int | kWeakDependencyFieldNumber = = 11 |
const int | kMessageTypeFieldNumber = = 4 |
const int | kEnumTypeFieldNumber = = 5 |
const int | kServiceFieldNumber = = 6 |
const int | kExtensionFieldNumber = = 7 |
const int | kOptionsFieldNumber = = 8 |
const int | kSourceCodeInfoFieldNumber = = 9 |
const int | kSyntaxFieldNumber = = 12 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
bool | has_package() const optional string package = 2; |
void | clear_package() |
const ::std::string & | package() const |
void | set_package(const ::std::string & value) |
void | set_package(const char * value) |
void | set_package(const char * value, size_t size) |
::std::string * | mutable_package() |
::std::string * | release_package() |
void | set_allocated_package(::std::string * package) |
int | dependency_size() const repeated string dependency = 3; |
void | clear_dependency() |
const ::std::string & | dependency(int index) const |
::std::string * | mutable_dependency(int index) |
void | set_dependency(int index, const ::std::string & value) |
void | set_dependency(int index, const char * value) |
void | set_dependency(int index, const char * value, size_t size) |
::std::string * | add_dependency() |
void | add_dependency(const ::std::string & value) |
void | add_dependency(const char * value) |
void | add_dependency(const char * value, size_t size) |
const RepeatedPtrField< ::std::string > & | dependency() const |
RepeatedPtrField< ::std::string > * | mutable_dependency() |
int | public_dependency_size() const repeated int32 public_dependency = 10; |
void | clear_public_dependency() |
int32 | public_dependency(int index) const |
void | set_public_dependency(int index, int32 value) |
void | add_public_dependency(int32 value) |
const RepeatedField< int32 > & | public_dependency() const |
RepeatedField< int32 > * | mutable_public_dependency() |
int | weak_dependency_size() const repeated int32 weak_dependency = 11; |
void | clear_weak_dependency() |
int32 | weak_dependency(int index) const |
void | set_weak_dependency(int index, int32 value) |
void | add_weak_dependency(int32 value) |
const RepeatedField< int32 > & | weak_dependency() const |
RepeatedField< int32 > * | mutable_weak_dependency() |
int | message_type_size() const repeated .google.protobuf.DescriptorProto message_type = 4; |
void | clear_message_type() |
const DescriptorProto & | message_type(int index) const |
DescriptorProto * | mutable_message_type(int index) |
DescriptorProto * | add_message_type() |
RepeatedPtrField< DescriptorProto > * | mutable_message_type() |
const RepeatedPtrField< DescriptorProto > & | message_type() const |
int | enum_type_size() const repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
void | clear_enum_type() |
const EnumDescriptorProto & | enum_type(int index) const |
EnumDescriptorProto * | mutable_enum_type(int index) |
EnumDescriptorProto * | add_enum_type() |
RepeatedPtrField< EnumDescriptorProto > * | mutable_enum_type() |
const RepeatedPtrField< EnumDescriptorProto > & | enum_type() const |
int | service_size() const repeated .google.protobuf.ServiceDescriptorProto service = 6; |
void | clear_service() |
const ServiceDescriptorProto & | service(int index) const |
ServiceDescriptorProto * | mutable_service(int index) |
ServiceDescriptorProto * | add_service() |
RepeatedPtrField< ServiceDescriptorProto > * | mutable_service() |
const RepeatedPtrField< ServiceDescriptorProto > & | service() const |
int | extension_size() const repeated .google.protobuf.FieldDescriptorProto extension = 7; |
void | clear_extension() |
const FieldDescriptorProto & | extension(int index) const |
FieldDescriptorProto * | mutable_extension(int index) |
FieldDescriptorProto * | add_extension() |
RepeatedPtrField< FieldDescriptorProto > * | mutable_extension() |
const RepeatedPtrField< FieldDescriptorProto > & | extension() const |
bool | has_options() const optional .google.protobuf.FileOptions options = 8; |
void | clear_options() |
const FileOptions & | options() const |
FileOptions * | mutable_options() |
FileOptions * | release_options() |
void | set_allocated_options(FileOptions * options) |
bool | has_source_code_info() const optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
void | clear_source_code_info() |
const SourceCodeInfo & | source_code_info() const |
SourceCodeInfo * | mutable_source_code_info() |
SourceCodeInfo * | release_source_code_info() |
void | set_allocated_source_code_info(SourceCodeInfo * source_code_info) |
bool | has_syntax() const optional string syntax = 12; |
void | clear_syntax() |
const ::std::string & | syntax() const |
void | set_syntax(const ::std::string & value) |
void | set_syntax(const char * value) |
void | set_syntax(const char * value, size_t size) |
::std::string * | mutable_syntax() |
::std::string * | release_syntax() |
void | set_allocated_syntax(::std::string * syntax) |
virtual FileDescriptorProto *
FileDescriptorProto::New() const
FileDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual FileDescriptorProto *
FileDescriptorProto::New(
Arena * arena) const
FileDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void FileDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void FileDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void FileDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t FileDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool FileDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void FileDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * FileDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int FileDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata FileDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class DescriptorProto_ExtensionRange: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| DescriptorProto_ExtensionRange() |
virtual | ~DescriptorProto_ExtensionRange() |
| DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange & from) |
DescriptorProto_ExtensionRange & | operator=(const DescriptorProto_ExtensionRange & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(DescriptorProto_ExtensionRange * other) |
static const Descriptor * | descriptor() |
static const DescriptorProto_ExtensionRange & | default_instance() |
static const DescriptorProto_ExtensionRange * | internal_default_instance() |
implements Message | |
virtual DescriptorProto_ExtensionRange * | New() const Construct a new instance of the same type. more... |
virtual DescriptorProto_ExtensionRange * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const DescriptorProto_ExtensionRange & from) |
void | MergeFrom(const DescriptorProto_ExtensionRange & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kStartFieldNumber = = 1 |
const int | kEndFieldNumber = = 2 |
bool | has_start() const optional int32 start = 1; |
void | clear_start() |
int32 | start() const |
void | set_start(int32 value) |
bool | has_end() const optional int32 end = 2; |
void | clear_end() |
int32 | end() const |
void | set_end(int32 value) |
virtual DescriptorProto_ExtensionRange *
DescriptorProto_ExtensionRange::New() const
DescriptorProto_ExtensionRange::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual DescriptorProto_ExtensionRange *
DescriptorProto_ExtensionRange::New(
Arena * arena) const
DescriptorProto_ExtensionRange::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void DescriptorProto_ExtensionRange::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void DescriptorProto_ExtensionRange::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void DescriptorProto_ExtensionRange::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t DescriptorProto_ExtensionRange::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * DescriptorProto_ExtensionRange::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int DescriptorProto_ExtensionRange::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata DescriptorProto_ExtensionRange::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class DescriptorProto_ReservedRange: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| DescriptorProto_ReservedRange() |
virtual | ~DescriptorProto_ReservedRange() |
| DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange & from) |
DescriptorProto_ReservedRange & | operator=(const DescriptorProto_ReservedRange & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(DescriptorProto_ReservedRange * other) |
static const Descriptor * | descriptor() |
static const DescriptorProto_ReservedRange & | default_instance() |
static const DescriptorProto_ReservedRange * | internal_default_instance() |
implements Message | |
virtual DescriptorProto_ReservedRange * | New() const Construct a new instance of the same type. more... |
virtual DescriptorProto_ReservedRange * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const DescriptorProto_ReservedRange & from) |
void | MergeFrom(const DescriptorProto_ReservedRange & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kStartFieldNumber = = 1 |
const int | kEndFieldNumber = = 2 |
bool | has_start() const optional int32 start = 1; |
void | clear_start() |
int32 | start() const |
void | set_start(int32 value) |
bool | has_end() const optional int32 end = 2; |
void | clear_end() |
int32 | end() const |
void | set_end(int32 value) |
virtual DescriptorProto_ReservedRange *
DescriptorProto_ReservedRange::New() const
DescriptorProto_ReservedRange::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual DescriptorProto_ReservedRange *
DescriptorProto_ReservedRange::New(
Arena * arena) const
DescriptorProto_ReservedRange::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void DescriptorProto_ReservedRange::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void DescriptorProto_ReservedRange::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void DescriptorProto_ReservedRange::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t DescriptorProto_ReservedRange::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool DescriptorProto_ReservedRange::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void DescriptorProto_ReservedRange::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * DescriptorProto_ReservedRange::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int DescriptorProto_ReservedRange::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata DescriptorProto_ReservedRange::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class DescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| DescriptorProto() |
virtual | ~DescriptorProto() |
| DescriptorProto(const DescriptorProto & from) |
DescriptorProto & | operator=(const DescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(DescriptorProto * other) |
static const Descriptor * | descriptor() |
static const DescriptorProto & | default_instance() |
static const DescriptorProto * | internal_default_instance() |
implements Message | |
virtual DescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual DescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const DescriptorProto & from) |
void | MergeFrom(const DescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | DescriptorProto_ExtensionRange ExtensionRange |
typedef | DescriptorProto_ReservedRange ReservedRange |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kFieldFieldNumber = = 2 |
const int | kExtensionFieldNumber = = 6 |
const int | kNestedTypeFieldNumber = = 3 |
const int | kEnumTypeFieldNumber = = 4 |
const int | kExtensionRangeFieldNumber = = 5 |
const int | kOneofDeclFieldNumber = = 8 |
const int | kOptionsFieldNumber = = 7 |
const int | kReservedRangeFieldNumber = = 9 |
const int | kReservedNameFieldNumber = = 10 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
int | field_size() const repeated .google.protobuf.FieldDescriptorProto field = 2; |
void | clear_field() |
const FieldDescriptorProto & | field(int index) const |
FieldDescriptorProto * | mutable_field(int index) |
FieldDescriptorProto * | add_field() |
RepeatedPtrField< FieldDescriptorProto > * | mutable_field() |
const RepeatedPtrField< FieldDescriptorProto > & | field() const |
int | extension_size() const repeated .google.protobuf.FieldDescriptorProto extension = 6; |
void | clear_extension() |
const FieldDescriptorProto & | extension(int index) const |
FieldDescriptorProto * | mutable_extension(int index) |
FieldDescriptorProto * | add_extension() |
RepeatedPtrField< FieldDescriptorProto > * | mutable_extension() |
const RepeatedPtrField< FieldDescriptorProto > & | extension() const |
int | nested_type_size() const repeated .google.protobuf.DescriptorProto nested_type = 3; |
void | clear_nested_type() |
const DescriptorProto & | nested_type(int index) const |
DescriptorProto * | mutable_nested_type(int index) |
DescriptorProto * | add_nested_type() |
RepeatedPtrField< DescriptorProto > * | mutable_nested_type() |
const RepeatedPtrField< DescriptorProto > & | nested_type() const |
int | enum_type_size() const repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
void | clear_enum_type() |
const EnumDescriptorProto & | enum_type(int index) const |
EnumDescriptorProto * | mutable_enum_type(int index) |
EnumDescriptorProto * | add_enum_type() |
RepeatedPtrField< EnumDescriptorProto > * | mutable_enum_type() |
const RepeatedPtrField< EnumDescriptorProto > & | enum_type() const |
int | extension_range_size() const repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
void | clear_extension_range() |
const DescriptorProto_ExtensionRange & | extension_range(int index) const |
DescriptorProto_ExtensionRange * | mutable_extension_range(int index) |
DescriptorProto_ExtensionRange * | add_extension_range() |
RepeatedPtrField< DescriptorProto_ExtensionRange > * | mutable_extension_range() |
const RepeatedPtrField< DescriptorProto_ExtensionRange > & | extension_range() const |
int | oneof_decl_size() const repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
void | clear_oneof_decl() |
const OneofDescriptorProto & | oneof_decl(int index) const |
OneofDescriptorProto * | mutable_oneof_decl(int index) |
OneofDescriptorProto * | add_oneof_decl() |
RepeatedPtrField< OneofDescriptorProto > * | mutable_oneof_decl() |
const RepeatedPtrField< OneofDescriptorProto > & | oneof_decl() const |
bool | has_options() const optional .google.protobuf.MessageOptions options = 7; |
void | clear_options() |
const MessageOptions & | options() const |
MessageOptions * | mutable_options() |
MessageOptions * | release_options() |
void | set_allocated_options(MessageOptions * options) |
int | reserved_range_size() const repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
void | clear_reserved_range() |
const DescriptorProto_ReservedRange & | reserved_range(int index) const |
DescriptorProto_ReservedRange * | mutable_reserved_range(int index) |
DescriptorProto_ReservedRange * | add_reserved_range() |
RepeatedPtrField< DescriptorProto_ReservedRange > * | mutable_reserved_range() |
const RepeatedPtrField< DescriptorProto_ReservedRange > & | reserved_range() const |
int | reserved_name_size() const repeated string reserved_name = 10; |
void | clear_reserved_name() |
const ::std::string & | reserved_name(int index) const |
::std::string * | mutable_reserved_name(int index) |
void | set_reserved_name(int index, const ::std::string & value) |
void | set_reserved_name(int index, const char * value) |
void | set_reserved_name(int index, const char * value, size_t size) |
::std::string * | add_reserved_name() |
void | add_reserved_name(const ::std::string & value) |
void | add_reserved_name(const char * value) |
void | add_reserved_name(const char * value, size_t size) |
const RepeatedPtrField< ::std::string > & | reserved_name() const |
RepeatedPtrField< ::std::string > * | mutable_reserved_name() |
virtual DescriptorProto *
DescriptorProto::New() const
DescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual DescriptorProto *
DescriptorProto::New(
Arena * arena) const
DescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void DescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void DescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void DescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t DescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool DescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void DescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * DescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int DescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata DescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class FieldDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| FieldDescriptorProto() |
virtual | ~FieldDescriptorProto() |
| FieldDescriptorProto(const FieldDescriptorProto & from) |
FieldDescriptorProto & | operator=(const FieldDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(FieldDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const FieldDescriptorProto & | default_instance() |
static const FieldDescriptorProto * | internal_default_instance() |
implements Message | |
virtual FieldDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual FieldDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const FieldDescriptorProto & from) |
void | MergeFrom(const FieldDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | FieldDescriptorProto_Type Type |
typedef | FieldDescriptorProto_Label Label |
const Type | TYPE_DOUBLE = =
FieldDescriptorProto_Type_TYPE_DOUBLE |
const Type | TYPE_FLOAT = =
FieldDescriptorProto_Type_TYPE_FLOAT |
const Type | TYPE_INT64 = =
FieldDescriptorProto_Type_TYPE_INT64 |
const Type | TYPE_UINT64 = =
FieldDescriptorProto_Type_TYPE_UINT64 |
const Type | TYPE_INT32 = =
FieldDescriptorProto_Type_TYPE_INT32 |
const Type | TYPE_FIXED64 = =
FieldDescriptorProto_Type_TYPE_FIXED64 |
const Type | TYPE_FIXED32 = =
FieldDescriptorProto_Type_TYPE_FIXED32 |
const Type | TYPE_BOOL = =
FieldDescriptorProto_Type_TYPE_BOOL |
const Type | TYPE_STRING = =
FieldDescriptorProto_Type_TYPE_STRING |
const Type | TYPE_GROUP = =
FieldDescriptorProto_Type_TYPE_GROUP |
const Type | TYPE_MESSAGE = =
FieldDescriptorProto_Type_TYPE_MESSAGE |
const Type | TYPE_BYTES = =
FieldDescriptorProto_Type_TYPE_BYTES |
const Type | TYPE_UINT32 = =
FieldDescriptorProto_Type_TYPE_UINT32 |
const Type | TYPE_ENUM = =
FieldDescriptorProto_Type_TYPE_ENUM |
const Type | TYPE_SFIXED32 = =
FieldDescriptorProto_Type_TYPE_SFIXED32 |
const Type | TYPE_SFIXED64 = =
FieldDescriptorProto_Type_TYPE_SFIXED64 |
const Type | TYPE_SINT32 = =
FieldDescriptorProto_Type_TYPE_SINT32 |
const Type | TYPE_SINT64 = =
FieldDescriptorProto_Type_TYPE_SINT64 |
const Type | Type_MIN = =
FieldDescriptorProto_Type_Type_MIN |
const Type | Type_MAX = =
FieldDescriptorProto_Type_Type_MAX |
const int | Type_ARRAYSIZE = =
FieldDescriptorProto_Type_Type_ARRAYSIZE |
const Label | LABEL_OPTIONAL = =
FieldDescriptorProto_Label_LABEL_OPTIONAL |
const Label | LABEL_REQUIRED = =
FieldDescriptorProto_Label_LABEL_REQUIRED |
const Label | LABEL_REPEATED = =
FieldDescriptorProto_Label_LABEL_REPEATED |
const Label | Label_MIN = =
FieldDescriptorProto_Label_Label_MIN |
const Label | Label_MAX = =
FieldDescriptorProto_Label_Label_MAX |
const int | Label_ARRAYSIZE = =
FieldDescriptorProto_Label_Label_ARRAYSIZE |
static bool | Type_IsValid(int value) |
static const EnumDescriptor * | Type_descriptor() |
static const ::std::string & | Type_Name(Type value) |
static bool | Type_Parse(const ::std::string & name, Type * value) |
static bool | Label_IsValid(int value) |
static const EnumDescriptor * | Label_descriptor() |
static const ::std::string & | Label_Name(Label value) |
static bool | Label_Parse(const ::std::string & name, Label * value) |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kNumberFieldNumber = = 3 |
const int | kLabelFieldNumber = = 4 |
const int | kTypeFieldNumber = = 5 |
const int | kTypeNameFieldNumber = = 6 |
const int | kExtendeeFieldNumber = = 2 |
const int | kDefaultValueFieldNumber = = 7 |
const int | kOneofIndexFieldNumber = = 9 |
const int | kJsonNameFieldNumber = = 10 |
const int | kOptionsFieldNumber = = 8 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
bool | has_number() const optional int32 number = 3; |
void | clear_number() |
int32 | number() const |
void | set_number(int32 value) |
bool | has_label() const optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
void | clear_label() |
FieldDescriptorProto_Label | label() const |
void | set_label(FieldDescriptorProto_Label value) |
bool | has_type() const optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
void | clear_type() |
FieldDescriptorProto_Type | type() const |
void | set_type(FieldDescriptorProto_Type value) |
bool | has_type_name() const optional string type_name = 6; |
void | clear_type_name() |
const ::std::string & | type_name() const |
void | set_type_name(const ::std::string & value) |
void | set_type_name(const char * value) |
void | set_type_name(const char * value, size_t size) |
::std::string * | mutable_type_name() |
::std::string * | release_type_name() |
void | set_allocated_type_name(::std::string * type_name) |
bool | has_extendee() const optional string extendee = 2; |
void | clear_extendee() |
const ::std::string & | extendee() const |
void | set_extendee(const ::std::string & value) |
void | set_extendee(const char * value) |
void | set_extendee(const char * value, size_t size) |
::std::string * | mutable_extendee() |
::std::string * | release_extendee() |
void | set_allocated_extendee(::std::string * extendee) |
bool | has_default_value() const optional string default_value = 7; |
void | clear_default_value() |
const ::std::string & | default_value() const |
void | set_default_value(const ::std::string & value) |
void | set_default_value(const char * value) |
void | set_default_value(const char * value, size_t size) |
::std::string * | mutable_default_value() |
::std::string * | release_default_value() |
void | set_allocated_default_value(::std::string * default_value) |
bool | has_oneof_index() const optional int32 oneof_index = 9; |
void | clear_oneof_index() |
int32 | oneof_index() const |
void | set_oneof_index(int32 value) |
bool | has_json_name() const optional string json_name = 10; |
void | clear_json_name() |
const ::std::string & | json_name() const |
void | set_json_name(const ::std::string & value) |
void | set_json_name(const char * value) |
void | set_json_name(const char * value, size_t size) |
::std::string * | mutable_json_name() |
::std::string * | release_json_name() |
void | set_allocated_json_name(::std::string * json_name) |
bool | has_options() const optional .google.protobuf.FieldOptions options = 8; |
void | clear_options() |
const FieldOptions & | options() const |
FieldOptions * | mutable_options() |
FieldOptions * | release_options() |
void | set_allocated_options(FieldOptions * options) |
virtual FieldDescriptorProto *
FieldDescriptorProto::New() const
FieldDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual FieldDescriptorProto *
FieldDescriptorProto::New(
Arena * arena) const
FieldDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void FieldDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void FieldDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void FieldDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t FieldDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool FieldDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void FieldDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * FieldDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int FieldDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata FieldDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class OneofDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| OneofDescriptorProto() |
virtual | ~OneofDescriptorProto() |
| OneofDescriptorProto(const OneofDescriptorProto & from) |
OneofDescriptorProto & | operator=(const OneofDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(OneofDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const OneofDescriptorProto & | default_instance() |
static const OneofDescriptorProto * | internal_default_instance() |
implements Message | |
virtual OneofDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual OneofDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const OneofDescriptorProto & from) |
void | MergeFrom(const OneofDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kOptionsFieldNumber = = 2 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
bool | has_options() const optional .google.protobuf.OneofOptions options = 2; |
void | clear_options() |
const OneofOptions & | options() const |
OneofOptions * | mutable_options() |
OneofOptions * | release_options() |
void | set_allocated_options(OneofOptions * options) |
virtual OneofDescriptorProto *
OneofDescriptorProto::New() const
OneofDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual OneofDescriptorProto *
OneofDescriptorProto::New(
Arena * arena) const
OneofDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void OneofDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void OneofDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void OneofDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t OneofDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool OneofDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void OneofDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * OneofDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int OneofDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata OneofDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class EnumDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| EnumDescriptorProto() |
virtual | ~EnumDescriptorProto() |
| EnumDescriptorProto(const EnumDescriptorProto & from) |
EnumDescriptorProto & | operator=(const EnumDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(EnumDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const EnumDescriptorProto & | default_instance() |
static const EnumDescriptorProto * | internal_default_instance() |
implements Message | |
virtual EnumDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual EnumDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const EnumDescriptorProto & from) |
void | MergeFrom(const EnumDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kValueFieldNumber = = 2 |
const int | kOptionsFieldNumber = = 3 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
int | value_size() const repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
void | clear_value() |
const EnumValueDescriptorProto & | value(int index) const |
EnumValueDescriptorProto * | mutable_value(int index) |
EnumValueDescriptorProto * | add_value() |
RepeatedPtrField< EnumValueDescriptorProto > * | mutable_value() |
const RepeatedPtrField< EnumValueDescriptorProto > & | value() const |
bool | has_options() const optional .google.protobuf.EnumOptions options = 3; |
void | clear_options() |
const EnumOptions & | options() const |
EnumOptions * | mutable_options() |
EnumOptions * | release_options() |
void | set_allocated_options(EnumOptions * options) |
virtual EnumDescriptorProto *
EnumDescriptorProto::New() const
EnumDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual EnumDescriptorProto *
EnumDescriptorProto::New(
Arena * arena) const
EnumDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void EnumDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void EnumDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void EnumDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t EnumDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool EnumDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void EnumDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * EnumDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int EnumDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata EnumDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class EnumValueDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| EnumValueDescriptorProto() |
virtual | ~EnumValueDescriptorProto() |
| EnumValueDescriptorProto(const EnumValueDescriptorProto & from) |
EnumValueDescriptorProto & | operator=(const EnumValueDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(EnumValueDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const EnumValueDescriptorProto & | default_instance() |
static const EnumValueDescriptorProto * | internal_default_instance() |
implements Message | |
virtual EnumValueDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual EnumValueDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const EnumValueDescriptorProto & from) |
void | MergeFrom(const EnumValueDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kNumberFieldNumber = = 2 |
const int | kOptionsFieldNumber = = 3 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
bool | has_number() const optional int32 number = 2; |
void | clear_number() |
int32 | number() const |
void | set_number(int32 value) |
bool | has_options() const optional .google.protobuf.EnumValueOptions options = 3; |
void | clear_options() |
const EnumValueOptions & | options() const |
EnumValueOptions * | mutable_options() |
EnumValueOptions * | release_options() |
void | set_allocated_options(EnumValueOptions * options) |
virtual EnumValueDescriptorProto *
EnumValueDescriptorProto::New() const
EnumValueDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual EnumValueDescriptorProto *
EnumValueDescriptorProto::New(
Arena * arena) const
EnumValueDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void EnumValueDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void EnumValueDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void EnumValueDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t EnumValueDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool EnumValueDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void EnumValueDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * EnumValueDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int EnumValueDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata EnumValueDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class ServiceDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| ServiceDescriptorProto() |
virtual | ~ServiceDescriptorProto() |
| ServiceDescriptorProto(const ServiceDescriptorProto & from) |
ServiceDescriptorProto & | operator=(const ServiceDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(ServiceDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const ServiceDescriptorProto & | default_instance() |
static const ServiceDescriptorProto * | internal_default_instance() |
implements Message | |
virtual ServiceDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual ServiceDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const ServiceDescriptorProto & from) |
void | MergeFrom(const ServiceDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kMethodFieldNumber = = 2 |
const int | kOptionsFieldNumber = = 3 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
int | method_size() const repeated .google.protobuf.MethodDescriptorProto method = 2; |
void | clear_method() |
const MethodDescriptorProto & | method(int index) const |
MethodDescriptorProto * | mutable_method(int index) |
MethodDescriptorProto * | add_method() |
RepeatedPtrField< MethodDescriptorProto > * | mutable_method() |
const RepeatedPtrField< MethodDescriptorProto > & | method() const |
bool | has_options() const optional .google.protobuf.ServiceOptions options = 3; |
void | clear_options() |
const ServiceOptions & | options() const |
ServiceOptions * | mutable_options() |
ServiceOptions * | release_options() |
void | set_allocated_options(ServiceOptions * options) |
virtual ServiceDescriptorProto *
ServiceDescriptorProto::New() const
ServiceDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual ServiceDescriptorProto *
ServiceDescriptorProto::New(
Arena * arena) const
ServiceDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void ServiceDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void ServiceDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void ServiceDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t ServiceDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool ServiceDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void ServiceDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * ServiceDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int ServiceDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata ServiceDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class MethodDescriptorProto: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| MethodDescriptorProto() |
virtual | ~MethodDescriptorProto() |
| MethodDescriptorProto(const MethodDescriptorProto & from) |
MethodDescriptorProto & | operator=(const MethodDescriptorProto & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(MethodDescriptorProto * other) |
static const Descriptor * | descriptor() |
static const MethodDescriptorProto & | default_instance() |
static const MethodDescriptorProto * | internal_default_instance() |
implements Message | |
virtual MethodDescriptorProto * | New() const Construct a new instance of the same type. more... |
virtual MethodDescriptorProto * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const MethodDescriptorProto & from) |
void | MergeFrom(const MethodDescriptorProto & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNameFieldNumber = = 1 |
const int | kInputTypeFieldNumber = = 2 |
const int | kOutputTypeFieldNumber = = 3 |
const int | kOptionsFieldNumber = = 4 |
const int | kClientStreamingFieldNumber = = 5 |
const int | kServerStreamingFieldNumber = = 6 |
bool | has_name() const optional string name = 1; |
void | clear_name() |
const ::std::string & | name() const |
void | set_name(const ::std::string & value) |
void | set_name(const char * value) |
void | set_name(const char * value, size_t size) |
::std::string * | mutable_name() |
::std::string * | release_name() |
void | set_allocated_name(::std::string * name) |
bool | has_input_type() const optional string input_type = 2; |
void | clear_input_type() |
const ::std::string & | input_type() const |
void | set_input_type(const ::std::string & value) |
void | set_input_type(const char * value) |
void | set_input_type(const char * value, size_t size) |
::std::string * | mutable_input_type() |
::std::string * | release_input_type() |
void | set_allocated_input_type(::std::string * input_type) |
bool | has_output_type() const optional string output_type = 3; |
void | clear_output_type() |
const ::std::string & | output_type() const |
void | set_output_type(const ::std::string & value) |
void | set_output_type(const char * value) |
void | set_output_type(const char * value, size_t size) |
::std::string * | mutable_output_type() |
::std::string * | release_output_type() |
void | set_allocated_output_type(::std::string * output_type) |
bool | has_options() const optional .google.protobuf.MethodOptions options = 4; |
void | clear_options() |
const MethodOptions & | options() const |
MethodOptions * | mutable_options() |
MethodOptions * | release_options() |
void | set_allocated_options(MethodOptions * options) |
bool | has_client_streaming() const optional bool client_streaming = 5 [[]default = false]; |
void | clear_client_streaming() |
bool | client_streaming() const |
void | set_client_streaming(bool value) |
bool | has_server_streaming() const optional bool server_streaming = 6 [[]default = false]; |
void | clear_server_streaming() |
bool | server_streaming() const |
void | set_server_streaming(bool value) |
virtual MethodDescriptorProto *
MethodDescriptorProto::New() const
MethodDescriptorProto::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual MethodDescriptorProto *
MethodDescriptorProto::New(
Arena * arena) const
MethodDescriptorProto::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void MethodDescriptorProto::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void MethodDescriptorProto::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void MethodDescriptorProto::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t MethodDescriptorProto::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool MethodDescriptorProto::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void MethodDescriptorProto::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * MethodDescriptorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int MethodDescriptorProto::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata MethodDescriptorProto::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class FileOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| FileOptions() |
virtual | ~FileOptions() |
| FileOptions(const FileOptions & from) |
FileOptions & | operator=(const FileOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(FileOptions * other) |
static const Descriptor * | descriptor() |
static const FileOptions & | default_instance() |
static const FileOptions * | internal_default_instance() |
implements Message | |
virtual FileOptions * | New() const Construct a new instance of the same type. more... |
virtual FileOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const FileOptions & from) |
void | MergeFrom(const FileOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | FileOptions_OptimizeMode OptimizeMode |
const OptimizeMode | SPEED = =
FileOptions_OptimizeMode_SPEED |
const OptimizeMode | CODE_SIZE = =
FileOptions_OptimizeMode_CODE_SIZE |
const OptimizeMode | LITE_RUNTIME = =
FileOptions_OptimizeMode_LITE_RUNTIME |
const OptimizeMode | OptimizeMode_MIN = =
FileOptions_OptimizeMode_OptimizeMode_MIN |
const OptimizeMode | OptimizeMode_MAX = =
FileOptions_OptimizeMode_OptimizeMode_MAX |
const int | OptimizeMode_ARRAYSIZE = =
FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE |
static bool | OptimizeMode_IsValid(int value) |
static const EnumDescriptor * | OptimizeMode_descriptor() |
static const ::std::string & | OptimizeMode_Name(OptimizeMode value) |
static bool | OptimizeMode_Parse(const ::std::string & name, OptimizeMode * value) |
accessors | |
const int | kJavaPackageFieldNumber = = 1 |
const int | kJavaOuterClassnameFieldNumber = = 8 |
const int | kJavaMultipleFilesFieldNumber = = 10 |
GOOGLE_PROTOBUF_DEPRECATED_ATTR const int | kJavaGenerateEqualsAndHashFieldNumber = = 20 |
const int | kJavaStringCheckUtf8FieldNumber = = 27 |
const int | kOptimizeForFieldNumber = = 9 |
const int | kGoPackageFieldNumber = = 11 |
const int | kCcGenericServicesFieldNumber = = 16 |
const int | kJavaGenericServicesFieldNumber = = 17 |
const int | kPyGenericServicesFieldNumber = = 18 |
const int | kDeprecatedFieldNumber = = 23 |
const int | kCcEnableArenasFieldNumber = = 31 |
const int | kObjcClassPrefixFieldNumber = = 36 |
const int | kCsharpNamespaceFieldNumber = = 37 |
const int | kSwiftPrefixFieldNumber = = 39 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_java_package() const optional string java_package = 1; |
void | clear_java_package() |
const ::std::string & | java_package() const |
void | set_java_package(const ::std::string & value) |
void | set_java_package(const char * value) |
void | set_java_package(const char * value, size_t size) |
::std::string * | mutable_java_package() |
::std::string * | release_java_package() |
void | set_allocated_java_package(::std::string * java_package) |
bool | has_java_outer_classname() const optional string java_outer_classname = 8; |
void | clear_java_outer_classname() |
const ::std::string & | java_outer_classname() const |
void | set_java_outer_classname(const ::std::string & value) |
void | set_java_outer_classname(const char * value) |
void | set_java_outer_classname(const char * value, size_t size) |
::std::string * | mutable_java_outer_classname() |
::std::string * | release_java_outer_classname() |
void | set_allocated_java_outer_classname(::std::string * java_outer_classname) |
bool | has_java_multiple_files() const optional bool java_multiple_files = 10 [[]default = false]; |
void | clear_java_multiple_files() |
bool | java_multiple_files() const |
void | set_java_multiple_files(bool value) |
GOOGLE_PROTOBUF_DEPRECATED_ATTR bool | has_java_generate_equals_and_hash() const optional bool java_generate_equals_and_hash = 20 [[]deprecated = true]; |
GOOGLE_PROTOBUF_DEPRECATED_ATTR void | clear_java_generate_equals_and_hash() |
GOOGLE_PROTOBUF_DEPRECATED_ATTR bool | java_generate_equals_and_hash() const |
GOOGLE_PROTOBUF_DEPRECATED_ATTR void | set_java_generate_equals_and_hash(bool value) |
bool | has_java_string_check_utf8() const optional bool java_string_check_utf8 = 27 [[]default = false]; |
void | clear_java_string_check_utf8() |
bool | java_string_check_utf8() const |
void | set_java_string_check_utf8(bool value) |
bool | has_optimize_for() const optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [[]default = SPEED]; |
void | clear_optimize_for() |
FileOptions_OptimizeMode | optimize_for() const |
void | set_optimize_for(FileOptions_OptimizeMode value) |
bool | has_go_package() const optional string go_package = 11; |
void | clear_go_package() |
const ::std::string & | go_package() const |
void | set_go_package(const ::std::string & value) |
void | set_go_package(const char * value) |
void | set_go_package(const char * value, size_t size) |
::std::string * | mutable_go_package() |
::std::string * | release_go_package() |
void | set_allocated_go_package(::std::string * go_package) |
bool | has_cc_generic_services() const optional bool cc_generic_services = 16 [[]default = false]; |
void | clear_cc_generic_services() |
bool | cc_generic_services() const |
void | set_cc_generic_services(bool value) |
bool | has_java_generic_services() const optional bool java_generic_services = 17 [[]default = false]; |
void | clear_java_generic_services() |
bool | java_generic_services() const |
void | set_java_generic_services(bool value) |
bool | has_py_generic_services() const optional bool py_generic_services = 18 [[]default = false]; |
void | clear_py_generic_services() |
bool | py_generic_services() const |
void | set_py_generic_services(bool value) |
bool | has_deprecated() const optional bool deprecated = 23 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
bool | has_cc_enable_arenas() const optional bool cc_enable_arenas = 31 [[]default = false]; |
void | clear_cc_enable_arenas() |
bool | cc_enable_arenas() const |
void | set_cc_enable_arenas(bool value) |
bool | has_objc_class_prefix() const optional string objc_class_prefix = 36; |
void | clear_objc_class_prefix() |
const ::std::string & | objc_class_prefix() const |
void | set_objc_class_prefix(const ::std::string & value) |
void | set_objc_class_prefix(const char * value) |
void | set_objc_class_prefix(const char * value, size_t size) |
::std::string * | mutable_objc_class_prefix() |
::std::string * | release_objc_class_prefix() |
void | set_allocated_objc_class_prefix(::std::string * objc_class_prefix) |
bool | has_csharp_namespace() const optional string csharp_namespace = 37; |
void | clear_csharp_namespace() |
const ::std::string & | csharp_namespace() const |
void | set_csharp_namespace(const ::std::string & value) |
void | set_csharp_namespace(const char * value) |
void | set_csharp_namespace(const char * value, size_t size) |
::std::string * | mutable_csharp_namespace() |
::std::string * | release_csharp_namespace() |
void | set_allocated_csharp_namespace(::std::string * csharp_namespace) |
bool | has_swift_prefix() const optional string swift_prefix = 39; |
void | clear_swift_prefix() |
const ::std::string & | swift_prefix() const |
void | set_swift_prefix(const ::std::string & value) |
void | set_swift_prefix(const char * value) |
void | set_swift_prefix(const char * value, size_t size) |
::std::string * | mutable_swift_prefix() |
::std::string * | release_swift_prefix() |
void | set_allocated_swift_prefix(::std::string * swift_prefix) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual FileOptions * FileOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual FileOptions * FileOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void FileOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void FileOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void FileOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t FileOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool FileOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void FileOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * FileOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int FileOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata FileOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class MessageOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| MessageOptions() |
virtual | ~MessageOptions() |
| MessageOptions(const MessageOptions & from) |
MessageOptions & | operator=(const MessageOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(MessageOptions * other) |
static const Descriptor * | descriptor() |
static const MessageOptions & | default_instance() |
static const MessageOptions * | internal_default_instance() |
implements Message | |
virtual MessageOptions * | New() const Construct a new instance of the same type. more... |
virtual MessageOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const MessageOptions & from) |
void | MergeFrom(const MessageOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kMessageSetWireFormatFieldNumber = = 1 |
const int | kNoStandardDescriptorAccessorFieldNumber = = 2 |
const int | kDeprecatedFieldNumber = = 3 |
const int | kMapEntryFieldNumber = = 7 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_message_set_wire_format() const optional bool message_set_wire_format = 1 [[]default = false]; |
void | clear_message_set_wire_format() |
bool | message_set_wire_format() const |
void | set_message_set_wire_format(bool value) |
bool | has_no_standard_descriptor_accessor() const optional bool no_standard_descriptor_accessor = 2 [[]default = false]; |
void | clear_no_standard_descriptor_accessor() |
bool | no_standard_descriptor_accessor() const |
void | set_no_standard_descriptor_accessor(bool value) |
bool | has_deprecated() const optional bool deprecated = 3 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
bool | has_map_entry() const optional bool map_entry = 7; |
void | clear_map_entry() |
bool | map_entry() const |
void | set_map_entry(bool value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual MessageOptions * MessageOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual MessageOptions * MessageOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void MessageOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void MessageOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void MessageOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t MessageOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool MessageOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void MessageOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * MessageOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int MessageOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata MessageOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class FieldOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| FieldOptions() |
virtual | ~FieldOptions() |
| FieldOptions(const FieldOptions & from) |
FieldOptions & | operator=(const FieldOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(FieldOptions * other) |
static const Descriptor * | descriptor() |
static const FieldOptions & | default_instance() |
static const FieldOptions * | internal_default_instance() |
implements Message | |
virtual FieldOptions * | New() const Construct a new instance of the same type. more... |
virtual FieldOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const FieldOptions & from) |
void | MergeFrom(const FieldOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | FieldOptions_CType CType |
typedef | FieldOptions_JSType JSType |
const CType | STRING = =
FieldOptions_CType_STRING |
const CType | CORD = =
FieldOptions_CType_CORD |
const CType | STRING_PIECE = =
FieldOptions_CType_STRING_PIECE |
const CType | CType_MIN = =
FieldOptions_CType_CType_MIN |
const CType | CType_MAX = =
FieldOptions_CType_CType_MAX |
const int | CType_ARRAYSIZE = =
FieldOptions_CType_CType_ARRAYSIZE |
const JSType | JS_NORMAL = =
FieldOptions_JSType_JS_NORMAL |
const JSType | JS_STRING = =
FieldOptions_JSType_JS_STRING |
const JSType | JS_NUMBER = =
FieldOptions_JSType_JS_NUMBER |
const JSType | JSType_MIN = =
FieldOptions_JSType_JSType_MIN |
const JSType | JSType_MAX = =
FieldOptions_JSType_JSType_MAX |
const int | JSType_ARRAYSIZE = =
FieldOptions_JSType_JSType_ARRAYSIZE |
static bool | CType_IsValid(int value) |
static const EnumDescriptor * | CType_descriptor() |
static const ::std::string & | CType_Name(CType value) |
static bool | CType_Parse(const ::std::string & name, CType * value) |
static bool | JSType_IsValid(int value) |
static const EnumDescriptor * | JSType_descriptor() |
static const ::std::string & | JSType_Name(JSType value) |
static bool | JSType_Parse(const ::std::string & name, JSType * value) |
accessors | |
const int | kCtypeFieldNumber = = 1 |
const int | kPackedFieldNumber = = 2 |
const int | kJstypeFieldNumber = = 6 |
const int | kLazyFieldNumber = = 5 |
const int | kDeprecatedFieldNumber = = 3 |
const int | kWeakFieldNumber = = 10 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_ctype() const optional .google.protobuf.FieldOptions.CType ctype = 1 [[]default = STRING]; |
void | clear_ctype() |
FieldOptions_CType | ctype() const |
void | set_ctype(FieldOptions_CType value) |
bool | has_packed() const optional bool packed = 2; |
void | clear_packed() |
bool | packed() const |
void | set_packed(bool value) |
bool | has_jstype() const optional .google.protobuf.FieldOptions.JSType jstype = 6 [[]default = JS_NORMAL]; |
void | clear_jstype() |
FieldOptions_JSType | jstype() const |
void | set_jstype(FieldOptions_JSType value) |
bool | has_lazy() const optional bool lazy = 5 [[]default = false]; |
void | clear_lazy() |
bool | lazy() const |
void | set_lazy(bool value) |
bool | has_deprecated() const optional bool deprecated = 3 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
bool | has_weak() const optional bool weak = 10 [[]default = false]; |
void | clear_weak() |
bool | weak() const |
void | set_weak(bool value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual FieldOptions * FieldOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual FieldOptions * FieldOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void FieldOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void FieldOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void FieldOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t FieldOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool FieldOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void FieldOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * FieldOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int FieldOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata FieldOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class OneofOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| OneofOptions() |
virtual | ~OneofOptions() |
| OneofOptions(const OneofOptions & from) |
OneofOptions & | operator=(const OneofOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(OneofOptions * other) |
static const Descriptor * | descriptor() |
static const OneofOptions & | default_instance() |
static const OneofOptions * | internal_default_instance() |
implements Message | |
virtual OneofOptions * | New() const Construct a new instance of the same type. more... |
virtual OneofOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const OneofOptions & from) |
void | MergeFrom(const OneofOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kUninterpretedOptionFieldNumber = = 999 |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual OneofOptions * OneofOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual OneofOptions * OneofOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void OneofOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void OneofOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void OneofOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t OneofOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool OneofOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void OneofOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * OneofOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int OneofOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata OneofOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class EnumOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| EnumOptions() |
virtual | ~EnumOptions() |
| EnumOptions(const EnumOptions & from) |
EnumOptions & | operator=(const EnumOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(EnumOptions * other) |
static const Descriptor * | descriptor() |
static const EnumOptions & | default_instance() |
static const EnumOptions * | internal_default_instance() |
implements Message | |
virtual EnumOptions * | New() const Construct a new instance of the same type. more... |
virtual EnumOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const EnumOptions & from) |
void | MergeFrom(const EnumOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kAllowAliasFieldNumber = = 2 |
const int | kDeprecatedFieldNumber = = 3 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_allow_alias() const optional bool allow_alias = 2; |
void | clear_allow_alias() |
bool | allow_alias() const |
void | set_allow_alias(bool value) |
bool | has_deprecated() const optional bool deprecated = 3 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual EnumOptions * EnumOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual EnumOptions * EnumOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void EnumOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void EnumOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void EnumOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t EnumOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool EnumOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void EnumOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * EnumOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int EnumOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata EnumOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class EnumValueOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| EnumValueOptions() |
virtual | ~EnumValueOptions() |
| EnumValueOptions(const EnumValueOptions & from) |
EnumValueOptions & | operator=(const EnumValueOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(EnumValueOptions * other) |
static const Descriptor * | descriptor() |
static const EnumValueOptions & | default_instance() |
static const EnumValueOptions * | internal_default_instance() |
implements Message | |
virtual EnumValueOptions * | New() const Construct a new instance of the same type. more... |
virtual EnumValueOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const EnumValueOptions & from) |
void | MergeFrom(const EnumValueOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kDeprecatedFieldNumber = = 1 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_deprecated() const optional bool deprecated = 1 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual EnumValueOptions *
EnumValueOptions::New() const
EnumValueOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual EnumValueOptions *
EnumValueOptions::New(
Arena * arena) const
EnumValueOptions::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void EnumValueOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void EnumValueOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void EnumValueOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t EnumValueOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool EnumValueOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void EnumValueOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * EnumValueOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int EnumValueOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata EnumValueOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class ServiceOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| ServiceOptions() |
virtual | ~ServiceOptions() |
| ServiceOptions(const ServiceOptions & from) |
ServiceOptions & | operator=(const ServiceOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(ServiceOptions * other) |
static const Descriptor * | descriptor() |
static const ServiceOptions & | default_instance() |
static const ServiceOptions * | internal_default_instance() |
implements Message | |
virtual ServiceOptions * | New() const Construct a new instance of the same type. more... |
virtual ServiceOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const ServiceOptions & from) |
void | MergeFrom(const ServiceOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kDeprecatedFieldNumber = = 33 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_deprecated() const optional bool deprecated = 33 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual ServiceOptions * ServiceOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual ServiceOptions * ServiceOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void ServiceOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void ServiceOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void ServiceOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t ServiceOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool ServiceOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void ServiceOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * ServiceOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int ServiceOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata ServiceOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class MethodOptions: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| MethodOptions() |
virtual | ~MethodOptions() |
| MethodOptions(const MethodOptions & from) |
MethodOptions & | operator=(const MethodOptions & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(MethodOptions * other) |
static const Descriptor * | descriptor() |
static const MethodOptions & | default_instance() |
static const MethodOptions * | internal_default_instance() |
implements Message | |
virtual MethodOptions * | New() const Construct a new instance of the same type. more... |
virtual MethodOptions * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const MethodOptions & from) |
void | MergeFrom(const MethodOptions & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | MethodOptions_IdempotencyLevel IdempotencyLevel |
const IdempotencyLevel | IDEMPOTENCY_UNKNOWN = =
MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN |
const IdempotencyLevel | NO_SIDE_EFFECTS = =
MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS |
const IdempotencyLevel | IDEMPOTENT = =
MethodOptions_IdempotencyLevel_IDEMPOTENT |
const IdempotencyLevel | IdempotencyLevel_MIN = =
MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN |
const IdempotencyLevel | IdempotencyLevel_MAX = =
MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX |
const int | IdempotencyLevel_ARRAYSIZE = =
MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE |
static bool | IdempotencyLevel_IsValid(int value) |
static const EnumDescriptor * | IdempotencyLevel_descriptor() |
static const ::std::string & | IdempotencyLevel_Name(IdempotencyLevel value) |
static bool | IdempotencyLevel_Parse(const ::std::string & name, IdempotencyLevel * value) |
accessors | |
const int | kDeprecatedFieldNumber = = 33 |
const int | kIdempotencyLevelFieldNumber = = 34 |
const int | kUninterpretedOptionFieldNumber = = 999 |
bool | has_deprecated() const optional bool deprecated = 33 [[]default = false]; |
void | clear_deprecated() |
bool | deprecated() const |
void | set_deprecated(bool value) |
bool | has_idempotency_level() const optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [[]default = IDEMPOTENCY_UNKNOWN]; |
void | clear_idempotency_level() |
MethodOptions_IdempotencyLevel | idempotency_level() const |
void | set_idempotency_level(MethodOptions_IdempotencyLevel value) |
int | uninterpreted_option_size() const repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
void | clear_uninterpreted_option() |
const UninterpretedOption & | uninterpreted_option(int index) const |
UninterpretedOption * | mutable_uninterpreted_option(int index) |
UninterpretedOption * | add_uninterpreted_option() |
RepeatedPtrField< UninterpretedOption > * | mutable_uninterpreted_option() |
const RepeatedPtrField< UninterpretedOption > & | uninterpreted_option() const |
virtual MethodOptions * MethodOptions::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual MethodOptions * MethodOptions::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void MethodOptions::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void MethodOptions::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void MethodOptions::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t MethodOptions::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool MethodOptions::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void MethodOptions::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * MethodOptions::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int MethodOptions::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata MethodOptions::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class UninterpretedOption_NamePart: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| UninterpretedOption_NamePart() |
virtual | ~UninterpretedOption_NamePart() |
| UninterpretedOption_NamePart(const UninterpretedOption_NamePart & from) |
UninterpretedOption_NamePart & | operator=(const UninterpretedOption_NamePart & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(UninterpretedOption_NamePart * other) |
static const Descriptor * | descriptor() |
static const UninterpretedOption_NamePart & | default_instance() |
static const UninterpretedOption_NamePart * | internal_default_instance() |
implements Message | |
virtual UninterpretedOption_NamePart * | New() const Construct a new instance of the same type. more... |
virtual UninterpretedOption_NamePart * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const UninterpretedOption_NamePart & from) |
void | MergeFrom(const UninterpretedOption_NamePart & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kNamePartFieldNumber = = 1 |
const int | kIsExtensionFieldNumber = = 2 |
bool | has_name_part() const required string name_part = 1; |
void | clear_name_part() |
const ::std::string & | name_part() const |
void | set_name_part(const ::std::string & value) |
void | set_name_part(const char * value) |
void | set_name_part(const char * value, size_t size) |
::std::string * | mutable_name_part() |
::std::string * | release_name_part() |
void | set_allocated_name_part(::std::string * name_part) |
bool | has_is_extension() const required bool is_extension = 2; |
void | clear_is_extension() |
bool | is_extension() const |
void | set_is_extension(bool value) |
virtual UninterpretedOption_NamePart *
UninterpretedOption_NamePart::New() const
UninterpretedOption_NamePart::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual UninterpretedOption_NamePart *
UninterpretedOption_NamePart::New(
Arena * arena) const
UninterpretedOption_NamePart::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void UninterpretedOption_NamePart::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void UninterpretedOption_NamePart::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void UninterpretedOption_NamePart::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t UninterpretedOption_NamePart::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void UninterpretedOption_NamePart::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * UninterpretedOption_NamePart::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int UninterpretedOption_NamePart::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata UninterpretedOption_NamePart::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class UninterpretedOption: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| UninterpretedOption() |
virtual | ~UninterpretedOption() |
| UninterpretedOption(const UninterpretedOption & from) |
UninterpretedOption & | operator=(const UninterpretedOption & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(UninterpretedOption * other) |
static const Descriptor * | descriptor() |
static const UninterpretedOption & | default_instance() |
static const UninterpretedOption * | internal_default_instance() |
implements Message | |
virtual UninterpretedOption * | New() const Construct a new instance of the same type. more... |
virtual UninterpretedOption * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const UninterpretedOption & from) |
void | MergeFrom(const UninterpretedOption & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | UninterpretedOption_NamePart NamePart |
accessors | |
const int | kNameFieldNumber = = 2 |
const int | kIdentifierValueFieldNumber = = 3 |
const int | kPositiveIntValueFieldNumber = = 4 |
const int | kNegativeIntValueFieldNumber = = 5 |
const int | kDoubleValueFieldNumber = = 6 |
const int | kStringValueFieldNumber = = 7 |
const int | kAggregateValueFieldNumber = = 8 |
int | name_size() const repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
void | clear_name() |
const UninterpretedOption_NamePart & | name(int index) const |
UninterpretedOption_NamePart * | mutable_name(int index) |
UninterpretedOption_NamePart * | add_name() |
RepeatedPtrField< UninterpretedOption_NamePart > * | mutable_name() |
const RepeatedPtrField< UninterpretedOption_NamePart > & | name() const |
bool | has_identifier_value() const optional string identifier_value = 3; |
void | clear_identifier_value() |
const ::std::string & | identifier_value() const |
void | set_identifier_value(const ::std::string & value) |
void | set_identifier_value(const char * value) |
void | set_identifier_value(const char * value, size_t size) |
::std::string * | mutable_identifier_value() |
::std::string * | release_identifier_value() |
void | set_allocated_identifier_value(::std::string * identifier_value) |
bool | has_positive_int_value() const optional uint64 positive_int_value = 4; |
void | clear_positive_int_value() |
uint64 | positive_int_value() const |
void | set_positive_int_value(uint64 value) |
bool | has_negative_int_value() const optional int64 negative_int_value = 5; |
void | clear_negative_int_value() |
int64 | negative_int_value() const |
void | set_negative_int_value(int64 value) |
bool | has_double_value() const optional double double_value = 6; |
void | clear_double_value() |
double | double_value() const |
void | set_double_value(double value) |
bool | has_string_value() const optional bytes string_value = 7; |
void | clear_string_value() |
const ::std::string & | string_value() const |
void | set_string_value(const ::std::string & value) |
void | set_string_value(const char * value) |
void | set_string_value(const void * value, size_t size) |
::std::string * | mutable_string_value() |
::std::string * | release_string_value() |
void | set_allocated_string_value(::std::string * string_value) |
bool | has_aggregate_value() const optional string aggregate_value = 8; |
void | clear_aggregate_value() |
const ::std::string & | aggregate_value() const |
void | set_aggregate_value(const ::std::string & value) |
void | set_aggregate_value(const char * value) |
void | set_aggregate_value(const char * value, size_t size) |
::std::string * | mutable_aggregate_value() |
::std::string * | release_aggregate_value() |
void | set_allocated_aggregate_value(::std::string * aggregate_value) |
virtual UninterpretedOption *
UninterpretedOption::New() const
UninterpretedOption::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual UninterpretedOption *
UninterpretedOption::New(
Arena * arena) const
UninterpretedOption::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void UninterpretedOption::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void UninterpretedOption::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void UninterpretedOption::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t UninterpretedOption::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool UninterpretedOption::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void UninterpretedOption::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * UninterpretedOption::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int UninterpretedOption::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata UninterpretedOption::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class SourceCodeInfo_Location: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| SourceCodeInfo_Location() |
virtual | ~SourceCodeInfo_Location() |
| SourceCodeInfo_Location(const SourceCodeInfo_Location & from) |
SourceCodeInfo_Location & | operator=(const SourceCodeInfo_Location & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(SourceCodeInfo_Location * other) |
static const Descriptor * | descriptor() |
static const SourceCodeInfo_Location & | default_instance() |
static const SourceCodeInfo_Location * | internal_default_instance() |
implements Message | |
virtual SourceCodeInfo_Location * | New() const Construct a new instance of the same type. more... |
virtual SourceCodeInfo_Location * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const SourceCodeInfo_Location & from) |
void | MergeFrom(const SourceCodeInfo_Location & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kPathFieldNumber = = 1 |
const int | kSpanFieldNumber = = 2 |
const int | kLeadingCommentsFieldNumber = = 3 |
const int | kTrailingCommentsFieldNumber = = 4 |
const int | kLeadingDetachedCommentsFieldNumber = = 6 |
int | path_size() const repeated int32 path = 1 [[]packed = true]; |
void | clear_path() |
int32 | path(int index) const |
void | set_path(int index, int32 value) |
void | add_path(int32 value) |
const RepeatedField< int32 > & | path() const |
RepeatedField< int32 > * | mutable_path() |
int | span_size() const repeated int32 span = 2 [[]packed = true]; |
void | clear_span() |
int32 | span(int index) const |
void | set_span(int index, int32 value) |
void | add_span(int32 value) |
const RepeatedField< int32 > & | span() const |
RepeatedField< int32 > * | mutable_span() |
bool | has_leading_comments() const optional string leading_comments = 3; |
void | clear_leading_comments() |
const ::std::string & | leading_comments() const |
void | set_leading_comments(const ::std::string & value) |
void | set_leading_comments(const char * value) |
void | set_leading_comments(const char * value, size_t size) |
::std::string * | mutable_leading_comments() |
::std::string * | release_leading_comments() |
void | set_allocated_leading_comments(::std::string * leading_comments) |
bool | has_trailing_comments() const optional string trailing_comments = 4; |
void | clear_trailing_comments() |
const ::std::string & | trailing_comments() const |
void | set_trailing_comments(const ::std::string & value) |
void | set_trailing_comments(const char * value) |
void | set_trailing_comments(const char * value, size_t size) |
::std::string * | mutable_trailing_comments() |
::std::string * | release_trailing_comments() |
void | set_allocated_trailing_comments(::std::string * trailing_comments) |
int | leading_detached_comments_size() const repeated string leading_detached_comments = 6; |
void | clear_leading_detached_comments() |
const ::std::string & | leading_detached_comments(int index) const |
::std::string * | mutable_leading_detached_comments(int index) |
void | set_leading_detached_comments(int index, const ::std::string & value) |
void | set_leading_detached_comments(int index, const char * value) |
void | set_leading_detached_comments(int index, const char * value, size_t size) |
::std::string * | add_leading_detached_comments() |
void | add_leading_detached_comments(const ::std::string & value) |
void | add_leading_detached_comments(const char * value) |
void | add_leading_detached_comments(const char * value, size_t size) |
const RepeatedPtrField< ::std::string > & | leading_detached_comments() const |
RepeatedPtrField< ::std::string > * | mutable_leading_detached_comments() |
virtual SourceCodeInfo_Location *
SourceCodeInfo_Location::New() const
SourceCodeInfo_Location::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual SourceCodeInfo_Location *
SourceCodeInfo_Location::New(
Arena * arena) const
SourceCodeInfo_Location::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void SourceCodeInfo_Location::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void SourceCodeInfo_Location::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void SourceCodeInfo_Location::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t SourceCodeInfo_Location::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool SourceCodeInfo_Location::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void SourceCodeInfo_Location::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * SourceCodeInfo_Location::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int SourceCodeInfo_Location::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata SourceCodeInfo_Location::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class SourceCodeInfo: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| SourceCodeInfo() |
virtual | ~SourceCodeInfo() |
| SourceCodeInfo(const SourceCodeInfo & from) |
SourceCodeInfo & | operator=(const SourceCodeInfo & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(SourceCodeInfo * other) |
static const Descriptor * | descriptor() |
static const SourceCodeInfo & | default_instance() |
static const SourceCodeInfo * | internal_default_instance() |
implements Message | |
virtual SourceCodeInfo * | New() const Construct a new instance of the same type. more... |
virtual SourceCodeInfo * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const SourceCodeInfo & from) |
void | MergeFrom(const SourceCodeInfo & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | SourceCodeInfo_Location Location |
accessors | |
const int | kLocationFieldNumber = = 1 |
int | location_size() const repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
void | clear_location() |
const SourceCodeInfo_Location & | location(int index) const |
SourceCodeInfo_Location * | mutable_location(int index) |
SourceCodeInfo_Location * | add_location() |
RepeatedPtrField< SourceCodeInfo_Location > * | mutable_location() |
const RepeatedPtrField< SourceCodeInfo_Location > & | location() const |
virtual SourceCodeInfo * SourceCodeInfo::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual SourceCodeInfo * SourceCodeInfo::New(
Arena * arena) const
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void SourceCodeInfo::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void SourceCodeInfo::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void SourceCodeInfo::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t SourceCodeInfo::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool SourceCodeInfo::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void SourceCodeInfo::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * SourceCodeInfo::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int SourceCodeInfo::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata SourceCodeInfo::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class GeneratedCodeInfo_Annotation: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| GeneratedCodeInfo_Annotation() |
virtual | ~GeneratedCodeInfo_Annotation() |
| GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation & from) |
GeneratedCodeInfo_Annotation & | operator=(const GeneratedCodeInfo_Annotation & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(GeneratedCodeInfo_Annotation * other) |
static const Descriptor * | descriptor() |
static const GeneratedCodeInfo_Annotation & | default_instance() |
static const GeneratedCodeInfo_Annotation * | internal_default_instance() |
implements Message | |
virtual GeneratedCodeInfo_Annotation * | New() const Construct a new instance of the same type. more... |
virtual GeneratedCodeInfo_Annotation * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const GeneratedCodeInfo_Annotation & from) |
void | MergeFrom(const GeneratedCodeInfo_Annotation & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
accessors | |
const int | kPathFieldNumber = = 1 |
const int | kSourceFileFieldNumber = = 2 |
const int | kBeginFieldNumber = = 3 |
const int | kEndFieldNumber = = 4 |
int | path_size() const repeated int32 path = 1 [[]packed = true]; |
void | clear_path() |
int32 | path(int index) const |
void | set_path(int index, int32 value) |
void | add_path(int32 value) |
const RepeatedField< int32 > & | path() const |
RepeatedField< int32 > * | mutable_path() |
bool | has_source_file() const optional string source_file = 2; |
void | clear_source_file() |
const ::std::string & | source_file() const |
void | set_source_file(const ::std::string & value) |
void | set_source_file(const char * value) |
void | set_source_file(const char * value, size_t size) |
::std::string * | mutable_source_file() |
::std::string * | release_source_file() |
void | set_allocated_source_file(::std::string * source_file) |
bool | has_begin() const optional int32 begin = 3; |
void | clear_begin() |
int32 | begin() const |
void | set_begin(int32 value) |
bool | has_end() const optional int32 end = 4; |
void | clear_end() |
int32 | end() const |
void | set_end(int32 value) |
virtual GeneratedCodeInfo_Annotation *
GeneratedCodeInfo_Annotation::New() const
GeneratedCodeInfo_Annotation::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual GeneratedCodeInfo_Annotation *
GeneratedCodeInfo_Annotation::New(
Arena * arena) const
GeneratedCodeInfo_Annotation::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void GeneratedCodeInfo_Annotation::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void GeneratedCodeInfo_Annotation::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void GeneratedCodeInfo_Annotation::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * GeneratedCodeInfo_Annotation::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int GeneratedCodeInfo_Annotation::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata GeneratedCodeInfo_Annotation::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
class GeneratedCodeInfo: public Message
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members | |
---|---|
| GeneratedCodeInfo() |
virtual | ~GeneratedCodeInfo() |
| GeneratedCodeInfo(const GeneratedCodeInfo & from) |
GeneratedCodeInfo & | operator=(const GeneratedCodeInfo & from) |
const UnknownFieldSet & | unknown_fields() const |
UnknownFieldSet * | mutable_unknown_fields() |
void | Swap(GeneratedCodeInfo * other) |
static const Descriptor * | descriptor() |
static const GeneratedCodeInfo & | default_instance() |
static const GeneratedCodeInfo * | internal_default_instance() |
implements Message | |
virtual GeneratedCodeInfo * | New() const Construct a new instance of the same type. more... |
virtual GeneratedCodeInfo * | New(Arena * arena) const Construct a new instance on the arena. more... |
virtual void | CopyFrom(const Message & from) Make this message into a copy of the given message. more... |
virtual void | MergeFrom(const Message & from) Merge the fields from the given message into this message. more... |
void | CopyFrom(const GeneratedCodeInfo & from) |
void | MergeFrom(const GeneratedCodeInfo & from) |
virtual void | Clear() Clear all fields of the message and set them to their default values. more... |
virtual bool | IsInitialized() const Quickly check if all required fields have values set. |
virtual size_t | ByteSizeLong() const Computes the serialized size of the message. more... |
virtual bool | MergePartialFromCodedStream(io::CodedInputStream * input) Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input. more... |
virtual void | SerializeWithCachedSizes(io::CodedOutputStream * output) const Serializes the message without recomputing the size. more... |
virtual uint8 * | InternalSerializeWithCachedSizesToArray(bool deterministic, uint8 * target) const Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written. more... |
virtual uint8 * | SerializeWithCachedSizesToArray(uint8 * target) const A version of SerializeWithCachedSizesToArray, below, that does not guarantee deterministic serialization. |
virtual int | GetCachedSize() const Returns the result of the last call to ByteSize(). more... |
virtual Metadata | GetMetadata() const |
nested types | |
typedef | GeneratedCodeInfo_Annotation Annotation |
accessors | |
const int | kAnnotationFieldNumber = = 1 |
int | annotation_size() const repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
void | clear_annotation() |
const GeneratedCodeInfo_Annotation & | annotation(int index) const |
GeneratedCodeInfo_Annotation * | mutable_annotation(int index) |
GeneratedCodeInfo_Annotation * | add_annotation() |
RepeatedPtrField< GeneratedCodeInfo_Annotation > * | mutable_annotation() |
const RepeatedPtrField< GeneratedCodeInfo_Annotation > & | annotation() const |
virtual GeneratedCodeInfo *
GeneratedCodeInfo::New() const
GeneratedCodeInfo::New() const
Construct a new instance of the same type.
Ownership is passed to the caller. (This is also defined in MessageLite, but is defined again here for return-type covariance.)
virtual GeneratedCodeInfo *
GeneratedCodeInfo::New(
Arena * arena) const
GeneratedCodeInfo::New(
Arena * arena) const
Construct a new instance on the arena.
Ownership is passed to the caller if arena is a NULL. Default implementation allows for API compatibility during the Arena transition.
virtual void GeneratedCodeInfo::CopyFrom(
const Message & from)
const Message & from)
Make this message into a copy of the given message.
The given message must have the same descriptor, but need not necessarily be the same class. By default this is just implemented as "Clear(); MergeFrom(from);".
virtual void GeneratedCodeInfo::MergeFrom(
const Message & from)
const Message & from)
Merge the fields from the given message into this message.
Singular fields will be overwritten, if specified in from, except for embedded messages which will be merged. Repeated fields will be concatenated. The given message must be of the same type as this message (i.e. the exact same class).
virtual void GeneratedCodeInfo::Clear()
Clear all fields of the message and set them to their default values.
Clear() avoids freeing memory, assuming that any memory allocated to hold parts of the message will be needed again to hold the next message. If you actually want to free the memory used by a Message, you must delete it.
virtual size_t GeneratedCodeInfo::ByteSizeLong() const
Computes the serialized size of the message.
This recursively calls ByteSizeLong() on all embedded messages.
ByteSizeLong() is generally linear in the number of fields defined for the proto.
virtual bool GeneratedCodeInfo::MergePartialFromCodedStream(
io::CodedInputStream * input)
io::CodedInputStream * input)
Like MergeFromCodedStream(), but succeeds even if required fields are missing in the input.
MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() followed by IsInitialized().
virtual void GeneratedCodeInfo::SerializeWithCachedSizes(
io::CodedOutputStream * output) const
io::CodedOutputStream * output) const
Serializes the message without recomputing the size.
The message must not have changed since the last call to ByteSize(), and the value returned by ByteSize must be non-negative. Otherwise the results are undefined.
virtual uint8 * GeneratedCodeInfo::InternalSerializeWithCachedSizesToArray(
bool deterministic,
uint8 * target) const
bool deterministic,
uint8 * target) const
Like SerializeWithCachedSizes, but writes directly to *target, returning a pointer to the byte immediately after the last byte written.
"target" must point at a byte array of at least ByteSize() bytes. If deterministic is true then we use deterministic serialization, e.g., map keys are sorted. FOR INTERNAL USE ONLY!
virtual int GeneratedCodeInfo::GetCachedSize() const
Returns the result of the last call to ByteSize().
An embedded message's size is needed both to serialize it (because embedded messages are length-delimited) and to compute the outer message's size. Caching the size avoids computing it multiple times.
ByteSize() does not automatically use the cached size when available because this would require invalidating it every time the message was modified, which would be too hard and expensive. (E.g. if a deeply-nested sub-message is changed, all of its parents' cached sizes would need to be invalidated, which is too much work for an otherwise inlined setter method.)
virtual Metadata GeneratedCodeInfo::GetMetadata() const
Get a struct containing the metadata for the Message.
Most subclasses only need to implement this method, rather than the GetDescriptor() and GetReflection() wrappers.
struct is_proto_enum< FieldDescriptorProto_Type >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|
struct is_proto_enum< FieldDescriptorProto_Label >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|
struct is_proto_enum< FileOptions_OptimizeMode >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|
struct is_proto_enum< FieldOptions_CType >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|
struct is_proto_enum< FieldOptions_JSType >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|
struct is_proto_enum< MethodOptions_IdempotencyLevel >
#include <google/protobuf/descriptor.pb.h>
namespace google::protobuf
See the docs for descriptor.pb.h for more information about this class.
Members |
---|