git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
30 lines
456 B
OpenEdge ABL
30 lines
456 B
OpenEdge ABL
/* File : template_classes.i */
|
|
/* Tests the use of one templated class within another */
|
|
|
|
%module template_classes
|
|
|
|
%inline %{
|
|
|
|
template <class T>
|
|
class Point {
|
|
public:
|
|
T getX() {return x;}
|
|
private:
|
|
T x;
|
|
};
|
|
|
|
template <class T>
|
|
class Rectangle {
|
|
public:
|
|
Point<T>& getPoint() {return point;}
|
|
void setPoint(Point<T>& value) {point = value;}
|
|
private:
|
|
Point<T> point;
|
|
};
|
|
|
|
%}
|
|
|
|
%template(PointInt) Point<int>;
|
|
%template(RectangleInt) Rectangle<int>;
|
|
|
|
|