]> granicus.if.org Git - python/commitdiff
Add support for a filename to record the name of the node in which the
authorFred Drake <fdrake@acm.org>
Sat, 9 Sep 2000 05:53:41 +0000 (05:53 +0000)
committerFred Drake <fdrake@acm.org>
Sat, 9 Sep 2000 05:53:41 +0000 (05:53 +0000)
table will be presented.  Accessor methods are used to access the
attribute.

Doc/perl/SynopsisTable.pm

index fb063d4a8b09171170183a790bb93ff9e44e12a6..6a03dd2866c35d4ab0075c38a79893e9aabdaa88 100644 (file)
@@ -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;