libosmscout  1.1.1
LaneAgent.h
Go to the documentation of this file.
1 #ifndef OSMSCOUT_LANE_AGENT_H
2 #define OSMSCOUT_LANE_AGENT_H
3 
4 /*
5  This source is part of the libosmscout library
6  Copyright (C) 2020 Lukas Karas
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  */
22 
26 
27 namespace osmscout {
28 
29 class OSMSCOUT_API LaneAgent CLASS_FINAL : public NavigationAgent
30 {
31 public:
36  {
37  bool oneway{false};
38  int count{1};
39  bool suggested{false};
40  int suggestedFrom{0};
41  int suggestedTo{0};
42  std::vector<std::string> turns;
43 
44  Lane() = default;
45 
47  const RouteDescription::SuggestedLaneDescriptionRef suggestedLaneDsc);
48 
49  Lane(const Lane &) = default;
50  Lane(Lane &&) = default;
51 
52  ~Lane() = default;
53 
54  Lane &operator=(const Lane&) = default;
55  Lane &operator=(Lane&&) = default;
56 
57  bool operator!=(const Lane &o) const;
58  };
59 
60  struct OSMSCOUT_API LaneMessage CLASS_FINAL : public NavigationMessage
61  {
63 
64  LaneMessage(const Timestamp& timestamp,
65  const Lane &lane);
66 
67  };
68 
69 public:
70  LaneAgent() = default;
71 
72  std::list<NavigationMessageRef> Process(const NavigationMessageRef& message) override;
73 
74 private:
75  Lane lastLane;
76 };
77 
78 }
79 
80 #endif // OSMSCOUT_LANE_AGENT_H
std::chrono::system_clock::time_point Timestamp
Definition: Time.h:27
Lane lane
Definition: LaneAgent.h:62
Definition: LaneAgent.h:35
bool operator!=(const MapViewStruct &r1, const MapViewStruct &r2)
Definition: DBThread.h:61
Definition: Area.h:38
#define CLASS_FINAL
Definition: Compiler.h:26
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
Definition: LaneAgent.h:60
std::shared_ptr< LaneDescription > LaneDescriptionRef
Definition: RouteDescription.h:631
std::shared_ptr< SuggestedLaneDescription > SuggestedLaneDescriptionRef
Definition: RouteDescription.h:662
std::shared_ptr< NavigationMessage > NavigationMessageRef
Definition: Engine.h:56
Definition: Engine.h:48
std::vector< std::string > turns
Definition: LaneAgent.h:42