diff options
author | Fred Drake <fdrake@acm.org> | 2000-09-09 05:53:41 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-09-09 05:53:41 (GMT) |
commit | 75c6cb909c5832c36875015a5f9edb28d1977f32 (patch) | |
tree | 2eadce03f2a4b06cb4825527ec86742a9f4f5d0d /Doc/perl/SynopsisTable.pm | |
parent | 1b194f927d88d4191b04cfd00eebc1ed8a430655 (diff) | |
download | cpython-75c6cb909c5832c36875015a5f9edb28d1977f32.zip cpython-75c6cb909c5832c36875015a5f9edb28d1977f32.tar.gz cpython-75c6cb909c5832c36875015a5f9edb28d1977f32.tar.bz2 |
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.
Diffstat (limited to 'Doc/perl/SynopsisTable.pm')
-rw-r--r-- | Doc/perl/SynopsisTable.pm | 16 |
1 files changed, 15 insertions, 1 deletions
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; |