OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 13 matching lines...) Expand all Loading... |
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 |
31 #import "GPBUnknownField_PackagePrivate.h" | 31 #import "GPBUnknownField_PackagePrivate.h" |
32 | 32 |
33 #import "GPBArray.h" | 33 #import "GPBArray.h" |
34 #import "GPBCodedOutputStream.h" | 34 #import "GPBCodedOutputStream_PackagePrivate.h" |
35 | 35 |
36 @implementation GPBUnknownField { | 36 @implementation GPBUnknownField { |
37 @protected | 37 @protected |
38 int32_t number_; | 38 int32_t number_; |
39 GPBUInt64Array *mutableVarintList_; | 39 GPBUInt64Array *mutableVarintList_; |
40 GPBUInt32Array *mutableFixed32List_; | 40 GPBUInt32Array *mutableFixed32List_; |
41 GPBUInt64Array *mutableFixed64List_; | 41 GPBUInt64Array *mutableFixed64List_; |
42 NSMutableArray *mutableLengthDelimitedList_; | 42 NSMutableArray<NSData*> *mutableLengthDelimitedList_; |
43 NSMutableArray *mutableGroupList_; | 43 NSMutableArray<GPBUnknownFieldSet*> *mutableGroupList_; |
44 } | 44 } |
45 | 45 |
46 @synthesize number = number_; | 46 @synthesize number = number_; |
47 @synthesize varintList = mutableVarintList_; | 47 @synthesize varintList = mutableVarintList_; |
48 @synthesize fixed32List = mutableFixed32List_; | 48 @synthesize fixed32List = mutableFixed32List_; |
49 @synthesize fixed64List = mutableFixed64List_; | 49 @synthesize fixed64List = mutableFixed64List_; |
50 @synthesize lengthDelimitedList = mutableLengthDelimitedList_; | 50 @synthesize lengthDelimitedList = mutableLengthDelimitedList_; |
51 @synthesize groupList = mutableGroupList_; | 51 @synthesize groupList = mutableGroupList_; |
52 | 52 |
53 - (instancetype)initWithNumber:(int32_t)number { | 53 - (instancetype)initWithNumber:(int32_t)number { |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 - (void)addGroup:(GPBUnknownFieldSet *)value { | 318 - (void)addGroup:(GPBUnknownFieldSet *)value { |
319 if (mutableGroupList_ == nil) { | 319 if (mutableGroupList_ == nil) { |
320 mutableGroupList_ = [[NSMutableArray alloc] initWithObjects:&value count:1]; | 320 mutableGroupList_ = [[NSMutableArray alloc] initWithObjects:&value count:1]; |
321 } else { | 321 } else { |
322 [mutableGroupList_ addObject:value]; | 322 [mutableGroupList_ addObject:value]; |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 @end | 326 @end |
OLD | NEW |