Phoenix2D-Library  0.10
Flag.h
Go to the documentation of this file.
1 /*
2  * Phoenix2D (RoboCup Soccer Simulation 2D League)
3  * Copyright (c) 2013 Ivan Gonzalez
4  *
5  * This file is part of Phoenix2D.
6  *
7  * Phoenix2D is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Phoenix2D is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Phoenix2D. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef FLAG_H_
22 #define FLAG_H_
23 
24 #include <string>
25 #include <map>
26 
30 namespace Phoenix
31 {
36 struct _coordinate {
37  double x;
38  double y;
39 };
40 
45 class Flag {
46  std::string name;
47  double distance;
48  double direction;
49  double x;
50  double y;
51  double minDistance;
52  double maxDistance;
53  double error;
55  static std::map<std::string, _coordinate> FIELD;
56 public:
57  Flag(std::string name, std::string position, int simulation_time);
58  ~Flag();
59  static void initializeField();
60  std::string getName();
61  double getDistance();
62  double getDirection();
63  double getX();
64  double getY();
65  double getMinDistance();
66  double getMaxDistance();
67  double getError();
68 };
69 } // End namespace Phoenix
72 #endif /* FLAG_H_ */
double getDistance()
Definition: Flag.cpp:128
double error
Definition: Flag.h:53
double getError()
Definition: Flag.cpp:152
_coordinate The Coordinate is just a holder for coordinates
Definition: Flag.h:36
static void initializeField()
Definition: Flag.cpp:66
std::string getName()
Definition: Flag.cpp:124
double minDistance
Definition: Flag.h:51
double getY()
Definition: Flag.cpp:140
double distance
Definition: Flag.h:47
double getDirection()
Definition: Flag.cpp:132
std::string name
Definition: Flag.h:46
double y
Definition: Flag.h:50
double direction
Definition: Flag.h:48
int simulation_time
Definition: Flag.h:54
double getX()
Definition: Flag.cpp:136
Flag The Flag lorem Ipsum
Definition: Flag.h:45
Flag(std::string name, std::string position, int simulation_time)
Definition: Flag.cpp:40
static std::map< std::string, _coordinate > FIELD
Definition: Flag.h:55
double maxDistance
Definition: Flag.h:52
double getMinDistance()
Definition: Flag.cpp:144
double getMaxDistance()
Definition: Flag.cpp:148
double x
Definition: Flag.h:49