Welcome to mirror list, hosted at ThFree Co, Russian Federation.

loaded_path_segment.hpp « routing - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be36aa9ecbf972123676c15d6d60d1360640428f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include "routing/osrm_helpers.hpp"
#include "routing/turns.hpp"
#include "routing/turn_candidate.hpp"

#include "indexer/ftypes_matcher.hpp"

#include "base/buffer_vector.hpp"

#include "std/vector.hpp"

class Index;

namespace routing
{
struct RoutingMapping;
struct RawPathData;
struct FeatureGraphNode;

/*!
 * \brief The LoadedPathSegment struct is a representation of a single node path.
 * It unpacks and stores information about path and road type flags.
 * Postprocessing must read information from the structure and does not initiate disk readings.
 */
struct LoadedPathSegment
{
  vector<m2::PointD> m_path;
  vector<turns::SingleLaneInfo> m_lanes;
  string m_name;
  TEdgeWeight m_weight; /*!< Time in seconds to pass the segment. */
  TNodeId m_nodeId;     /*!< May be NodeId for OSRM router or FeatureId::index for graph router. */
  ftypes::HighwayClass m_highwayClass;
  bool m_onRoundabout;
  bool m_isLink;

  LoadedPathSegment()
  {
    Clear();
  }

  void Clear()
  {
    m_path.clear();
    m_lanes.clear();
    m_name.clear();
    m_weight = 0;
    m_nodeId = 0;
    m_highwayClass = ftypes::HighwayClass::Undefined;
    m_onRoundabout = false;
    m_isLink = false;
  }
};

using TUnpackedPathSegments = vector<LoadedPathSegment>;
}  // namespace routing