comparison engine/swigwrappers/python/extensions.i.templ @ 0:4a0efb7baf70

* Datasets becomes the new trunk and retires after that :-)
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 29 Jun 2008 18:44:17 +0000
parents
children c0c3f64bfc2d
comparison
equal deleted inserted replaced
-1:000000000000 0:4a0efb7baf70
1 namespace FIFE {
2
3 %extend PointType2D<int> {
4 int getX() { return $self->x; }
5 int getY() { return $self->y; }
6 void setX(int _x) { $self->x = _x; }
7 void setY(int _y) { $self->y = _y; }
8
9 std::string __str__() {
10 std::stringstream str;
11 str << "Point" << *$self;
12 return str.str();
13 }
14 };
15
16 %extend PointType2D<double> {
17 double getX() { return $self->x; }
18 double getY() { return $self->y; }
19 void setX(double _x) { $self->x = _x; }
20 void setY(double _y) { $self->y = _y; }
21
22 std::string __str__() {
23 std::stringstream str;
24 str << "DoublePoint" << *$self;
25 return str.str();
26 }
27 };
28
29 %extend PointType3D<int> {
30 std::string __str__() {
31 std::stringstream str;
32 str << "Point3D" << *$self;
33 return str.str();
34 }
35 };
36
37 %extend PointType3D<double> {
38 std::string __str__() {
39 std::stringstream str;
40 str << "DoublePoint3D" << *$self;
41 return str.str();
42 }
43 };
44
45 %extend Rect {
46 int getX() { return $self->x; }
47 int getY() { return $self->y; }
48 void setX(int _x) { $self->x = _x; }
49 void setY(int _y) { $self->y = _y; }
50
51 int getW() { return $self->w; }
52 int getH() { return $self->h; }
53 void setW(int _w) { $self->w = _w; }
54 void setH(int _h) { $self->h = _h; }
55
56 std::string __str__() {
57 std::stringstream str;
58 str << "Rect" << *$self;
59 return str.str();
60 }
61 };
62 }