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-2021 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
15
|
|
148
|
use v5.26; |
|
15
|
|
|
|
|
44
|
|
7
|
15
|
|
|
15
|
|
74
|
use Object::Pad 0.51; |
|
15
|
|
|
|
|
164
|
|
|
15
|
|
|
|
|
62
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Tangence::Meta::Event 0.29; |
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
|
696
|
has $class :param :weak :reader; |
|
1
|
|
|
|
|
4
|
|
53
|
4
|
|
|
4
|
1
|
1036
|
has $name :param :reader; |
|
4
|
|
|
|
|
20
|
|
54
|
|
|
|
|
|
|
has @arguments; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
ADJUSTPARAMS ( $params ) |
57
|
|
|
|
|
|
|
{ |
58
|
|
|
|
|
|
|
exists $params->{arguments} and |
59
|
|
|
|
|
|
|
@arguments = @{ delete $params->{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
|
69
|
method arguments { @arguments } |
|
29
|
|
|
|
|
71
|
|
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
|
28
|
{ |
102
|
8
|
|
|
|
|
21
|
return map { $_->type } @arguments; |
|
15
|
|
|
|
|
45
|
|
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Paul Evans |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
0x55AA; |