libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout
include
osmscout
navigation
Engine.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_NAVIGATION_ENGINE_H
2
#define OSMSCOUT_NAVIGATION_ENGINE_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
23
#include <list>
24
#include <vector>
25
26
#include <
osmscout/GeoCoord.h
>
27
28
#include <
osmscout/util/String.h
>
29
30
namespace
osmscout
{
31
37
48
struct
OSMSCOUT_API
NavigationMessage
49
{
50
const
Timestamp
timestamp
;
51
52
explicit
NavigationMessage
(
const
Timestamp
&
timestamp
);
53
virtual
~NavigationMessage
() =
default
;
54
};
55
56
using
NavigationMessageRef
= std::shared_ptr<NavigationMessage>;
57
62
struct
OSMSCOUT_API
InitializeMessage
CLASS_FINAL
:
public
NavigationMessage
63
{
64
explicit
InitializeMessage
(
const
Timestamp
&
timestamp
);
65
};
66
73
struct
OSMSCOUT_API
TimeTickMessage
CLASS_FINAL
:
public
NavigationMessage
74
{
75
explicit
TimeTickMessage
(
const
Timestamp
&
timestamp
);
76
};
77
78
class
OSMSCOUT_API
NavigationAgent
79
{
80
public
:
81
virtual
~NavigationAgent
() =
default
;
82
83
virtual
std::list<NavigationMessageRef>
Process
(
const
NavigationMessageRef
& message) = 0;
84
};
85
86
using
NavigationAgentRef
= std::shared_ptr<NavigationAgent>;
87
88
class
OSMSCOUT_API
NavigationEngine
89
{
90
private
:
91
std::vector<NavigationAgentRef> agents;
92
93
public
:
94
explicit
NavigationEngine
(std::initializer_list<NavigationAgentRef> agents);
95
std::list<NavigationMessageRef>
Process
(
const
NavigationMessageRef
& message)
const
;
96
};
97
}
98
99
#endif
OSMSCOUT_API
#define OSMSCOUT_API
Definition
CoreImportExport.h:45
GeoCoord.h
String.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::InitializeMessage
InitializeMessage(const Timestamp ×tamp)
osmscout::CLASS_FINAL::TimeTickMessage
TimeTickMessage(const Timestamp ×tamp)
osmscout::NavigationAgent
Definition
Engine.h:79
osmscout::NavigationAgent::~NavigationAgent
virtual ~NavigationAgent()=default
osmscout::NavigationAgent::Process
virtual std::list< NavigationMessageRef > Process(const NavigationMessageRef &message)=0
osmscout::NavigationEngine::Process
std::list< NavigationMessageRef > Process(const NavigationMessageRef &message) const
osmscout::NavigationEngine::NavigationEngine
NavigationEngine(std::initializer_list< NavigationAgentRef > agents)
osmscout
Definition
Area.h:39
osmscout::Timestamp
std::chrono::system_clock::time_point Timestamp
Definition
Time.h:27
osmscout::NavigationAgentRef
std::shared_ptr< NavigationAgent > NavigationAgentRef
Definition
Engine.h:86
osmscout::NavigationMessageRef
std::shared_ptr< NavigationMessage > NavigationMessageRef
Definition
Engine.h:56
osmscout::NavigationMessage
Definition
Engine.h:49
osmscout::NavigationMessage::~NavigationMessage
virtual ~NavigationMessage()=default
osmscout::NavigationMessage::NavigationMessage
NavigationMessage(const Timestamp ×tamp)
osmscout::NavigationMessage::timestamp
const Timestamp timestamp
Definition
Engine.h:50
Generated by
1.17.0