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.
This commit is contained in:
Fred Drake 2000-09-09 05:53:41 +00:00
parent 1b194f927d
commit 75c6cb909c
1 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,7 @@
package SynopsisTable; package SynopsisTable;
sub new{ sub new{
return bless {names=>'', info=>{}}; return bless {names=>'', info=>{}, file=>''};
} }
sub declare{ sub declare{
@ -15,6 +15,20 @@ sub declare{
$self->{info}{$name} = "$key,$type,"; $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{ sub set_synopsis{
my($self,$name,$synopsis) = @_; my($self,$name,$synopsis) = @_;
my($key,$type,$unused) = split ',', $self->{info}{$name}, 3; my($key,$type,$unused) = split ',', $self->{info}{$name}, 3;