blob: cfb32ad1f36ee03fab601249fbfe3977fba2dbe4 (
plain)
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
|
// $Id$
#ifndef __NAVUNIT_H
#define __NAVUNIT_H
#include "ace/SString.h"
class UnitLocation
{
public:
UnitLocation() {x_ = y_ = 0.0;}
UnitLocation(
double x,
double y) :
x_(x), y_(y) {}
UnitLocation(const UnitLocation &ul) { operator = (ul); }
public:
UnitLocation & operator = (const UnitLocation &ul)
{
x_ = ul.x_;
y_ = ul.y_;
return *this;
}
public:
double x_, y_;
};
typedef unsigned long UnitID;
class NavUnit
{
public:
NavUnit(const UnitID &id);
NavUnit(const NavUnit&);
virtual ~NavUnit() {}
public:
UnitID getID() const {return id_;}
UnitLocation getLocation() const {return loc_;}
void setLocation(const UnitLocation &loc) {loc_ = loc;}
protected:
UnitID id_;
UnitLocation loc_;
};
#endif // __NAVUNIT_H
|