Apollo 10.0
自动驾驶开放平台
node_with_range.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
19namespace apollo {
20namespace routing {
21
23 : NodeSRange(range), topo_node_(node) {}
24
25NodeWithRange::NodeWithRange(const TopoNode* node, double start_s, double end_s)
26 : NodeSRange(start_s, end_s), topo_node_(node) {}
27
29
30bool NodeWithRange::operator<(const NodeWithRange& other) const {
31 return StartS() > other.StartS();
32}
33
34const TopoNode* NodeWithRange::GetTopoNode() const { return topo_node_; }
35
36bool NodeWithRange::IsVirtual() const { return topo_node_->IsVirtual(); }
37
38const std::string& NodeWithRange::RoadId() const {
39 return topo_node_->RoadId();
40}
41
42const std::string& NodeWithRange::LaneId() const {
43 return topo_node_->LaneId();
44}
45
46double NodeWithRange::FullLength() const { return topo_node_->Length(); }
47
48} // namespace routing
49} // namespace apollo
NodeWithRange(const NodeWithRange &other)=default
bool operator<(const NodeWithRange &other) const
const std::string & LaneId() const
const std::string & RoadId() const
const TopoNode * GetTopoNode() const
const std::string & LaneId() const
Definition topo_node.cc:162
const std::string & RoadId() const
Definition topo_node.cc:164
class register implement
Definition arena_queue.h:37