Phoenix2D-Library
0.10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
communications
Line.cpp
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
#include <sstream>
22
#include <cstdlib>
23
#include "
Line.h
"
24
namespace
Phoenix
25
{
26
Line::Line
(std::string name, std::string position,
int
simulation_time) {
27
this->name =
name
;
28
this->simulation_time =
simulation_time
;
29
std::stringstream ss(position);
30
std::string token;
31
std::getline(ss, token,
' '
);
32
distance
= atof(token.c_str());
33
std::getline(ss, token,
' '
);
34
direction
= atof(token.c_str());
35
}
36
37
Line::~Line
() {
38
39
}
40
41
std::string
Line::getName
() {
42
return
name
;
43
}
44
45
double
Line::getDistance
() {
46
return
distance
;
47
}
48
49
double
Line::getDirection
() {
50
return
direction
;
51
}
52
}
Phoenix::Line::simulation_time
int simulation_time
Definition:
Line.h:37
Phoenix::Line::getDirection
double getDirection()
Definition:
Line.cpp:49
Phoenix::Line::Line
Line(std::string name, std::string position, int simulation_time)
Definition:
Line.cpp:26
Phoenix::Line::name
std::string name
Definition:
Line.h:36
Phoenix::Line::getName
std::string getName()
Definition:
Line.cpp:41
Phoenix::Line::getDistance
double getDistance()
Definition:
Line.cpp:45
Phoenix::Line::direction
double direction
Definition:
Line.h:39
Phoenix::Line::~Line
~Line()
Definition:
Line.cpp:37
Line.h
Phoenix::Line::distance
double distance
Definition:
Line.h:38
Generated on Wed Mar 26 2014 18:16:41 for Phoenix2D-Library by
1.8.6