public void MergeFrom(PredictionObstacle other) { if (other == null) { return; } if (other.perceptionObstacle_ != null) { if (perceptionObstacle_ == null) { perceptionObstacle_ = new global::Apollo.Perception.PerceptionObstacle(); } PerceptionObstacle.MergeFrom(other.PerceptionObstacle); } if (other.Timestamp != 0D) { Timestamp = other.Timestamp; } if (other.PredictedPeriod != 0D) { PredictedPeriod = other.PredictedPeriod; } trajectory_.Add(other.trajectory_); if (other.intent_ != null) { if (intent_ == null) { intent_ = new global::Apollo.Prediction.ObstacleIntent(); } Intent.MergeFrom(other.Intent); } if (other.priority_ != null) { if (priority_ == null) { priority_ = new global::Apollo.Prediction.ObstaclePriority(); } Priority.MergeFrom(other.Priority); } if (other.IsStatic != false) { IsStatic = other.IsStatic; } }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 10: { if (perceptionObstacle_ == null) { perceptionObstacle_ = new global::Apollo.Perception.PerceptionObstacle(); } input.ReadMessage(perceptionObstacle_); break; } case 17: { Timestamp = input.ReadDouble(); break; } case 25: { PredictedPeriod = input.ReadDouble(); break; } case 34: { trajectory_.AddEntriesFrom(input, _repeated_trajectory_codec); break; } case 42: { if (intent_ == null) { intent_ = new global::Apollo.Prediction.ObstacleIntent(); } input.ReadMessage(intent_); break; } case 50: { if (priority_ == null) { priority_ = new global::Apollo.Prediction.ObstaclePriority(); } input.ReadMessage(priority_); break; } case 56: { IsStatic = input.ReadBool(); break; } } } }