Lines Matching refs:variable
510 for (const auto& variable : parcel->GetFields()) { in GenerateParcelBody() local
511 GenerateDeprecated(out, *variable); in GenerateParcelBody()
512 auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD); in GenerateParcelBody()
513 out << "pub " << variable->GetName() << ": " << field_type << ",\n"; in GenerateParcelBody()
526 for (const auto& variable : parcel->GetFields()) { in GenerateParcelDefault() local
527 if (variable->GetDefaultValue()) { in GenerateParcelDefault()
528 out << variable->GetName() << ": " << variable->ValueString(ConstantValueDecorator) << ",\n"; in GenerateParcelDefault()
530 out << variable->GetName() << ": Default::default(),\n"; in GenerateParcelDefault()
545 for (const auto& variable : parcel->GetFields()) { in GenerateParcelSerializeBody() local
546 if (!TypeHasDefault(variable->GetType(), typenames)) { in GenerateParcelSerializeBody()
547 out << "let __field_ref = this." << variable->GetName() in GenerateParcelSerializeBody()
551 out << "subparcel.write(&this." << variable->GetName() << ")?;\n"; in GenerateParcelSerializeBody()
578 for (const auto& variable : parcel->GetFields()) { in GenerateParcelDeserializeBody() local
580 if (!TypeHasDefault(variable->GetType(), typenames)) { in GenerateParcelDeserializeBody()
581 out << "result." << variable->GetName() << " = Some(parcel.read()?);\n"; in GenerateParcelDeserializeBody()
583 out << "result." << variable->GetName() << " = parcel.read()?;\n"; in GenerateParcelDeserializeBody()
599 for (const auto& variable : parcel->GetFields()) { in GenerateParcelBody() local
600 GenerateDeprecated(out, *variable); in GenerateParcelBody()
601 auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD); in GenerateParcelBody()
602 out << variable->GetCapitalizedName() << "(" << field_type << "),\n"; in GenerateParcelBody()
637 for (const auto& variable : parcel->GetFields()) { in GenerateParcelSerializeBody() local
638 out << "Self::" << variable->GetCapitalizedName() << "(v) => {\n"; in GenerateParcelSerializeBody()
641 if (!TypeHasDefault(variable->GetType(), typenames)) { in GenerateParcelSerializeBody()
660 for (const auto& variable : parcel->GetFields()) { in GenerateParcelDeserializeBody() local
661 auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD); in GenerateParcelDeserializeBody()
666 if (!TypeHasDefault(variable->GetType(), typenames)) { in GenerateParcelDeserializeBody()
671 out << "Ok(Some(Self::" << variable->GetCapitalizedName() << "(value)))\n"; in GenerateParcelDeserializeBody()