line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
struct TimezoneRecipe05: public panda::Refcnt { |
6
|
|
|
|
|
|
|
const char* get_name() const { return name.c_str(); } |
7
|
|
|
|
|
|
|
TimezoneRecipe05(const char* name_): name{name_} { } |
8
|
|
|
|
|
|
|
~TimezoneRecipe05() { std::cout << "~TimezoneRecipe05()\n"; } |
9
|
|
|
|
|
|
|
private: |
10
|
|
|
|
|
|
|
std::string name; |
11
|
|
|
|
|
|
|
}; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
using TimezoneRecipe05SP = panda::iptr; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
struct DateRecipe05 { |
16
|
|
|
|
|
|
|
DateRecipe05() { update() ; } |
17
|
|
|
|
|
|
|
void update() { epoch = std::time(nullptr); } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
int get_epoch() const { return epoch; } |
20
|
|
|
|
|
|
|
void set_timezone(TimezoneRecipe05SP tz_) { tz = tz_; } |
21
|
|
|
|
|
|
|
TimezoneRecipe05SP get_timezone() { return tz; } |
22
|
|
|
|
|
|
|
private: |
23
|
|
|
|
|
|
|
std::time_t epoch; |
24
|
|
|
|
|
|
|
TimezoneRecipe05SP tz; |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
namespace xs { |
29
|
|
|
|
|
|
|
template <> |
30
|
|
|
|
|
|
|
struct Typemap : TypemapObject { |
31
|
|
|
|
|
|
|
static std::string package () { return "MyTest::Cookbook::TimezoneRecipe05"; } |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
namespace xs { |
36
|
|
|
|
|
|
|
template <> |
37
|
|
|
|
|
|
|
struct Typemap : TypemapObject { |
38
|
|
|
|
|
|
|
static std::string package () { return "MyTest::Cookbook::DateRecipe05"; } |
39
|
|
|
|
|
|
|
}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::TimezoneRecipe05 |
44
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
const char* TimezoneRecipe05::get_name() { RETVAL = THIS->get_name(); } |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
TimezoneRecipe05SP create(const char* name) { RETVAL = TimezoneRecipe05SP(new TimezoneRecipe05(name)); } |
49
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
50
|
|
|
|
|
|
|
MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::DateRecipe05 |
51
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
DateRecipe05* DateRecipe05::new() { RETVAL = new DateRecipe05(); } |
54
|
0
|
0
|
|
|
|
|
|
55
|
0
|
0
|
|
|
|
|
void DateRecipe05::update() |
|
|
0
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
std::time_t DateRecipe05::get_epoch() |
58
|
0
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
TimezoneRecipe05SP DateRecipe05::get_timezone() |
60
|
0
|
0
|
|
|
|
|
|
61
|
0
|
0
|
|
|
|
|
void DateRecipe05::set_timezone(TimezoneRecipe05SP tz) |