Пример #1
0
 public void MergeFrom(DeciderRuleBasedStopConfig other)
 {
     if (other == null)
     {
         return;
     }
     if (other.crosswalk_ != null)
     {
         if (crosswalk_ == null)
         {
             crosswalk_ = new global::Apollo.Planning.RuleCrosswalkConfig();
         }
         Crosswalk.MergeFrom(other.Crosswalk);
     }
     if (other.stopSign_ != null)
     {
         if (stopSign_ == null)
         {
             stopSign_ = new global::Apollo.Planning.RuleStopSignConfig();
         }
         StopSign.MergeFrom(other.StopSign);
     }
     if (other.trafficLight_ != null)
     {
         if (trafficLight_ == null)
         {
             trafficLight_ = new global::Apollo.Planning.RuleTrafficLightConfig();
         }
         TrafficLight.MergeFrom(other.TrafficLight);
     }
 }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 10: {
                    if (crosswalk_ == null)
                    {
                        crosswalk_ = new global::Apollo.Planning.RuleCrosswalkConfig();
                    }
                    input.ReadMessage(crosswalk_);
                    break;
                }

                case 18: {
                    if (stopSign_ == null)
                    {
                        stopSign_ = new global::Apollo.Planning.RuleStopSignConfig();
                    }
                    input.ReadMessage(stopSign_);
                    break;
                }

                case 26: {
                    if (trafficLight_ == null)
                    {
                        trafficLight_ = new global::Apollo.Planning.RuleTrafficLightConfig();
                    }
                    input.ReadMessage(trafficLight_);
                    break;
                }
                }
            }
        }