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
17
#include "
modules/routing/graph/node_with_range.h
"
18
19
namespace
apollo
{
20
namespace
routing {
21
22
NodeWithRange::NodeWithRange
(
const
TopoNode
* node,
const
NodeSRange
& range)
23
:
NodeSRange
(range), topo_node_(node) {}
24
25
NodeWithRange::NodeWithRange
(
const
TopoNode
* node,
double
start_s,
double
end_s)
26
:
NodeSRange
(start_s, end_s), topo_node_(node) {}
27
28
NodeWithRange::~NodeWithRange
() {}
29
30
bool
NodeWithRange::operator<
(
const
NodeWithRange
& other)
const
{
31
return
StartS
() > other.
StartS
();
32
}
33
34
const
TopoNode
*
NodeWithRange::GetTopoNode
()
const
{
return
topo_node_; }
35
36
bool
NodeWithRange::IsVirtual
()
const
{
return
topo_node_->
IsVirtual
(); }
37
38
const
std::string&
NodeWithRange::RoadId
()
const
{
39
return
topo_node_->
RoadId
();
40
}
41
42
const
std::string&
NodeWithRange::LaneId
()
const
{
43
return
topo_node_->
LaneId
();
44
}
45
46
double
NodeWithRange::FullLength
()
const
{
return
topo_node_->
Length
(); }
47
48
}
// namespace routing
49
}
// namespace apollo
apollo::routing::NodeSRange
Definition
topo_range.h:22
apollo::routing::NodeSRange::StartS
double StartS() const
Definition
topo_range.cc:42
apollo::routing::NodeWithRange
Definition
node_with_range.h:26
apollo::routing::NodeWithRange::NodeWithRange
NodeWithRange(const NodeWithRange &other)=default
apollo::routing::NodeWithRange::IsVirtual
bool IsVirtual() const
Definition
node_with_range.cc:36
apollo::routing::NodeWithRange::operator<
bool operator<(const NodeWithRange &other) const
Definition
node_with_range.cc:30
apollo::routing::NodeWithRange::FullLength
double FullLength() const
Definition
node_with_range.cc:46
apollo::routing::NodeWithRange::LaneId
const std::string & LaneId() const
Definition
node_with_range.cc:42
apollo::routing::NodeWithRange::RoadId
const std::string & RoadId() const
Definition
node_with_range.cc:38
apollo::routing::NodeWithRange::~NodeWithRange
virtual ~NodeWithRange()
Definition
node_with_range.cc:28
apollo::routing::NodeWithRange::GetTopoNode
const TopoNode * GetTopoNode() const
Definition
node_with_range.cc:34
apollo::routing::TopoNode
Definition
topo_node.h:32
apollo::routing::TopoNode::LaneId
const std::string & LaneId() const
Definition
topo_node.cc:162
apollo::routing::TopoNode::Length
double Length() const
Definition
topo_node.cc:156
apollo::routing::TopoNode::IsVirtual
bool IsVirtual() const
Definition
topo_node.cc:160
apollo::routing::TopoNode::RoadId
const std::string & RoadId() const
Definition
topo_node.cc:164
apollo
class register implement
Definition
arena_queue.h:37
node_with_range.h
modules
routing
graph
node_with_range.cc