OSDN Git Service

6998b0ed6b7d0d48a2dad9b32bcbc1b90b09c8cb
[gvonavish/GVONavish.git] / GVONavish / GVONavish / GVOShipRoute.h
1 #pragma once
2 #include <deque>
3 #include "GVONormalizedPoint.h"
4
5 //!@brief \8dq\98H
6 class GVOShipRoute {
7 public:
8         typedef std::deque<GVONormalizedPoint> Line;
9         typedef std::deque<Line> Lines;
10 private:
11         Lines m_lines;
12         bool m_favorite = false;
13         bool m_hilight = false;
14
15 public:
16         GVOShipRoute();
17         ~GVOShipRoute();
18
19         void addRoutePoint( const GVONormalizedPoint & point );
20
21         const Lines & getLines() const
22         {
23                 return m_lines;
24         }
25
26         bool isFavorite() const
27         {
28                 return m_favorite;
29         }
30
31         void setFavorite( bool favorite )
32         {
33                 m_favorite = favorite;
34         }
35
36         bool isHilight() const
37         {
38                 return m_hilight;
39         }
40
41         void setHilight( bool hilight )
42         {
43                 m_hilight = hilight;
44         }
45
46         //!@brief srcRoute\82Ì\95Û\8e\9d\82·\82é\8dq\98H\82ð\91S\82Ä\91O\82É\98A\8c\8b\82·\82é\81B
47         void jointPreviousLinesWithRoute( const GVOShipRoute & srcRoute );
48
49         bool isEmptyRoute() const
50         {
51                 if ( m_lines.empty() ) {
52                         return true;
53                 }
54
55                 // \82P\82Â\82Å\82à\93_\82ð\95Û\8e\9d\82µ\82Ä\82¢\82ê\82Î\8bó\8dq\98H\82Å\82Í\82È\82¢\82Æ\94»\92f\82·\82é
56                 for ( auto line : m_lines ) {
57                         if ( !line.empty() ) {
58                                 return false;
59                         }
60                 }
61                 return true;
62         }
63 private:
64 };