line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2011-2022 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
15
|
|
211
|
use v5.26; |
|
15
|
|
|
|
|
54
|
|
7
|
15
|
|
|
15
|
|
94
|
use Object::Pad 0.70 ':experimental(adjust_params)'; |
|
15
|
|
|
|
|
187
|
|
|
15
|
|
|
|
|
75
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Tangence::Meta::Event 0.30; |
10
|
|
|
|
|
|
|
class Tangence::Meta::Event :strict(params); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
C - structure representing one C event |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This data structure object stores information about one L class |
19
|
|
|
|
|
|
|
event. Once constructed, such objects are immutable. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 new |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$event = Tangence::Meta::Event->new( %args ) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Returns a new instance initialised by the given arguments. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=over 8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item class => Tangence::Meta::Class |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Reference to the containing class |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item name => STRING |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Name of the event |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item arguments => ARRAY |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Optional ARRAY reference containing arguments as |
46
|
|
|
|
|
|
|
L references. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=back |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
1
|
1
|
850
|
field $class :param :weak :reader; |
|
1
|
|
|
|
|
5
|
|
53
|
4
|
|
|
4
|
1
|
1062
|
field $name :param :reader; |
|
4
|
|
|
|
|
31
|
|
54
|
|
|
|
|
|
|
field @arguments; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
ADJUST :params ( |
57
|
|
|
|
|
|
|
:$arguments = undef, |
58
|
|
|
|
|
|
|
) { |
59
|
|
|
|
|
|
|
@arguments = $arguments->@* if $arguments; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 ACCESSORS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 class |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$class = $event->class |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Returns the class the event is a member of |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 name |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
$name = $event->name |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Returns the name of the class |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 arguments |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
@arguments = $event->arguments |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Return the arguments in a list of L references. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
29
|
|
|
29
|
1
|
99
|
method arguments { @arguments } |
|
29
|
|
|
|
|
84
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 argtypes |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
@argtypes = $event->argtypes |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Return the argument types in a list of strings. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
method argtypes |
101
|
8
|
|
|
8
|
1
|
30
|
{ |
102
|
8
|
|
|
|
|
23
|
return map { $_->type } @arguments; |
|
15
|
|
|
|
|
40
|
|
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Paul Evans |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
0x55AA; |