1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | /*!
|
---|
6 | * \file Map.h
|
---|
7 | * \brief Class displaying a GPS map on the ground station
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2013/07/23
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef MAP_H
|
---|
14 | #define MAP_H
|
---|
15 |
|
---|
16 | #include <SendData.h>
|
---|
17 | #include <stdint.h>
|
---|
18 |
|
---|
19 | namespace flair
|
---|
20 | {
|
---|
21 | namespace core
|
---|
22 | {
|
---|
23 | class GeoCoordinate;
|
---|
24 | }
|
---|
25 |
|
---|
26 | namespace gui
|
---|
27 | {
|
---|
28 |
|
---|
29 | class LayoutPosition;
|
---|
30 |
|
---|
31 | /*! \class Map
|
---|
32 | *
|
---|
33 | * \brief Class displaying a GPS map on the ground station
|
---|
34 | *
|
---|
35 | */
|
---|
36 | class Map: public SendData
|
---|
37 | {
|
---|
38 | public:
|
---|
39 | /*!
|
---|
40 | * \brief Constructor
|
---|
41 | *
|
---|
42 | * Construct a map at given position. \n
|
---|
43 | * The Map will automatically be child of position->getLayout() Layout. After calling this constructor,
|
---|
44 | * position will be deleted as it is no longer usefull.
|
---|
45 | *
|
---|
46 | * \param position position to draw map
|
---|
47 | * \param name name
|
---|
48 | */
|
---|
49 | Map(const LayoutPosition* position,std::string name);
|
---|
50 |
|
---|
51 | /*!
|
---|
52 | * \brief Destructor
|
---|
53 | *
|
---|
54 | */
|
---|
55 | ~Map();
|
---|
56 |
|
---|
57 | /*!
|
---|
58 | * \brief Add a point to the map
|
---|
59 | *
|
---|
60 | * \param point point to draw
|
---|
61 | * \param name name
|
---|
62 | */
|
---|
63 | void AddPoint(const core::GeoCoordinate* point,std::string name="");
|
---|
64 |
|
---|
65 | /*!
|
---|
66 | * \brief Copy datas to specified buffer
|
---|
67 | *
|
---|
68 | * Reimplemented from SendData.
|
---|
69 | *
|
---|
70 | * \param buf output buffer
|
---|
71 | */
|
---|
72 | void CopyDatas(char* buf) const;
|
---|
73 |
|
---|
74 | private:
|
---|
75 | /*!
|
---|
76 | * \brief Extra Xml event
|
---|
77 | *
|
---|
78 | * Reimplemented from SendData.
|
---|
79 | */
|
---|
80 | void ExtraXmlEvent(void);
|
---|
81 |
|
---|
82 | std::vector<core::GeoCoordinate*> checkpoints;
|
---|
83 | std::vector<const core::GeoCoordinate*> to_draw;
|
---|
84 | //std::vector<xmlNodePtr> checkpoints_node;
|
---|
85 | //bool init;
|
---|
86 | };
|
---|
87 |
|
---|
88 | } // end namespace gui
|
---|
89 | } // end namespace flair
|
---|
90 |
|
---|
91 | #endif // MAP_H
|
---|