Searched refs:pb_ref (Results 1 – 2 of 2) sorted by relevance
633 static bool DeserializeReferenceFromPb(const pb::Reference& pb_ref, Reference* out_ref, in DeserializeReferenceFromPb() argument635 out_ref->reference_type = DeserializeReferenceTypeFromPb(pb_ref.type()); in DeserializeReferenceFromPb()636 out_ref->private_reference = pb_ref.private_(); in DeserializeReferenceFromPb()638 if (pb_ref.id() != 0) { in DeserializeReferenceFromPb()639 out_ref->id = ResourceId(pb_ref.id()); in DeserializeReferenceFromPb()642 if (!pb_ref.name().empty()) { in DeserializeReferenceFromPb()644 if (!ResourceUtils::ParseResourceName(pb_ref.name(), &name_ref, nullptr)) { in DeserializeReferenceFromPb()646 error << "reference has invalid resource name '" << pb_ref.name() << "'"; in DeserializeReferenceFromPb()817 const pb::Reference& pb_ref = pb_item.ref(); in DeserializeItemFromPb() local819 if (!DeserializeReferenceFromPb(pb_ref, ref.get(), out_error)) { in DeserializeItemFromPb()
399 static void SerializeReferenceToPb(const Reference& ref, pb::Reference* pb_ref) { in SerializeReferenceToPb() argument400 pb_ref->set_id(ref.id.value_or_default(ResourceId(0x0)).id); in SerializeReferenceToPb()403 pb_ref->set_name(ref.name.value().to_string()); in SerializeReferenceToPb()406 pb_ref->set_private_(ref.private_reference); in SerializeReferenceToPb()407 pb_ref->set_type(SerializeReferenceTypeToPb(ref.reference_type)); in SerializeReferenceToPb()