ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/IncFile.pm
Revision: 1.2
Committed: Mon Aug 28 07:43:21 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: V1_0_3-p4, V1_0_3-p3, V1_0_3-p2, before110xmlBRmerge, V1_0_4p1, V1_0_3-p1, V1_0_3, V1_0_2, V1_0_2_p1, v102p1, V1_0_1, V1_0_0, V1_pre0, SCRAM_V1, SCRAMV1_IMPORT, V0_19_7, V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V_18_3_TEST, VO_18_3, V0_18_2, V0_18_1
Branch point for: v103_with_xml, v103_branch, V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.1: +3 -3 lines
Log Message:
merge from HPWbranch

File Contents

# User Rev Content
1 williamc 1.1 #
2     # IncFile.pm
3     #
4     # Originally Written by Christopher Williams
5     #
6     # Description
7     # -----------
8 williamc 1.2 # Private Class for PreProcessedFile
9 williamc 1.1 #
10     # Interface
11     # ---------
12 williamc 1.2 # new(dbstore) : A new IncFile object
13 williamc 1.1 # startline() : return the line in the original file of the included file
14     # endline() : return the last line in the original file of the included file
15     # lines() : return the number of lines in the included file
16     # file() : return the ProcessedFileobject ObjectStore lookup ID
17     # init(ProcessedFile_ID, startline, endline,lines, sequencenumber)
18     # : setup the vars
19     # lastsequence() : retunr the sequence number
20     # store(fh) :
21     # restore(fh) :
22    
23 williamc 1.2 package ActiveDoc::IncFile;
24 williamc 1.1 require 5.004;
25    
26     sub new {
27     my $class=shift;
28     $self={};
29     bless $self, $class;
30     $self->{ObjectStore}=shift;
31     return $self;
32     }
33    
34     sub startline {
35     my $self=shift;
36     return $self->{start};
37     }
38     sub endline {
39     my $self=shift;
40     return $self->{end};
41     }
42     sub lines {
43     my $self=shift;
44     return $self->{lines};
45     }
46    
47     sub lastsequence {
48     my $self=shift;
49     return $self->{sn};
50     }
51    
52     sub file {
53     my $self=shift;
54     return $self->{fileid};
55     }
56    
57     sub init {
58     my $self=shift;
59     $self->{fileid}=shift;
60     $self->{start}=shift;
61     $self->{end}=shift;
62     $self->{lines}=shift;
63     $self->{sn}=shift;
64     }
65    
66     sub store {
67     my $self=shift;
68     my $fh=shift;
69     print $fh $self->{start}."\n";
70     print $fh $self->{end}."\n";
71     print $fh $self->{lines}."\n";
72     print $fh $self->{fileid}."\n";
73     print $fh $self->{sn}."\n";
74     print $fh "\n";
75    
76     }
77    
78     sub restore {
79     my $self=shift;
80     my $fh=shift;
81     $self->{start}=<$fh>;
82     chomp $self->{start};
83     $self->{end}=<$fh>;
84     chomp $self->{end};
85     $self->{lines}=<$fh>;
86     chomp $self->{lines};
87     $self->{fileid}=<$fh>;
88     chomp $self->{fileid};
89     $self->{sn}=<$fh>;
90     chomp $self->{sn};
91     }