line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::NASA_Ames::FFI1010; |
2
|
1
|
|
|
1
|
|
37357
|
use base qw(Text::NASA_Ames); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
703
|
|
3
|
1
|
|
|
1
|
|
7
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
20
|
use 5.00600; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
493
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf " %d." . "%02d" x $#r, @r }; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Text::NASA_Ames::FFI1010 - Implementation of FFI1010 NASA_Ames format |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This class should normally not be called directly but through the |
21
|
|
|
|
|
|
|
L class indirectly. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 PUBLIC METHODS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=over 4 |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=item new (Text::NASA_Ames-object || options for new NASA_Ames) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
parses the (rest of the) header (body and comments) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new { |
34
|
2
|
|
|
2
|
1
|
4
|
my ($class, $fileObj) = @_; |
35
|
2
|
|
33
|
|
|
10
|
$class = ref $class || $class; |
36
|
2
|
50
|
33
|
|
|
13
|
if (! (ref $fileObj && (ref($fileObj) eq 'Text::NASA_Ames'))) { |
37
|
0
|
|
|
|
|
0
|
return new Text::NASA_Ames($fileObj); |
38
|
|
|
|
|
|
|
} |
39
|
2
|
|
|
|
|
4
|
my $self = $fileObj; |
40
|
2
|
|
|
|
|
4
|
bless $self, $class; |
41
|
|
|
|
|
|
|
|
42
|
2
|
|
|
|
|
11
|
$self->_parseList('dX', $self->nIV); |
43
|
2
|
|
|
|
|
26
|
$self->_parseLines('xName', $self->nIV); |
44
|
2
|
|
|
|
|
35
|
$self->_parseVDeclaration; |
45
|
2
|
|
|
|
|
109
|
$self->_parseAuxDeclaration; |
46
|
2
|
|
|
|
|
40
|
$self->_parseTailHeader; |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
29
|
return $self; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub _refillBuffer { |
52
|
20
|
|
|
20
|
|
25
|
my $self = shift; |
53
|
|
|
|
|
|
|
|
54
|
20
|
|
|
|
|
45
|
my $line = $self->nextLine; |
55
|
20
|
100
|
|
|
|
49
|
return unless defined $line; |
56
|
|
|
|
|
|
|
|
57
|
19
|
|
|
|
|
54
|
my ($x, @a) = split ' ', $line; |
58
|
19
|
50
|
|
|
|
55
|
if (@a != $self->nAuxV) { |
59
|
0
|
|
|
|
|
0
|
$self->_carp("not enough elements for Aux, expected ". |
60
|
|
|
|
|
|
|
$self->nAuxV() . ", got ". scalar @a); |
61
|
0
|
|
|
|
|
0
|
return; |
62
|
|
|
|
|
|
|
} |
63
|
19
|
50
|
|
|
|
282
|
$self->_cleanAndScaleVals($self->aMiss, $self->aScal, \@a) |
64
|
|
|
|
|
|
|
if $self->nAuxV > 0; |
65
|
|
|
|
|
|
|
|
66
|
19
|
|
|
|
|
30
|
my @v; |
67
|
19
|
50
|
|
|
|
52
|
if ($self->nV > 0) { |
68
|
19
|
|
|
|
|
192
|
$line = $self->nextLine; |
69
|
19
|
50
|
|
|
|
77
|
return unless defined $line; |
70
|
19
|
|
|
|
|
62
|
@v = split ' ', $line; |
71
|
19
|
50
|
|
|
|
56
|
if (@v != $self->nV) { |
72
|
0
|
|
|
|
|
0
|
$self->_carp("not enough elements for V, expected ". |
73
|
|
|
|
|
|
|
$self->nV() . ", got ". scalar @v); |
74
|
0
|
|
|
|
|
0
|
return; |
75
|
|
|
|
|
|
|
} |
76
|
19
|
|
|
|
|
199
|
$self->_cleanAndScaleVals($self->vMiss, $self->vScal, \@v); |
77
|
|
|
|
|
|
|
} |
78
|
19
|
|
|
|
|
34
|
push @{ $self->dataBuffer }, new Text::NASA_Ames::DataEntry({X => [$x], |
|
19
|
|
|
|
|
45
|
|
79
|
|
|
|
|
|
|
V => \@v, |
80
|
|
|
|
|
|
|
A => \@a}); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
84
|
|
|
|
|
|
|
__END__ |