forked from osmandapp/OsmAnd-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.swig
97 lines (83 loc) · 2.76 KB
/
core.swig
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%module OsmAndCore
%{
// Common
#include <OsmAndCore.h>
#include <OsmAndCore/Utilities.h>
#include <OsmAndCore/EmbeddedResources.h>
#include <OsmAndCore/CommonTypes.h>
// Map-related
#include <OsmAndCore/Map/IMapTileProvider.h>
#include <OsmAndCore/Map/IMapBitmapTileProvider.h>
#include <OsmAndCore/Map/IMapElevationDataProvider.h>
#include <OsmAndCore/Map/IMapRenderer.h>
#include <OsmAndCore/Map/HeightmapTileProvider.h>
//#include <OsmAndCore/Map/HillshadeTileProvider.h>
#include <OsmAndCore/Map/OnlineMapRasterTileProvider.h>
//#include <OsmAndCore/Map/MapStyles.h>
//#include <OsmAndCore/Map/MapStyle.h>
// Routing-related
#include <OsmAndCore/Routing/RoutingConfiguration.h>
#include <OsmAndCore/Routing/RoutingProfile.h>
#include <OsmAndCore/Routing/RoutePlanner.h>
#include <OsmAndCore/Routing/RoutePlannerContext.h>
// To omit 'OsmAnd::' prefixes inside namespace itself, use that namespace
using namespace OsmAnd;
%}
%include <typemaps.i>
%include <stdint.i>
%include <std_shared_ptr.i>
%include <std_pair.i>
%include <std_string.i>
%include <swig/qstring.i>
%shared_ptr(OsmAnd::Model::Road)
%shared_ptr(OsmAnd::RoutingConfiguration)
%shared_ptr(OsmAnd::RoutingProfileContext)
%shared_ptr(OsmAnd::RoutingRuleset)
%shared_ptr(OsmAnd::IMapTileProvider)
%shared_ptr(OsmAnd::IMapBitmapTileProvider)
%shared_ptr(OsmAnd::IMapElevationDataProvider)
%shared_ptr(OsmAnd::HeightmapTileProvider)
%shared_ptr(OsmAnd::OnlineMapRasterTileProvider)
template <class T>
class QList {
public:
QList();
~QList();
int length() const;
void append(const T &elem);
void prepend(const T &elem);
bool isEmpty() const;
bool contains(const T &value) const;
T first() const;
T last() const;
void removeAt(int i);
};
%extend QList {
T at(int i) const{
return $self->value(i);
}
};
%apply QString { std::string };
// Common
%include "OsmAndCore.h"
%include "OsmAndCore/Utilities.h"
%include "OsmAndCore/EmbeddedResources.h"
%include "OsmAndCore/CommonTypes.h"
// Map-related
%include "OsmAndCore/Map/IMapTileProvider.h"
%include "OsmAndCore/Map/IMapBitmapTileProvider.h"
%include "OsmAndCore/Map/IMapElevationDataProvider.h"
%include "OsmAndCore/Map/IMapRenderer.h"
%include "OsmAndCore/Map/HeightmapTileProvider.h"
//%include "OsmAndCore/Map/HillshadeTileProvider.h"
%include "OsmAndCore/Map/OnlineMapRasterTileProvider.h"
//%include "OsmAndCore/Map/MapStyles.h"
//%include "OsmAndCore/Map/MapStyle.h"
// Routing-related
%include "OsmAndCore/Routing/RoutingConfiguration.h"
%include "OsmAndCore/Routing/RoutingProfile.h"
%include "OsmAndCore/Routing/RoutePlanner.h"
%include "OsmAndCore/Routing/RoutePlannerContext.h"
%include "OsmAndCore/IQueryController.h"
%template(PairDoubleList) QList<std::pair<double, double> >;
%template(PairDouble) std::pair<double, double>;