| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // http://code.google.com/p/protobuf/ | 3 // http://code.google.com/p/protobuf/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // file. Thus, these types will *not* be nested inside the outer class | 253 // file. Thus, these types will *not* be nested inside the outer class |
| 254 // named by java_outer_classname. However, the outer class will still be | 254 // named by java_outer_classname. However, the outer class will still be |
| 255 // generated to contain the file's getDescriptor() method as well as any | 255 // generated to contain the file's getDescriptor() method as well as any |
| 256 // top-level extensions defined in the file. | 256 // top-level extensions defined in the file. |
| 257 optional bool java_multiple_files = 10 [default=false]; | 257 optional bool java_multiple_files = 10 [default=false]; |
| 258 | 258 |
| 259 // If set true, then code generators will store unknown fields so that | 259 // If set true, then code generators will store unknown fields so that |
| 260 // reserializing a message will retain them. This is the default behaviour | 260 // reserializing a message will retain them. This is the default behaviour |
| 261 // unless LITE_RUNTIME is specified. Therefore, this option only makes sense | 261 // unless LITE_RUNTIME is specified. Therefore, this option only makes sense |
| 262 // when LITE_RUNTIME is in use. | 262 // when LITE_RUNTIME is in use. |
| 263 optional bool retain_unknown_fields = 11 [default=true]; | 263 optional bool retain_unknown_fields = 11 [default=false]; |
| 264 | 264 |
| 265 // If set true, then the Java code generator will generate equals() and | 265 // If set true, then the Java code generator will generate equals() and |
| 266 // hashCode() methods for all messages defined in the .proto file. This is | 266 // hashCode() methods for all messages defined in the .proto file. This is |
| 267 // purely a speed optimization, as the AbstractMessage base class includes | 267 // purely a speed optimization, as the AbstractMessage base class includes |
| 268 // reflection-based implementations of these methods. | 268 // reflection-based implementations of these methods. |
| 269 optional bool java_generate_equals_and_hash = 20 [default=false]; | 269 optional bool java_generate_equals_and_hash = 20 [default=false]; |
| 270 | 270 |
| 271 // Generated classes can be optimized for speed or code size. | 271 // Generated classes can be optimized for speed or code size. |
| 272 enum OptimizeMode { | 272 enum OptimizeMode { |
| 273 SPEED = 1; // Generate complete code for parsing, serialization, | 273 SPEED = 1; // Generate complete code for parsing, serialization, |
| 274 // etc. | 274 // etc. |
| 275 CODE_SIZE = 2; // Use ReflectionOps to implement these methods. | 275 CODE_SIZE = 2; // Use ReflectionOps to implement these methods. |
| 276 LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. | 276 LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. |
| 277 } | 277 } |
| 278 optional OptimizeMode optimize_for = 9 [default=LITE_RUNTIME]; | 278 optional OptimizeMode optimize_for = 9 [default=SPEED]; |
| 279 | 279 |
| 280 | 280 |
| 281 | 281 |
| 282 | 282 |
| 283 // Should generic services be generated in each language? "Generic" services | 283 // Should generic services be generated in each language? "Generic" services |
| 284 // are not specific to any particular RPC system. They are generated by the | 284 // are not specific to any particular RPC system. They are generated by the |
| 285 // main code generators in each language (without additional plugins). | 285 // main code generators in each language (without additional plugins). |
| 286 // Generic services were the only kind of service generation supported by | 286 // Generic services were the only kind of service generation supported by |
| 287 // early versions of proto2. | 287 // early versions of proto2. |
| 288 // | 288 // |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 // end line (optional, otherwise assumed same as start line), end column. | 535 // end line (optional, otherwise assumed same as start line), end column. |
| 536 // These are packed into a single field for efficiency. Note that line | 536 // These are packed into a single field for efficiency. Note that line |
| 537 // and column numbers are zero-based -- typically you will want to add | 537 // and column numbers are zero-based -- typically you will want to add |
| 538 // 1 to each before displaying to a user. | 538 // 1 to each before displaying to a user. |
| 539 repeated int32 span = 2 [packed=true]; | 539 repeated int32 span = 2 [packed=true]; |
| 540 | 540 |
| 541 // TODO(kenton): Record comments appearing before and after the | 541 // TODO(kenton): Record comments appearing before and after the |
| 542 // declaration. | 542 // declaration. |
| 543 } | 543 } |
| 544 } | 544 } |
| OLD | NEW |