KOSMIndoorMap

routing/routingarea.h
1/*
2 SPDX-FileCopyrightText: 2024 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KOSMINDOORROUTING_ROUTINGAREA_H
7#define KOSMINDOORROUTING_ROUTINGAREA_H
8
9#include <QFlags>
10
11#include <cstdint>
12
13namespace KOSMIndoorRouting {
14
15/** Area types used for the routing engine
16 * This can be a maximum of 64 different values, with 0 and 63 having pre-defined meanings.
17 * Each area type can have a separate cost factor and routing flag assigned.
18 */
19enum class AreaType : uint8_t {
20 Unwalkable = 0, // RC_NULL_AREA
21 Stairs,
22 Elevator,
23 Escalator,
24 MovingWalkway,
25 TactilePaving,
26 StreetCrossing,
27 Ramp,
28 Room,
29 Walkable = 63, // RC_WALKABLE_AREA
30};
31
32constexpr inline int AREA_TYPE_COUNT = 10;
33
34/** Area flags used for routing profiles.
35 * There are 16 possible values, mapped to from AreaType.
36 */
37enum class AreaFlag : uint16_t {
38 NoFlag = 0,
39 Walkable = 1,
40 Stairs = 2,
41 Escalator = 4,
42 Elevator = 8,
43};
44
45Q_DECLARE_FLAGS(AreaFlags, AreaFlag)
46
47/** Flags for an area type. */
48[[nodiscard]] AreaFlags flagsForAreaType(AreaType area);
49
50}
51
52Q_DECLARE_OPERATORS_FOR_FLAGS(KOSMIndoorRouting::AreaFlags)
53
54#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.