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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 57 } |
58 | 58 |
59 void RepeatedPrimitiveFieldGenerator::GenerateMembers(io::Printer* printer) { | 59 void RepeatedPrimitiveFieldGenerator::GenerateMembers(io::Printer* printer) { |
60 printer->Print( | 60 printer->Print( |
61 variables_, | 61 variables_, |
62 "private static readonly pb::FieldCodec<$type_name$> _repeated_$name$_codec\
n" | 62 "private static readonly pb::FieldCodec<$type_name$> _repeated_$name$_codec\
n" |
63 " = pb::FieldCodec.For$capitalized_type_name$($tag$);\n"); | 63 " = pb::FieldCodec.For$capitalized_type_name$($tag$);\n"); |
64 printer->Print(variables_, | 64 printer->Print(variables_, |
65 "private readonly pbc::RepeatedField<$type_name$> $name$_ = new pbc::Repeate
dField<$type_name$>();\n"); | 65 "private readonly pbc::RepeatedField<$type_name$> $name$_ = new pbc::Repeate
dField<$type_name$>();\n"); |
66 WritePropertyDocComment(printer, descriptor_); | 66 WritePropertyDocComment(printer, descriptor_); |
67 AddPublicMemberAttributes(printer); | 67 AddDeprecatedFlag(printer); |
68 printer->Print( | 68 printer->Print( |
69 variables_, | 69 variables_, |
70 "$access_level$ pbc::RepeatedField<$type_name$> $property_name$ {\n" | 70 "$access_level$ pbc::RepeatedField<$type_name$> $property_name$ {\n" |
71 " get { return $name$_; }\n" | 71 " get { return $name$_; }\n" |
72 "}\n"); | 72 "}\n"); |
73 } | 73 } |
74 | 74 |
75 void RepeatedPrimitiveFieldGenerator::GenerateMergingCode(io::Printer* printer)
{ | 75 void RepeatedPrimitiveFieldGenerator::GenerateMergingCode(io::Printer* printer)
{ |
76 printer->Print( | 76 printer->Print( |
77 variables_, | 77 variables_, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 "$name$_ = other.$name$_.Clone();\n"); | 116 "$name$_ = other.$name$_.Clone();\n"); |
117 } | 117 } |
118 | 118 |
119 void RepeatedPrimitiveFieldGenerator::GenerateFreezingCode(io::Printer* printer)
{ | 119 void RepeatedPrimitiveFieldGenerator::GenerateFreezingCode(io::Printer* printer)
{ |
120 } | 120 } |
121 | 121 |
122 } // namespace csharp | 122 } // namespace csharp |
123 } // namespace compiler | 123 } // namespace compiler |
124 } // namespace protobuf | 124 } // namespace protobuf |
125 } // namespace google | 125 } // namespace google |
OLD | NEW |