From: Jan T. <de...@us...> - 2002-04-08 21:48:00
|
Update of /cvsroot/net-script/netscript2/src/tools/IPdoc In directory usw-pr-cvs1:/tmp/cvs-serv9166 Modified Files: Class.pm IPdoc.pm Sub.pm Log Message: * minor bugfixes Index: Class.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/Class.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Class.pm 5 Feb 2002 23:06:45 -0000 1.2 --- Class.pm 8 Apr 2002 21:47:57 -0000 1.3 *************** *** 6,10 **** # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- --- 6,10 ---- # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- *************** *** 33,39 **** --- 33,41 ---- bless( $this, $class ); # create Object my @subs = (); + my %subHash = (); my @params = (); my @paramValues = (); my @subclasses = (); + $this -> { m_subHash } = \%subHash; $this -> { m_subs } = \@subs; $this -> { m_params } = \@params; *************** *** 173,176 **** --- 175,179 ---- my ($this, $sub) = @_; push ( @{$this -> { m_subs }}, $sub ); + $this -> { m_subHash } -> { $sub -> name() } = $sub; $sub -> parent($this); } *************** *** 195,197 **** --- 198,211 ---- my ($this) = @_; $this->{m_subclasses}; + } + + #/** + # Returns a sub with the given name, if one is defined in this class. + # If no sub with this name is defined in this class, it returns undef. + # @param the name of the sub + # @return an instance of IPdoc::Sub or undef + #*/ + sub subForName { + my ($this, $name) = @_; + $this -> { m_subHash } -> { $name }; } Index: IPdoc.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/IPdoc.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IPdoc.pm 5 Feb 2002 23:07:21 -0000 1.3 --- IPdoc.pm 8 Apr 2002 21:47:57 -0000 1.4 *************** *** 6,10 **** # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- --- 6,10 ---- # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- *************** *** 187,195 **** $class -> name($1); # find parameters in comment ! while ( $lastComment =~ /@[a-z]+/ ) { ! $lastComment =~ s/@([a-z_A-Z-]+)([^@]*)//; $class -> newParam($1, $2); } $class -> comment($lastComment); } --- 187,196 ---- $class -> name($1); # find parameters in comment ! while ( $lastComment =~ /^[ ]*@[a-z_A-Z-]+/m ) { ! $lastComment =~ s/^[ ]*@([a-z_A-Z-]+)([^@]*)//m; $class -> newParam($1, $2); } $class -> comment($lastComment); + $lastComment = ""; } *************** *** 223,232 **** $sub -> name($1); # find parameters in comment ! while ( $lastComment =~ /@[a-z]+/ ) { ! $lastComment =~ s/@([a-z_A-Z-]+)([^@]*)//; $sub -> newParam($1, $2); } $sub -> comment($lastComment); $class -> newSub($sub); } } --- 224,234 ---- $sub -> name($1); # find parameters in comment ! while ( $lastComment =~ /^[ ]*@[a-z_A-Z-]+/m ) { ! $lastComment =~ s/^[ ]*@([a-z_A-Z-]+)([^@]*)//m; $sub -> newParam($1, $2); } $sub -> comment($lastComment); $class -> newSub($sub); + $lastComment = ""; } } Index: Sub.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/Sub.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Sub.pm 5 Feb 2002 00:30:37 -0000 1.1 --- Sub.pm 8 Apr 2002 21:47:57 -0000 1.2 *************** *** 6,10 **** # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- --- 6,10 ---- # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- |