ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/IncFile.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/IncFile.pm (file contents):
Revision 1.1.4.1 by williamc, Thu Aug 17 15:59:22 2000 UTC vs.
Revision 1.4 by muzaffar, Fri Jan 14 17:36:42 2011 UTC

# Line 10 | Line 10
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)   :
13 > # filename()            : return the filename
14  
15   package ActiveDoc::IncFile;
16   require 5.004;
17 + use ActiveDoc::Parse;
18  
19 < sub new {
20 <        my $class=shift;
21 <        $self={};
22 <        bless $self, $class;
23 <        $self->{ObjectStore}=shift;
24 <        return $self;
25 < }
19 > sub new
20 >   {
21 >   my $class=shift;
22 >   $self={};
23 >   bless $self, $class;
24 >   $self->{ObjectStore}=shift;
25 >   return $self;
26 >   }
27 >
28 > sub filename()
29 >   {
30 >   my $self=shift;
31 >   @_ : $self->{filename} = shift
32 >      ? $self->{filename};
33 >   }
34  
35 < 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 < }
35 > 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines