aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/r_use_isnull.i
blob: 03b4c15a73c2db3dbc8389c2932308cb39355fe8 (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
%module r_use_isnull

%inline %{
// C++ code
class circle {
public:
circle(double radius)
{
m_radius = radius;
}
double getArea() const
{
return (3.14 * m_radius * m_radius);
}

private:
double m_radius;
};

class pointerTest {
public:
pointerTest() : m_circle(2) {}
const circle * getCircle(int index) const {
if (index == 0)
return & m_circle;
else
return 0;
}

private:
    circle m_circle;

};
 %}