コード例 #1
0
 public void MergeFrom(Header other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Version.Length != 0)
     {
         Version = other.Version;
     }
     if (other.Date.Length != 0)
     {
         Date = other.Date;
     }
     if (other.projection_ != null)
     {
         if (projection_ == null)
         {
             projection_ = new global::Apollo.Hdmap.Projection();
         }
         Projection.MergeFrom(other.Projection);
     }
     if (other.District.Length != 0)
     {
         District = other.District;
     }
     if (other.Generation.Length != 0)
     {
         Generation = other.Generation;
     }
     if (other.RevMajor.Length != 0)
     {
         RevMajor = other.RevMajor;
     }
     if (other.RevMinor.Length != 0)
     {
         RevMinor = other.RevMinor;
     }
     if (other.Left != 0D)
     {
         Left = other.Left;
     }
     if (other.Top != 0D)
     {
         Top = other.Top;
     }
     if (other.Right != 0D)
     {
         Right = other.Right;
     }
     if (other.Bottom != 0D)
     {
         Bottom = other.Bottom;
     }
     if (other.Vendor.Length != 0)
     {
         Vendor = other.Vendor;
     }
 }
コード例 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 10: {
                    Version = input.ReadBytes();
                    break;
                }

                case 18: {
                    Date = input.ReadBytes();
                    break;
                }

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

                case 34: {
                    District = input.ReadBytes();
                    break;
                }

                case 42: {
                    Generation = input.ReadBytes();
                    break;
                }

                case 50: {
                    RevMajor = input.ReadBytes();
                    break;
                }

                case 58: {
                    RevMinor = input.ReadBytes();
                    break;
                }

                case 65: {
                    Left = input.ReadDouble();
                    break;
                }

                case 73: {
                    Top = input.ReadDouble();
                    break;
                }

                case 81: {
                    Right = input.ReadDouble();
                    break;
                }

                case 89: {
                    Bottom = input.ReadDouble();
                    break;
                }

                case 98: {
                    Vendor = input.ReadBytes();
                    break;
                }
                }
            }
        }