| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Thrift::IDL::Document; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Thrift::IDL::Document |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Inherits from L. |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
|
12
|
|
|
|
|
|
|
|
|
13
|
6
|
|
|
6
|
|
36
|
use strict; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
213
|
|
|
14
|
6
|
|
|
6
|
|
34
|
use warnings; |
|
|
6
|
|
|
|
|
13
|
|
|
|
6
|
|
|
|
|
182
|
|
|
15
|
6
|
|
|
6
|
|
30
|
use base qw(Thrift::IDL::Base); |
|
|
6
|
|
|
|
|
10
|
|
|
|
6
|
|
|
|
|
3658
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(children headers)); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 children |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 headers |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Scalar accessors |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 services |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 comments |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 typedefs |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 enums |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 structs |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Returns array ref of children of named type |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 service_named ($name) |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 typedef_named ($name) |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 struct_named ($name) |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 object_named ($name) |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 object_full_named ($name) |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Returns object found in named array with given key value |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub services { |
|
53
|
11
|
|
|
11
|
1
|
605
|
my $self = shift; |
|
54
|
11
|
|
|
|
|
75
|
$self->children_of_type('Thrift::IDL::Service'); |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub service_named { |
|
58
|
4
|
|
|
4
|
1
|
5145
|
my ($self, $name) = @_; |
|
59
|
4
|
|
|
|
|
50
|
$self->array_search($name, 'services', 'name'); |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub comments { |
|
63
|
1
|
|
|
1
|
1
|
1568
|
my $self = shift; |
|
64
|
1
|
|
|
|
|
7
|
$self->children_of_type('Thrift::IDL::Comment'); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub typedefs { |
|
68
|
6
|
|
|
6
|
1
|
48
|
my $self = shift; |
|
69
|
6
|
|
|
|
|
30
|
$self->children_of_type('Thrift::IDL::TypeDef'); |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub typedef_named { |
|
73
|
1
|
|
|
1
|
1
|
1498
|
my ($self, $name) = @_; |
|
74
|
1
|
|
|
|
|
9
|
$self->array_search($name, 'typedefs', 'name'); |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub enums { |
|
78
|
6
|
|
|
6
|
1
|
669
|
my $self = shift; |
|
79
|
6
|
|
|
|
|
26
|
$self->children_of_type('Thrift::IDL::Enum'); |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub structs { |
|
83
|
7
|
|
|
7
|
1
|
245
|
my $self = shift; |
|
84
|
7
|
|
|
|
|
36
|
$self->children_of_type('Thrift::IDL::Struct'); |
|
85
|
|
|
|
|
|
|
} |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub struct_named { |
|
88
|
4
|
|
|
4
|
1
|
51270
|
my ($self, $name) = @_; |
|
89
|
4
|
|
|
|
|
32
|
$self->array_search($name, 'structs', 'name'); |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub objects { |
|
93
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
|
94
|
2
|
|
|
|
|
4
|
return [ @{ $self->structs }, @{ $self->typedefs }, @{ $self->services }, @{ $self->enums } ]; |
|
|
2
|
|
|
|
|
10
|
|
|
|
2
|
|
|
|
|
10
|
|
|
|
2
|
|
|
|
|
11
|
|
|
|
2
|
|
|
|
|
7
|
|
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub object_named { |
|
98
|
2
|
|
|
2
|
1
|
38
|
my ($self, $name) = @_; |
|
99
|
2
|
|
|
|
|
9
|
$self->array_search($name, 'objects', 'name'); |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub object_full_named { |
|
103
|
6
|
|
|
6
|
1
|
178
|
my ($self, $full_name) = @_; |
|
104
|
6
|
|
|
|
|
29
|
$self->array_search($full_name, 'objects', 'full_name'); |
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |