Go to the documentation of this file.
69 "private $type_name$ $name$_;\n");
74 "$access_level$ $type_name$ $property_name$ {\n"
75 " get { return $name$_; }\n"
83 "/// <summary>Gets whether the $descriptor_name$ field is set</summary>\n");
87 "$access_level$ bool Has$property_name$ {\n"
88 " get { return $name$_ != null; }\n"
92 "/// <summary>Clears the value of the $descriptor_name$ field</summary>\n");
96 "$access_level$ void Clear$property_name$() {\n"
105 "if (other.$has_property_check$) {\n"
106 " if ($has_not_property_check$) {\n"
107 " $property_name$ = new $type_name$();\n"
109 " $property_name$.MergeFrom(other.$property_name$);\n"
116 "if ($has_not_property_check$) {\n"
117 " $property_name$ = new $type_name$();\n"
130 "if ($has_property_check$) {\n"
131 " output.WriteRawTag($tag_bytes$);\n"
132 " output.WriteMessage($property_name$);\n"
137 "if ($has_property_check$) {\n"
138 " output.WriteRawTag($tag_bytes$);\n"
139 " output.WriteGroup($property_name$);\n"
140 " output.WriteRawTag($end_tag_bytes$);\n"
149 "if ($has_property_check$) {\n"
150 " size += $tag_size$ + pb::CodedOutputStream.ComputeMessageSize($property_name$);\n"
155 "if ($has_property_check$) {\n"
156 " size += $tag_size$ + pb::CodedOutputStream.ComputeGroupSize($property_name$);\n"
164 "if ($has_property_check$) hash ^= $property_name$.GetHashCode();\n");
169 "if (!object.Equals($property_name$, other.$property_name$)) return false;\n");
175 "PrintField(\"$field_name$\", has$property_name$, $name$_, writer);\n");
182 "$access_level$ static readonly pb::Extension<$extended_type$, $type_name$> $property_name$ =\n"
183 " new pb::Extension<$extended_type$, $type_name$>($number$, ");
185 printer->
Print(
");\n");
189 "$name$_ = other.$has_property_check$ ? other.$name$_.Clone() : null;\n");
199 "pb::FieldCodec.ForMessage($tag$, $type_name$.Parser)");
203 "pb::FieldCodec.ForGroup($tag$, $end_tag$, $type_name$.Parser)");
224 "$access_level$ $type_name$ $property_name$ {\n"
225 " get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : null; }\n"
227 " $oneof_name$_ = value;\n"
228 " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$property_name$;\n"
234 "/// <summary>Gets whether the \"$descriptor_name$\" field is set</summary>\n");
238 "$access_level$ bool Has$property_name$ {\n"
239 " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$property_name$; }\n"
243 "/// <summary> Clears the value of the oneof if it's currently set to \"$descriptor_name$\" </summary>\n");
247 "$access_level$ void Clear$property_name$() {\n"
248 " if ($has_property_check$) {\n"
249 " Clear$oneof_property_name$();\n"
257 "if ($property_name$ == null) {\n"
258 " $property_name$ = new $type_name$();\n"
260 "$property_name$.MergeFrom(other.$property_name$);\n");
267 "$type_name$ subBuilder = new $type_name$();\n"
268 "if ($has_property_check$) {\n"
269 " subBuilder.MergeFrom($property_name$);\n"
272 printer->
Print(
"input.ReadMessage(subBuilder);\n");
274 printer->
Print(
"input.ReadGroup(subBuilder);\n");
282 "PrintField(\"$descriptor_name$\", $has_property_check$, $oneof_name$_, writer);\n");
287 "$property_name$ = other.$property_name$.Clone();\n");
void Print(const std::map< std::string, std::string > &variables, const char *text)
virtual void WriteEquals(io::Printer *printer)
virtual void GenerateMergingCode(io::Printer *printer)
virtual void GenerateSerializationCode(io::Printer *printer)
void SetCommonOneofFieldVariables(std::map< string, string > *variables)
const FieldDescriptor * descriptor_
virtual void GenerateMergingCode(io::Printer *printer)
virtual void WriteToString(io::Printer *printer)
bool IsProto2(const FileDescriptor *descriptor)
void AddDeprecatedFlag(io::Printer *printer)
std::map< string, string > variables_
virtual void GenerateFreezingCode(io::Printer *printer)
std::string GetFieldName(const FieldDescriptor *descriptor)
virtual void GenerateParsingCode(io::Printer *printer)
virtual void GenerateSerializedSizeCode(io::Printer *printer)
const FileDescriptor * file() const
void AddPublicMemberAttributes(io::Printer *printer)
~MessageOneofFieldGenerator()
virtual void GenerateCodecCode(io::Printer *printer)
MessageOneofFieldGenerator(const FieldDescriptor *descriptor, int presenceIndex, const Options *options)
virtual void GenerateExtensionCode(io::Printer *printer)
virtual void GenerateCloningCode(io::Printer *printer)
MessageFieldGenerator(const FieldDescriptor *descriptor, int presenceIndex, const Options *options)
virtual void GenerateCloningCode(io::Printer *printer)
virtual void WriteToString(io::Printer *printer)
void WritePropertyDocComment(io::Printer *printer, const FieldDescriptor *field)
virtual void GenerateMembers(io::Printer *printer)
virtual void GenerateMembers(io::Printer *printer)
virtual void WriteHash(io::Printer *printer)
virtual void GenerateParsingCode(io::Printer *printer)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:49