From 75c6cb909c5832c36875015a5f9edb28d1977f32 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Sat, 9 Sep 2000 05:53:41 +0000 Subject: Add support for a filename to record the name of the node in which the table will be presented. Accessor methods are used to access the attribute. --- Doc/perl/SynopsisTable.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Doc/perl/SynopsisTable.pm b/Doc/perl/SynopsisTable.pm index fb063d4..6a03dd2 100644 --- a/Doc/perl/SynopsisTable.pm +++ b/Doc/perl/SynopsisTable.pm @@ -1,7 +1,7 @@ package SynopsisTable; sub new{ - return bless {names=>'', info=>{}}; + return bless {names=>'', info=>{}, file=>''}; } sub declare{ @@ -15,6 +15,20 @@ sub declare{ $self->{info}{$name} = "$key,$type,"; } +# The 'file' attribute is used to store the filename of the node in which +# the table will be presented; this assumes that each table will be presented +# only once, which works for the current use of this object. + +sub set_file{ + my($self, $filename) = @_; + $self->{file} = "$filename"; +} + +sub get_file{ + my $self = shift; + return $self->{file}; +} + sub set_synopsis{ my($self,$name,$synopsis) = @_; my($key,$type,$unused) = split ',', $self->{info}{$name}, 3; -- cgit v0.12