Searched refs:pb_ref (Results 1 – 2 of 2) sorted by relevance
649 static bool DeserializeReferenceFromPb(const pb::Reference& pb_ref, Reference* out_ref, in DeserializeReferenceFromPb() argument651 out_ref->reference_type = DeserializeReferenceTypeFromPb(pb_ref.type()); in DeserializeReferenceFromPb()652 out_ref->private_reference = pb_ref.private_(); in DeserializeReferenceFromPb()653 out_ref->is_dynamic = pb_ref.is_dynamic().value(); in DeserializeReferenceFromPb()655 if (pb_ref.id() != 0) { in DeserializeReferenceFromPb()656 out_ref->id = ResourceId(pb_ref.id()); in DeserializeReferenceFromPb()659 if (!pb_ref.name().empty()) { in DeserializeReferenceFromPb()661 if (!ResourceUtils::ParseResourceName(pb_ref.name(), &name_ref, nullptr)) { in DeserializeReferenceFromPb()663 error << "reference has invalid resource name '" << pb_ref.name() << "'"; in DeserializeReferenceFromPb()669 if (pb_ref.type_flags() != 0) { in DeserializeReferenceFromPb()[all …]
440 static void SerializeReferenceToPb(const Reference& ref, pb::Reference* pb_ref) { in SerializeReferenceToPb() argument441 pb_ref->set_id(ref.id.value_or(ResourceId(0x0)).id); in SerializeReferenceToPb()444 pb_ref->set_name(ref.name.value().to_string()); in SerializeReferenceToPb()447 pb_ref->set_private_(ref.private_reference); in SerializeReferenceToPb()448 pb_ref->set_type(SerializeReferenceTypeToPb(ref.reference_type)); in SerializeReferenceToPb()450 pb_ref->mutable_is_dynamic()->set_value(ref.is_dynamic); in SerializeReferenceToPb()453 pb_ref->set_type_flags(*ref.type_flags); in SerializeReferenceToPb()455 pb_ref->set_allow_raw(ref.allow_raw); in SerializeReferenceToPb()