ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/IncFile.pm
Revision: 1.1.4.1
Committed: Thu Aug 17 15:59:22 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: HPWbranch
CVS Tags: BuildSystemProto1, V0_18_0, V0_18_0model, V0_17_1, V0_18_0alpha, V0_17_0, V0_16_4, V0_16_3, V0_16_2, V0_16_1, V0_16_0, V0_15_1, V0_15_0, V0_15_0beta
Branch point for: V0_17branch, V0_16branch, V0_15branch
Changes since 1.1: +3 -3 lines
Log Message:
Integrated to simpledoc from dev

File Contents

# Content
1 #
2 # IncFile.pm
3 #
4 # Originally Written by Christopher Williams
5 #
6 # Description
7 # -----------
8 # Private Class for PreProcessedFile
9 #
10 # Interface
11 # ---------
12 # new(dbstore) : A new IncFile object
13 # 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 package ActiveDoc::IncFile;
24 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 }