line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OPC::Part; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
6
|
1
|
|
|
1
|
|
7
|
use base 'OPC::Node'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
273
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
0
|
|
my( $Class, %NodeParams ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
my $Node = OPC::Node->new( %NodeParams ); |
12
|
0
|
|
|
|
|
|
my $PartName = $Node->Name; |
13
|
0
|
0
|
|
|
|
|
unless( $Node->Package->HasPart( $PartName )) { |
14
|
0
|
|
|
|
|
|
Carp::confess "Part '$PartName' doesn't exist"; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
return bless $Node, $Class; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub Content { |
21
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
22
|
0
|
|
|
|
|
|
return $self->Package->PartContents( $self->Name ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub SetContent { |
26
|
0
|
|
|
0
|
0
|
|
my ($self, $NewContents) = @_; |
27
|
0
|
|
|
|
|
|
$self->Package->SetContents( $self->Name, $NewContents ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub PhysicalName { |
31
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
return $self->Package->PhysicalNameByPartName( $self->Name ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |