Mercurial > fife-parpg
annotate engine/core/util/structures/utilstructures.i @ 697:ecaa4d98f05f tip
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
* Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring.
* GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass.
* The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class.
* The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged.
* Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Sat, 18 Jun 2011 00:28:40 -1000 |
parents | 291ba2946c73 |
children |
rev | line source |
---|---|
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
1 /*************************************************************************** |
645
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
2 * Copyright (C) 2005-2010 by the FIFE team * |
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
3 * http://www.fifengine.net * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
4 * This file is part of FIFE. * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
5 * * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
6 * FIFE is free software; you can redistribute it and/or * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
8 * License as published by the Free Software Foundation; either * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
10 * * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
14 * Lesser General Public License for more details. * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
15 * * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
17 * License along with this library; if not, write to the * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
18 * Free Software Foundation, Inc., * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
20 ***************************************************************************/ |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
21 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
22 %{ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
23 #include "util/structures/point.h" |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 #include "util/structures/rect.h" |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
25 %} |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
26 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
27 namespace FIFE { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
28 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
29 template <typename T> class PointType2D { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
30 public: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
31 T x; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
32 T y; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
33 explicit PointType2D(T _x = 0, T _y = 0); |
645
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
34 PointType2D(const PointType2D<T>& rhs); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
35 PointType2D<T> operator+(const PointType2D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
36 PointType2D<T> operator-(const PointType2D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
37 PointType2D<T>& operator+=(const PointType2D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
38 PointType2D<T>& operator-=(const PointType2D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
39 PointType2D<T> operator*(const T& i) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
40 PointType2D<T> operator/(const T& i) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 bool operator==(const PointType2D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
42 bool operator!=(const PointType2D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
43 T length() const; |
645
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
44 void normalize(); |
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
45 void rotate(T angle); |
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
46 void rotate(const PointType2D<T>& origin, T angle); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
47 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
48 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
49 template<typename T> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
50 std::ostream& operator<<(std::ostream& os, const PointType2D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
51 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
52 typedef PointType2D<int> Point; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
53 typedef PointType2D<int> IntPoint; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
54 typedef PointType2D<double> DoublePoint; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
55 typedef PointType2D<int> IntPoint2D; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
56 typedef PointType2D<double> DoublePoint2D; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
57 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
58 %template(Point) PointType2D<int>; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
59 %template(DoublePoint) PointType2D<double>; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
60 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
61 template <typename T> class PointType3D { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
62 public: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
63 T x; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
64 T y; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
65 T z; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
66 explicit PointType3D(T _x = 0, T _y = 0, T _z = 0); |
645
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
67 PointType3D(const PointType3D<T>& rhs); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
68 PointType3D<T> operator+(const PointType3D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
69 PointType3D<T> operator-(const PointType3D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
70 PointType3D<T>& operator+=(const PointType3D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
71 PointType3D<T>& operator-=(const PointType3D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
72 PointType3D<T> operator*(const T& i) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
73 PointType3D<T> operator/(const T& i) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
74 bool operator==(const PointType3D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
75 bool operator!=(const PointType3D<T>& p) const; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
76 T length() const; |
645
291ba2946c73
* Added the ability to normalize a 2D and 3D point.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
622
diff
changeset
|
77 void normalize(); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
78 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
79 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
80 template<typename T> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
81 std::ostream& operator<<(std::ostream& os, const PointType3D<T>& p); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
82 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
83 typedef PointType3D<int> Point3D; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
84 typedef PointType3D<int> IntPoint3D; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
85 typedef PointType3D<double> DoublePoint3D; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
86 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
87 %template(Point3D) PointType3D<int>; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
88 %template(DoublePoint3D) PointType3D<double>; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
89 |
622
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
90 template <typename T> class RectType { |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
91 public: |
622
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
92 T x; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
93 T y; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
94 T w; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
95 T h; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
96 explicit RectType(T x = 0, T y = 0, T width = 0, T height = 0); |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
97 T right() const; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
98 T bottom() const; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
99 bool operator==(const RectType<T>& rect ) const; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
100 bool contains( const PointType2D<T>& point ) const; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
101 bool intersects( const RectType<T>& rect ) const; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
102 bool intersectInplace( const RectType<T>& rect ); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
103 }; |
622
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
104 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
105 template<typename T> |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
106 std::ostream& operator<<(std::ostream&, const RectType<T>&); |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
107 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
108 typedef RectType<int> Rect; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
109 typedef RectType<float> FloatRect; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
110 typedef RectType<double> DoubleRect; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
111 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
112 %template(Rect) RectType<int>; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
113 %template(FloatRect) RectType<float>; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
114 %template(DoubleRect) RectType<double>; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
115 } |