line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
struct PointRecipe13: public panda::Refcnt { |
7
|
|
|
|
|
|
|
double x; |
8
|
|
|
|
|
|
|
double y; |
9
|
|
|
|
|
|
|
PointRecipe13(double xx, double yy): x{xx}, y{yy}{} |
10
|
|
|
|
|
|
|
}; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
using PointRecipe13SP = panda::iptr; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
struct Shape13: public panda::Refcnt { |
15
|
|
|
|
|
|
|
size_t point_count() const { return points.size(); } |
16
|
|
|
|
|
|
|
PointRecipe13SP get_point(size_t idx) { return points.at(idx); } |
17
|
|
|
|
|
|
|
void add_point(PointRecipe13SP pt) { points.push_back(pt); } |
18
|
|
|
|
|
|
|
private: |
19
|
|
|
|
|
|
|
std::vector points; |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
namespace xs { |
23
|
|
|
|
|
|
|
template <> |
24
|
|
|
|
|
|
|
struct Typemap : TypemapObject { |
25
|
|
|
|
|
|
|
static std::string package () { return "MyTest::Cookbook::PointRecipe13"; } |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
template <> |
29
|
|
|
|
|
|
|
struct Typemap : TypemapObject { |
30
|
|
|
|
|
|
|
static std::string package () { return "MyTest::Cookbook::Shape13"; } |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::PointRecipe13 |
35
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
double PointRecipe13::x(SV* new_val = nullptr) : ALIAS(y = 1) { |
38
|
0
|
|
|
|
|
|
double* val = nullptr; |
39
|
0
|
0
|
|
|
|
|
switch(ix) { |
40
|
0
|
|
|
|
|
|
case 1: val = &THIS->y; break; |
41
|
0
|
|
|
|
|
|
default: val = &THIS->x; break; |
42
|
|
|
|
|
|
|
} |
43
|
0
|
0
|
|
|
|
|
if (new_val) { |
44
|
0
|
0
|
|
|
|
|
*val = SvNV(new_val); |
|
|
0
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} |
46
|
0
|
|
|
|
|
|
RETVAL = *val; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
PointRecipe13* PointRecipe13::new(double x = 0, double y = 0) { |
50
|
0
|
|
|
|
|
|
RETVAL = make_backref(x, y); |
51
|
0
|
0
|
|
|
|
|
//RETVAL = new PointRecipe13(x, y); |
52
|
0
|
0
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Shape13 |
55
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
size_t Shape13::point_count() |
58
|
|
|
|
|
|
|
|
59
|
0
|
0
|
|
|
|
|
void Shape13::add_point(PointRecipe13SP pt) |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
PointRecipe13SP Shape13::get_point(size_t idx) |
62
|
0
|
0
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
Shape13* Shape13::new(...) |