Exemple #1
0
 public void MergeFrom(Road other)
 {
     if (other == null)
     {
         return;
     }
     if (other.id_ != null)
     {
         if (id_ == null)
         {
             id_ = new global::Apollo.Hdmap.Id();
         }
         Id.MergeFrom(other.Id);
     }
     section_.Add(other.section_);
     if (other.junctionId_ != null)
     {
         if (junctionId_ == null)
         {
             junctionId_ = new global::Apollo.Hdmap.Id();
         }
         JunctionId.MergeFrom(other.JunctionId);
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
 }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (id_ == null)
                    {
                        id_ = new global::Apollo.Hdmap.Id();
                    }
                    input.ReadMessage(id_);
                    break;
                }

                case 18: {
                    section_.AddEntriesFrom(input, _repeated_section_codec);
                    break;
                }

                case 26: {
                    if (junctionId_ == null)
                    {
                        junctionId_ = new global::Apollo.Hdmap.Id();
                    }
                    input.ReadMessage(junctionId_);
                    break;
                }

                case 32: {
                    type_ = (global::Apollo.Hdmap.Road.Types.Type)input.ReadEnum();
                    break;
                }
                }
            }
        }