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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } else { | 72 } else { |
73 scoped_ptr<FieldGeneratorBase> single_generator( | 73 scoped_ptr<FieldGeneratorBase> single_generator( |
74 new MessageFieldGenerator(descriptor_, fieldOrdinal_, this->options())); | 74 new MessageFieldGenerator(descriptor_, fieldOrdinal_, this->options())); |
75 single_generator->GenerateCodecCode(printer); | 75 single_generator->GenerateCodecCode(printer); |
76 } | 76 } |
77 printer->Print(";\n"); | 77 printer->Print(";\n"); |
78 printer->Print( | 78 printer->Print( |
79 variables_, | 79 variables_, |
80 "private readonly pbc::RepeatedField<$type_name$> $name$_ = new pbc::Repeate
dField<$type_name$>();\n"); | 80 "private readonly pbc::RepeatedField<$type_name$> $name$_ = new pbc::Repeate
dField<$type_name$>();\n"); |
81 WritePropertyDocComment(printer, descriptor_); | 81 WritePropertyDocComment(printer, descriptor_); |
82 AddPublicMemberAttributes(printer); | 82 AddDeprecatedFlag(printer); |
83 printer->Print( | 83 printer->Print( |
84 variables_, | 84 variables_, |
85 "$access_level$ pbc::RepeatedField<$type_name$> $property_name$ {\n" | 85 "$access_level$ pbc::RepeatedField<$type_name$> $property_name$ {\n" |
86 " get { return $name$_; }\n" | 86 " get { return $name$_; }\n" |
87 "}\n"); | 87 "}\n"); |
88 } | 88 } |
89 | 89 |
90 void RepeatedMessageFieldGenerator::GenerateMergingCode(io::Printer* printer) { | 90 void RepeatedMessageFieldGenerator::GenerateMergingCode(io::Printer* printer) { |
91 printer->Print( | 91 printer->Print( |
92 variables_, | 92 variables_, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 "$name$_ = other.$name$_.Clone();\n"); | 135 "$name$_ = other.$name$_.Clone();\n"); |
136 } | 136 } |
137 | 137 |
138 void RepeatedMessageFieldGenerator::GenerateFreezingCode(io::Printer* printer) { | 138 void RepeatedMessageFieldGenerator::GenerateFreezingCode(io::Printer* printer) { |
139 } | 139 } |
140 | 140 |
141 } // namespace csharp | 141 } // namespace csharp |
142 } // namespace compiler | 142 } // namespace compiler |
143 } // namespace protobuf | 143 } // namespace protobuf |
144 } // namespace google | 144 } // namespace google |
OLD | NEW |