libosmscout  1.1.1
Agents.h
Go to the documentation of this file.
1 #ifndef OSMSCOUT_NAVIGATION_AGENTS_H
2 #define OSMSCOUT_NAVIGATION_AGENTS_H
3 
4 /*
5  This source is part of the libosmscout library
6  Copyright (C) 2018 Tim Teulings
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 
24 
27 
28 namespace osmscout {
34  struct OSMSCOUT_API GPSUpdateMessage CLASS_FINAL : public NavigationMessage
35  {
36  const GeoCoord currentPosition;
37  const double currentSpeed;
38  const Distance horizontalAccuracy;
39 
46  GPSUpdateMessage(const Timestamp& timestamp,
47  const GeoCoord& currentPosition,
48  double currentSpeed,
49  const Distance &horizontalAccuracy);
50  };
51 
52  /*
53  struct OSMSCOUT_API StreetChangedMessage CLASS_FINAL : public NavigationMessage
54  {
55  const std::string name;
56 
57  StreetChangedMessage(const Timestamp& timestamp,
58  const std::string& name);
59  };
60 
61  class OSMSCOUT_API CurrentStreetAgent CLASS_FINAL : public NavigationAgent
62  {
63  private:
64  LocationDescriptionServiceRef locationDescriptionService;
65 
66  GeoCoord currentPosition;
67  Timestamp lastCheckTime;
68  std::string lastStreetName;
69 
70  private:
71  std::string GetStreetName() const;
72 
73  public:
74  explicit CurrentStreetAgent(const LocationDescriptionServiceRef& locationDescriptionService);
75  std::list<NavigationMessageRef> Process(const NavigationMessageRef& message) override;
76  };
77  */
78 
84  struct OSMSCOUT_API RouteUpdateMessage CLASS_FINAL : public NavigationMessage
85  {
88 
89  RouteUpdateMessage(const Timestamp& timestamp,
90  const RouteDescriptionRef &routeDescription,
91  const osmscout::Vehicle &vehicle);
92  };
93 
94 }
95 
96 #endif
std::chrono::system_clock::time_point Timestamp
Definition: Time.h:27
Definition: Area.h:86
osmscout::Vehicle vehicle
Definition: Agents.h:87
Vehicle
Definition: OSMScoutTypes.h:55
Definition: Area.h:38
#define CLASS_FINAL
Definition: Compiler.h:26
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
const RouteDescriptionRef routeDescription
Definition: Agents.h:86
std::shared_ptr< RouteDescription > RouteDescriptionRef
Definition: RouteDescription.h:814
const Distance horizontalAccuracy
Definition: Agents.h:38
const double currentSpeed
Definition: Agents.h:37
const GeoCoord currentPosition
Definition: Agents.h:36
Definition: Engine.h:48