You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(11) |
Feb
(12) |
Mar
(8) |
Apr
(16) |
May
(56) |
Jun
(20) |
Jul
(16) |
Aug
(13) |
Sep
(12) |
Oct
(15) |
Nov
|
Dec
(2) |
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(14) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jan T. <de...@us...> - 2002-05-15 18:21:40
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv17384 Modified Files: BasicStatement.pm Class.pm DOMWalker.pm Event.pm EventListener.pm EventRelay.pm State.pm Statement.pm StatementEvaluator.pm Log Message: * complete rewrite of DOMWalker * added support for WHILE, IF, ELSE and FOR * bugfixes Index: BasicStatement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/BasicStatement.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BasicStatement.pm 11 May 2002 13:08:20 -0000 1.4 --- BasicStatement.pm 15 May 2002 18:21:37 -0000 1.5 *************** *** 2,6 **** # $Id$ # - # Class BasicStatement # # NetScript and all related materials, such as documentation, --- 2,5 ---- *************** *** 29,33 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 28,32 ---- # Globals #-------------------------------------------------------- ! #/** Index: Class.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Class.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Class.pm 11 May 2002 13:08:20 -0000 1.3 --- Class.pm 15 May 2002 18:21:37 -0000 1.4 *************** *** 2,6 **** # $Id$ # - # Class Class # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 2,5 ---- *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 18,22 ---- # Globals #-------------------------------------------------------- ! #/** Index: DOMWalker.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMWalker.pm 11 May 2002 13:08:20 -0000 1.3 --- DOMWalker.pm 15 May 2002 18:21:37 -0000 1.4 *************** *** 2,6 **** # $Id$ # - # Class DOMWalker # # NetScript and all related materials, such as documentation, --- 2,5 ---- *************** *** 101,106 **** $this -> { m_basicStatement } = NetScript::Engine::BasicStatement -> new(); ! my %markedNodes = (); ! $this -> { m_markedNodes } = \%markedNodes; $this -> { m_interpreter } = $interpreter; --- 100,106 ---- $this -> { m_basicStatement } = NetScript::Engine::BasicStatement -> new(); ! $this -> { m_sourceDocument } = undef; ! $this -> { m_targetDocument } = undef; ! $this -> { m_sourceNodeChanged } = 0; $this -> { m_interpreter } = $interpreter; *************** *** 110,200 **** #/** ! # Marks the current node in the source document. ! # Returns an ID which can be used to retrieve ! # the node. ! # @return a scalar holding an ID # @public #*/ ! sub markCurrentSource { my ( $this ) = @_; ! $this -> markNode( $this -> currentSource() ); } #/** ! # Marks the current node in the Target document. ! # Returns an ID which can be used to retrieve ! # the node. ! # @return a scalar holding an ID # @public #*/ ! sub markCurrentTarget { my ( $this ) = @_; ! $this -> markNode( $this -> currentTarget() ); } #/** ! # Marks the given node. # @param an instance of <code>XML::DOM2::Node</code> ! # @return an ID which can be used to retrieve the node. ! # @public #*/ ! sub markNode { ! my ( $this, $node ) = @_; ! my $uid = $this -> interpreter() -> getUID(); ! $this -> { m_markedNodes } -> { $uid } = $node; ! $uid; } #/** ! # Returns a marked node. ! # @param an ID for the previously marked node. ! # @return an instance of <code>XML::DOM2::Node</code> # @public #*/ ! sub markedNode { ! my ( $this, $uid ) = @_; ! $this -> { m_markedNodes } -> { $uid }; } #/** ! # Removes a mark from a node. ! # @param an ID for the previously marked node. ! # @public #*/ ! sub clearMark { ! my ($this, $uid) = @_; ! delete ( $this -> { m_markedNodes } -> { $uid } ); } #/** ! # Retrieves or sets the current node in the source document. ! # @optional an instance of <code>XML::DOM2::Node</code> ! # @return an instance of <code>XML::DOM2::Node</code> # @public #*/ ! sub currentSource { ! my ( $this, $newNode ) = @_; ! if ( defined( $newNode ) ) { ! $this -> { m_currentSourceNode } = $newNode; ! } ! $this -> { m_currentSourceNode }; } - #/** ! # Retrieves or sets the current node in the target document. ! # @optional an instance of <code>XML::DOM2::Node</code> ! # @return an instance of <code>XML::DOM2::Node</code> ! # @public #*/ ! sub currentTarget { ! my ( $this, $newNode ) = @_; ! if ( defined( $newNode ) ) { ! $this -> { m_currentTargetNode } = $newNode; ! } ! $this -> { m_currentTargetNode }; } - #/** # Inserts a node into the target document. The given node will be cloned --- 110,192 ---- #/** ! # Retrieves the current node in the source document. ! # @return an instance of <code>XML::DOM2::Node</code> # @public #*/ ! sub currentSource { my ( $this ) = @_; ! $this -> { m_currentSourceNode }; } #/** ! # Sets the current source node. ! # @optional an instance of <code>XML::DOM2::Node</code> ! # @private ! #*/ ! sub setCurrentSource { ! my ( $this, $newNode ) = @_; ! $this -> { m_currentSourceNode } = $newNode; ! $this -> { m_sourceNodeChanged } = 1; ! } ! ! #/** ! # Retrieves the current node in the target document. ! # @return an instance of <code>XML::DOM2::Node</code> # @public #*/ ! sub currentTarget { my ( $this ) = @_; ! $this -> { m_currentTargetNode }; } #/** ! # Sets the current node in the target document. # @param an instance of <code>XML::DOM2::Node</code> ! # @private #*/ ! sub setCurrentTarget { ! my ( $this, $newNode ) = @_; ! $this -> { m_currentTargetNode } = $newNode; } + #/** ! # Returns the document node of the source document. # @public #*/ ! sub sourceDocument { ! my ($this) = @_; ! $this -> { m_sourceDocument }; } #/** ! # Sets the source document. ! # @param an instance of <code>XML::DOM2::Document</code> ! # @private #*/ ! sub setSourceDocument { ! my ( $this, $document ) = @_; ! $this -> { m_sourceDocument } = $document; } #/** ! # Returns the target document. # @public #*/ ! sub targetDocument { ! my ( $this ) = @_; ! $this -> { m_targetDocument }; } #/** ! # Sets the target document. ! # @param an instance of <code>XML::DOM2::Document</code> ! # @private #*/ ! sub setTargetDocument { ! my ( $this, $document ) = @_; ! $this -> { m_targetDocument } = $document; } #/** # Inserts a node into the target document. The given node will be cloned *************** *** 211,218 **** sub insertIntoTarget { my ( $this, $node, $isRefNode ) = @_; - my $currentNode = $this -> currentTarget(); - my $document = $currentNode -> ownerDocument(); $this -> basicStatement() -> init( ! $this -> interpreter(), $node, $document ); my $clone = $this -> basicStatement() -> evaluate(); --- 203,208 ---- sub insertIntoTarget { my ( $this, $node, $isRefNode ) = @_; $this -> basicStatement() -> init( ! $this -> interpreter(), $node, $this -> targetDocument() ); my $clone = $this -> basicStatement() -> evaluate(); *************** *** 226,240 **** if ( $clone -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE && $isRefNode ) { ! $this -> currentTarget( $clone ) ; } } #/** ! # @return an instance of <code>NetScript::Interpreter</code> ! # @public #*/ ! sub interpreter { ! my ( $this ) = @_; ! $this -> { m_interpreter }; } --- 216,234 ---- if ( $clone -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE && $isRefNode ) { ! $this -> setCurrentTarget( $clone ) ; } } #/** ! # Returns, if the source node was changed. On retrieval, ! # the flag is reset to false. ! # @private ! # @return a boolean. #*/ ! sub sourceNodeChanged { ! my ($this) = @_; ! my $result = $this -> { m_sourceNodeChanged }; ! $this -> { m_sourceNodeChanged } = 0;; ! $result; } *************** *** 247,251 **** sub walkOver { my ( $this, $source ) = @_; ! $this -> currentSource( $source ); my $di = XML::DOM2::DOMImplementation -> new(); # create target document --- 241,245 ---- sub walkOver { my ( $this, $source ) = @_; ! $this -> setCurrentSource( $source ); my $di = XML::DOM2::DOMImplementation -> new(); # create target document *************** *** 259,264 **** } ); ! $this -> currentTarget( $document ); ! $this -> goWalk(); # Return result document --- 253,260 ---- } ); ! $this -> setCurrentTarget( $document ); ! $this -> setSourceDocument( $source ); ! $this -> setTargetDocument( $document ); ! $this -> goWalk(); # Return result document *************** *** 267,299 **** #/** ! # Walks over the document. The walking is depth-first. The walker ! # will create an event for the current source node, then will iterate ! # over the children of the current source node in a depth-first manner. # @private #*/ sub goWalk { my ( $this ) = @_; - my $node = $this -> currentSource(); - - - # create start Event - $this -> createEvent( $node ); - my $children = $node -> childNodes(); - my $count = $children -> length() - 1; ! # iterate over the children ! for ( 0..$count ) { ! $this -> currentSource( $children -> item ( { ! index => $_ ! })); ! $this -> goWalk(); } ! ! # set old node as currentNode ! $this -> currentSource( $node ); ! $this -> createEndEvent( $node ); ! } #/** --- 263,391 ---- #/** ! # Walks over the document. As long there is a current source ! # node it will generate an event for this node. # @private #*/ sub goWalk { my ( $this ) = @_; ! while ( $this -> currentSource() ) { ! $this -> createEvent( $this -> currentSource() ); ! } ! } ! ! #/** ! # Keeps the current source node as current source node ! # executing it again. ! #*/ ! sub sourceAgain { ! my ( $this ) = @_; ! $this -> setCurrentSource( $this -> currentSource() ); ! } ! ! #/** ! # Performs a depth-first step from the current source node ! # to the next node. It will first try to get the first child ! # of the node. If this node has no more children, the method ! # will set the next sibling of the current source node as ! # new current source node. If the current source node has no ! # next sibling, the method will set the next sibling of the ! # current source node's parent as new current source node. If ! # the current source node has no parent the method will ! # set the current source node to <code>undef</code> ! # @public ! #*/ ! sub stepSourceIn { ! my ($this) = @_; ! my $source = $this -> currentSource(); ! my $nextSource = undef; ! if ( $source ) { ! $nextSource = $source -> firstChild(); ! unless ( $nextSource ) { ! $this -> stepSourceNext(); ! } ! else { ! $this -> setCurrentSource( $nextSource ); ! } } ! } ! #/** ! # Steps up to the parent of the current source node. No events ! # are raised!. ! # @public ! #*/ ! sub stepSourceUp { ! my ($this) = @_; ! my $source -> $this -> currentSource(); ! $this -> setCurrentSource( $source -> parentNode() ); ! } ! ! #/** ! # Goes one step up in the target tree. ! # @public ! #*/ ! sub stepTargetUp { ! my ( $this ) = @_; ! my $target = $this -> currentTarget(); ! $this -> setCurrentTarget( $target -> parentNode() ); ! } ! ! #/** ! # This sub advances the current source node to its ! # next sibling. If the current source node has no ! # next sibling, it will advance to the next sibling ! # of it's parent node. ! # @public ! #*/ ! sub stepSourceNext { ! my ( $this ) = @_; ! my $source = $this -> currentSource(); ! ! if ( $source ) { ! my $nextSource = $source -> nextSibling(); ! unless ( $nextSource ) { ! my $parent = $source -> parentNode(); ! while ( defined( $parent ) && !defined( $nextSource ) ) { ! $nextSource = $parent -> nextSibling(); ! unless( $nextSource ) { ! # parent is finished ! $this -> finishNode( $parent ); ! if ( $this -> sourceNodeChanged() ) { ! return; # stop processing ! } ! $parent = $parent -> parentNode(); ! } ! else { ! # parent is finished ! $this -> finishNode( $parent ); ! if ( $this -> sourceNodeChanged() ) { ! return; # stop processing ! } ! } ! } ! } ! else { ! $this -> finishNode( $source ); ! if ( $this -> sourceNodeChanged() ) { ! return; # stop processing ! } ! } ! $this -> setCurrentSource( $nextSource ); ! } ! } + #/** + # Sets the given node as current source and creates + # an end event for the given node. + # @private + # @param an instance of <code>XML::DOM2::Node</code> + #*/ + sub finishNode { + my ($this, $node) = @_; + $this -> setCurrentSource($node); + $this -> sourceNodeChanged(); + $this -> createEndEvent( $node ); + } #/** *************** *** 360,363 **** --- 452,465 ---- $this -> { m_basicStatement }; } + + #/** + # @return an instance of <code>NetScript::Interpreter</code> + # @public + #*/ + sub interpreter { + my ( $this ) = @_; + $this -> { m_interpreter }; + } + 1; # make require happy Index: Event.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Event.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Event.pm 11 May 2002 13:08:20 -0000 1.5 --- Event.pm 15 May 2002 18:21:37 -0000 1.6 *************** *** 1,10 **** #-------------------------------------------------------- ! # This class represents an event within the interpreter. ! # An event is used to report special conditions to the interpreter ! # or attached libraries. E.g it is used for error handling within ! # the interpreter. # $Id$ # - # Class Event # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 1,6 ---- #-------------------------------------------------------- ! # NetScript 2 # $Id$ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. *************** *** 13,23 **** #-------------------------------------------------------- use strict; package NetScript::Engine::Event; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; #/** --- 9,22 ---- #-------------------------------------------------------- use strict; + + #/** + # This class represents an event within the interpreter. + # An event is used to report special conditions to the interpreter + # or attached libraries. E.g it is used for error handling within + # the interpreter. + #*/ package NetScript::Engine::Event; #/** *************** *** 79,82 **** --- 78,82 ---- return $this -> { m_EventUnknown }; } + Index: EventListener.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/EventListener.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EventListener.pm 11 May 2002 13:08:20 -0000 1.2 --- EventListener.pm 15 May 2002 18:21:37 -0000 1.3 *************** *** 2,6 **** # $Id$ # - # Class EventListener # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 2,5 ---- *************** *** 27,31 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 26,30 ---- # Globals #-------------------------------------------------------- ! #/** Index: EventRelay.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/EventRelay.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EventRelay.pm 11 May 2002 13:08:20 -0000 1.6 --- EventRelay.pm 15 May 2002 18:21:37 -0000 1.7 *************** *** 2,6 **** # $Id$ # - # Class EventRelay # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 2,5 ---- *************** *** 33,37 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 32,36 ---- # Globals #-------------------------------------------------------- ! #/** *************** *** 144,154 **** # save the new event and return. the new event # will be sent after the current event was sent. ! if ( $this -> { m_deliveringEvents } ) { ! push( @{$this -> { m_pendingEvents }}, $event ); ! return; ! } # now we deliver events ! $this -> { m_deliveringEvents } = 1; my $arrayRef = $this -> { m_EventListeners } -> --- 143,153 ---- # save the new event and return. the new event # will be sent after the current event was sent. ! # if ( $this -> { m_deliveringEvents } ) { ! # push( @{$this -> { m_pendingEvents }}, $event ); ! # return; ! # } # now we deliver events ! # $this -> { m_deliveringEvents } = 1; my $arrayRef = $this -> { m_EventListeners } -> *************** *** 165,174 **** # we have delivered the current event. ! $this -> { m_deliveringEvents } = 0; # now lets look if there are some events in the queue ! my $nextEvent = shift( @{$this -> { m_pendingEvents }} ); # if there is one, deliver it. ! $this -> raiseEvent( $nextEvent ) if defined($nextEvent); } --- 164,173 ---- # we have delivered the current event. ! # $this -> { m_deliveringEvents } = 0; # now lets look if there are some events in the queue ! # my $nextEvent = shift( @{$this -> { m_pendingEvents }} ); # if there is one, deliver it. ! # $this -> raiseEvent( $nextEvent ) if defined($nextEvent); } Index: State.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/State.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** State.pm 11 May 2002 13:08:20 -0000 1.3 --- State.pm 15 May 2002 18:21:37 -0000 1.4 *************** *** 17,21 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 17,21 ---- # Globals #-------------------------------------------------------- ! #/** *************** *** 55,60 **** sub setParent { my ($this, $parent) = @_; - - #FIXME: Errorhandling, if parent is not defined. $this -> { m_ParentState } = $parent; } --- 55,58 ---- *************** *** 207,211 **** # variable is not defined. #*/ ! sub getVariableValue { my ( $this, $array, $index ) = @_; --- 205,209 ---- # variable is not defined. #*/ ! sub getArrayValue { my ( $this, $array, $index ) = @_; Index: Statement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Statement.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Statement.pm 11 May 2002 13:08:20 -0000 1.4 --- Statement.pm 15 May 2002 18:21:37 -0000 1.5 *************** *** 2,6 **** # $Id$ # - # Class Statement # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 2,5 ---- *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** --- 20,24 ---- # Globals #-------------------------------------------------------- ! #/** Index: StatementEvaluator.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/StatementEvaluator.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StatementEvaluator.pm 11 May 2002 13:08:20 -0000 1.4 --- StatementEvaluator.pm 15 May 2002 18:21:37 -0000 1.5 *************** *** 2,6 **** # $Id$ # - # Class Class # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. --- 2,5 ---- *************** *** 24,28 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 23,27 ---- # Globals #-------------------------------------------------------- ! |
From: Jan T. <de...@us...> - 2002-05-13 12:08:09
|
Update of /cvsroot/net-script/netscript2/docs/ipdoc In directory usw-pr-cvs1:/tmp/cvs-serv16911 Added Files: HISTORY.html README.html Removed Files: HISTORY.txt README.txt Log Message: * renamed files to .html to make them readable for windows users --- NEW FILE: HISTORY.html --- <pre> /---------------------------------------------------------------------\ | $Id: HISTORY.html,v 1.1 2002/05/13 11:38:33 derkork Exp $ | IPdoc 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 (ko...@in...) \---------------------------------------------------------------------/ IPdoc Version History ----------------------- Version 1.04 (13.05.2002): * added index of all documented elements * added possibility to document package globals * added @deprecated-tag * added @callback-tag * fixed a bug causing weird output if any tag contained an "@" (e.g. writing your email address to the @author-tag) Version 1.02 (internal) and 1.03 (16.04.2002): * layout now tries to imitate javadoc * added @final-tag * added possibility to use an HTML-file as package description Version 1.01 (18.03.2002) * documentation shows inherited methods for each class * description of overridden methods is now copied if no description is provided * added possibility to document classes * added a whole bunch of new @-tags * bugfixes Version 1.0 (09.03.2002) * initial release </pre> --- NEW FILE: README.html --- <pre> /---------------------------------------------------------------------\ | $Id: README.html,v 1.1 2002/05/13 11:38:33 derkork Exp $ | IPdoc 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 (ko...@in...) \---------------------------------------------------------------------/ IPdoc Documentation ------------------- Welcome and thanks for downloading IPdoc the insOMnia perl documenting system. Small programs should require small documentation, that's what goes for IPdoc. So here it is: 1. What is IPdoc ---------------- IPdoc is a system for documenting object oriented perl code. It currently only works for files wich contain classes (and therefore have a pm extension). It scans all files in a given directory and it's subdirectories for pm-files. Then it generates a documentation for all these files. It works much like javadoc for Java does. The documentation is rendered to HTML and can then be browsed with any browser. Ahh, and did i mention - it's lightning fast! 2. Why IPdoc ? Isn't POD enough ? --------------------------------- POD has some disadvantages, which I didn't like. First it screws up your code. While perl is hard to read anyway, putting POD-Stuff into your files makes it nearly impossible to read. Next is POD doesn't know anything about the perl language. It's a good formatting tool but you have to take care about your subs and classes. POD won't do this. Third is, POD is quite outdated. HTML is much more flexible in design and possibilities. Also HTML is more compatible than POD (ever tried to read POD under Windows ?). Therefore I decided to do IPdoc. IPdoc knows about subs and classes and automatically parses your source for them. Then it generates the HTML code for your classes and subs. It also generates crosslinks between related classes and subs. You don't need to document a sub in a subclass, if it is already documented in the superclass. IpDoc will copy the documentation from the superclass. 3. Kewl! How do i use this thingie ? ------------------------------------- Easy, really. Just say: perl ipdoc.pl -f sourceDirectory[,sourceDirectory] [-d destinationDirectory] [-t title] [-desc <filename|description>] As sourceDirectory specify the directory where your perl sources are located. All subdirectories are automatically parsed. As destinationDirectory specify the directory where the generated HTML should be placed. If none is specified the current directory will receive the generated HTML. Optionally you can set a title for your documentation. You can load a description for your documentation from a file by specifying a filename after the -desc argument. If your description is quite short, you can specify it directly after the -desc argument, instead of a filename. IPDoc checks if the argument to the -desc argument is a valid filename. If it is, the file will be used as description, if not, the argument itself will become the description. 4. How do I have to format the source ? --------------------------------------- IPdoc like POD needs some special formatting in the source. However this is much easier than POD and also looks better so your code isn't screwed up. IPdoc documentation is done via special formatted comments. An IPdoc documentation comment looks much like a javadoc documentation comment. It starts with #/** and ends with #*/. The start and end tags must be on a separate line. An example: #/** # This is an example documentation comment. # This sub does this and that.... #*/ sub someSub { ... } This is a documentation comment for the sub "someSub". The documentation comment always documents the sub which follows it. You can add special tags to your documentation. These tags are: @param description - a parameter for the sub @optional description - an optional parameter for the sub @not-implemented - states that this sub is not yet implemented @not-standard - states that this sub does not comply to or isn't part of a standard @return description - the return value of the sub @callback - marks this sub as public but only allowed for callback (e.g SAX-Parser Callbacks) @public - marks this sub as public useable @protected - marks this sub as protected (should not be used from outside but can be overridden by subclasses ) @private - marks this sub as private (should not be used from outside and should not be overridden by subclasses ) @abstract - marks this implementation as abstract (should be overridden by subclasses) @fixme description - states a bug in the sub, yet to be fixed @note description - adds an implementation note @author name - sets the author of the sub @version - sets the version of the sub @final - states that this sub or class should not be overridden by subclasses. @deprecated - states that the sub or class is deprecated and it's use is no longer encouraged. Note that you must place each @-tag on a separate line. It may only be preceded by spaces. So a complete documentation comment could look like: #/** # This sub does ... bla bla bla # bla bla bla # ... # @param the name of your mother # @return the name of your father # @public # @fixme error when you don't have a father # @note this one is quite senseless # @version 1.0 # @author Kork of insOMnia #*/ sub senselessSub { ... } As of Version 1.04 you can now document package globals. A package global is defined by using the "our" keyword of perl. E.g: #/** # The current version. #*/ our $VERSION = "1.04"; 4. How is the classname and the inheritance found ? ---------------------------------------------------- The class/package name is determined by the package-statement in your file. IPdoc looks for a line "package MyPackage::MyClass", which will be used to extract the packge name. Inheritance is determined by the "use base" - statement. If you want to add a comment for the whole class (instead of a comment for a single sub, only) put it before the "package"-statement. An Example: #/** # This is my example class. It is good for... # @author <a href="mailto:ko...@in...">Jan</a> #*/ package My::Example::Class; use base qw(My::Example:SuperClass); As you can see, you can put HTML into your comments, just like you can do in Javadoc. Multiple inheritance is not supported at this time. 5. That's quite cool but I miss a feature ! ------------------------------------------- Aye, most possible. I developed this to suit my needs. If you need additional features please tell me! I'll be glad to add them! Send bugs, features, comments, questions etc. to ko...@in... . Now that's it! Go and try it! Jan </pre> --- HISTORY.txt DELETED --- --- README.txt DELETED --- |
From: Jan T. <de...@us...> - 2002-05-13 12:08:06
|
Update of /cvsroot/net-script/netscript2/docs/ipdoc In directory usw-pr-cvs1:/tmp/cvs-serv17008 Modified Files: wipeout.project Log Message: * renamed files to .html to make them readable for windows users Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/ipdoc/wipeout.project,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wipeout.project 13 May 2002 11:38:19 -0000 1.3 --- wipeout.project 13 May 2002 11:38:53 -0000 1.4 *************** *** 1,14 **** b ! C DmDictionary 0 37a98 8 ! c 0 37b7c 9 C Category 1 4817 ! c 0 37bb0 4 ! C DmString 2 37bb7 2 e3 ! c 2 37bb6 a defaultExe ! C DmSet 3 37bb9 1 c 2 4826 2 e3 L 4826 ! c 2 37bb8 b executables ! c 3 37bb4 3 c 2 482d 3 *.C L 482d --- 1,14 ---- b ! C DmDictionary 0 39aea 8 ! c 0 39bce 9 C Category 1 4817 ! c 0 39c02 4 ! C DmString 2 39c09 2 e3 ! c 2 39c08 a defaultExe ! C DmSet 3 39c0b 1 c 2 4826 2 e3 L 4826 ! c 2 39c0a b executables ! c 3 39c06 3 c 2 482d 3 *.C L 482d *************** *** 17,63 **** c 2 4833 5 *.cpp L 4833 ! c 2 37bb3 a extensions ! c 2 37bb2 a CPP_source ! c 2 37bb1 4 name ! c 2 37b7e a CPP_source c 1 4848 ! c 0 37bf6 4 ! c 2 37bfd 2 e3 ! c 2 37bfc a defaultExe ! c 3 37bff 1 c 2 4855 2 e3 L 4855 ! c 2 37bfe b executables ! c 3 37bfa 1 c 2 485c 3 *.c L 485c ! c 2 37bf9 a extensions ! c 2 37bf8 8 C_source ! c 2 37bf7 4 name ! c 2 37b7f 8 C_source c 1 4871 ! c 0 37c30 4 ! c 2 37c37 2 e3 ! c 2 37c36 a defaultExe ! c 3 37c39 1 c 2 487e 2 e3 L 487e ! c 2 37c38 b executables ! c 3 37c34 1 c 2 4885 3 *.e L 4885 ! c 2 37c33 a extensions ! c 2 37c32 6 Eiffel ! c 2 37c31 4 name ! c 2 37b80 6 Eiffel c 1 489a ! c 0 37c6a 4 ! c 2 37c71 2 e3 ! c 2 37c70 a defaultExe ! c 3 37c73 1 c 2 48a7 2 e3 L 48a7 ! c 2 37c72 b executables ! c 3 37c6e 4 c 2 48ae 3 *.F L 48ae --- 17,63 ---- c 2 4833 5 *.cpp L 4833 ! c 2 39c05 a extensions ! c 2 39c04 a CPP_source ! c 2 39c03 4 name ! c 2 39bd0 a CPP_source c 1 4848 ! c 0 39c48 4 ! c 2 39c4f 2 e3 ! c 2 39c4e a defaultExe ! c 3 39c51 1 c 2 4855 2 e3 L 4855 ! c 2 39c50 b executables ! c 3 39c4c 1 c 2 485c 3 *.c L 485c ! c 2 39c4b a extensions ! c 2 39c4a 8 C_source ! c 2 39c49 4 name ! c 2 39bd1 8 C_source c 1 4871 ! c 0 39c82 4 ! c 2 39c89 2 e3 ! c 2 39c88 a defaultExe ! c 3 39c8b 1 c 2 487e 2 e3 L 487e ! c 2 39c8a b executables ! c 3 39c86 1 c 2 4885 3 *.e L 4885 ! c 2 39c85 a extensions ! c 2 39c84 6 Eiffel ! c 2 39c83 4 name ! c 2 39bd2 6 Eiffel c 1 489a ! c 0 39cbc 4 ! c 2 39cc3 2 e3 ! c 2 39cc2 a defaultExe ! c 3 39cc5 1 c 2 48a7 2 e3 L 48a7 ! c 2 39cc4 b executables ! c 3 39cc0 4 c 2 48ae 3 *.F L 48ae *************** *** 68,215 **** c 2 48b7 5 *.fpp L 48b7 ! c 2 37c6d a extensions ! c 2 37c6c 7 Fortran ! c 2 37c6b 4 name ! c 2 37b81 7 Fortran c 1 48cc ! c 0 37cb0 4 ! c 2 37cb7 2 e3 ! c 2 37cb6 a defaultExe ! c 3 37cb9 1 c 2 48d9 2 e3 L 48d9 ! c 2 37cb8 b executables ! c 3 37cb4 2 c 2 48e0 3 *.H L 48e0 c 2 48e3 3 *.h L 48e3 ! c 2 37cb3 a extensions ! c 2 37cb2 6 Header ! c 2 37cb1 4 name ! c 2 37b82 6 Header c 1 48f8 ! c 0 37cee 4 ! c 2 37cf5 9 surfboard ! c 2 37cf4 a defaultExe ! c 3 37cf7 2 c 2 4905 2 e3 L 4905 c 2 4908 9 surfboard L 4908 ! c 2 37cf6 b executables ! c 3 37cf2 2 c 2 490f 5 *.htm L 490f c 2 4912 6 *.html L 4912 ! c 2 37cf1 a extensions ! c 2 37cf0 4 Html ! c 2 37cef 4 name ! c 2 37b83 4 Html c 1 4927 ! c 0 37d30 4 ! c 2 37d37 2 e3 ! c 2 37d36 a defaultExe ! c 3 37d39 1 c 2 4934 2 e3 L 4934 ! c 2 37d38 b executables ! c 3 37d34 1 c 2 493b 6 *.java L 493b ! c 2 37d33 a extensions ! c 2 37d32 4 Java ! c 2 37d31 4 name ! c 2 37b84 4 Java c 1 4950 ! c 0 37d6a 4 ! c 2 37d71 2 e3 ! c 2 37d70 a defaultExe ! c 3 37d73 1 c 2 495d 2 e3 L 495d ! c 2 37d72 b executables ! c 3 37d6e 1 c 2 4964 5 *.tex L 4964 ! c 2 37d6d a extensions ! c 2 37d6c 5 Latex ! c 2 37d6b 4 name ! c 2 37b85 5 Latex c 1 4979 ! c 0 37da4 4 ! c 2 37dab 2 e3 ! c 2 37daa a defaultExe ! c 3 37dad 1 c 2 4986 2 e3 L 4986 ! c 2 37dac b executables ! c 3 37da8 0 ! c 2 37da7 a extensions ! c 2 37da6 5 Other ! c 2 37da5 4 name ! c 2 37b86 5 Other ! c 2 37b7b a categories ! c 0 37b88 1 C ProjectDir 4 49a3 c 2 49a4 16 netscript2/docs/ipdoc/ 11 81 c 2 49a5 0 0 ! c 2 37b8a 16 netscript2/docs/ipdoc/ ! c 2 37b87 b directories ! C DmBag 5 37aa4 4 ! c 2 37ada dd b ! C DmDictionary 0 37aa6 3 ! C DmString 1 37ab8 38 b C DmSet 0 36615 1 C DmString 1 3677a 4 Html L 3677a ! c 1 37ab7 a categories ! c 1 37aa8 c HISTORY.html ! c 1 37aa7 4 name ! C DmInteger 2 37aba 1 ! c 1 37ab9 9 substMode ! c 2 37b0f dd b ! C DmDictionary 0 37adb 3 ! C DmString 1 37aed 39 b C DmSet 0 32f36 1 C DmString 1 33090 5 Other L 33090 ! c 1 37aec a categories ! c 1 37add b HISTORY.txt ! c 1 37adc 4 name ! C DmInteger 2 37aef 1 ! c 1 37aee 9 substMode ! c 2 37b44 dc b ! C DmDictionary 0 37b10 3 ! C DmString 1 37b22 38 b C DmSet 0 3792f 1 C DmString 1 37a94 4 Html L 37a94 ! c 1 37b21 a categories ! c 1 37b12 b README.html ! c 1 37b11 4 name ! C DmInteger 2 37b24 1 ! c 1 37b23 9 substMode ! c 2 37b79 d9 b ! C DmDictionary 0 37b45 3 ! C DmString 1 37b57 36 b C DmSet 0 49d9 1 C DmString 1 4a07 5 Other L 4a07 ! c 1 37b56 a categories ! c 1 37b47 a README.txt ! c 1 37b46 4 name ! C DmInteger 2 37b59 1 ! c 1 37b58 9 substMode ! c 2 37b7a 5 files ! c 2 37aa0 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 37a9f 6 launch ! c 2 37a9c 4 make ! c 2 37a9b 4 make ! c 2 37a9e 0 ! c 2 37a9d 8 makeFile ! c 5 37aa1 0 ! c 2 37aa3 7 modules ! c 2 37a9a 5 ipdoc ! c 2 37a99 4 name --- 68,215 ---- c 2 48b7 5 *.fpp L 48b7 ! c 2 39cbf a extensions ! c 2 39cbe 7 Fortran ! c 2 39cbd 4 name ! c 2 39bd3 7 Fortran c 1 48cc ! c 0 39d02 4 ! c 2 39d09 2 e3 ! c 2 39d08 a defaultExe ! c 3 39d0b 1 c 2 48d9 2 e3 L 48d9 ! c 2 39d0a b executables ! c 3 39d06 2 c 2 48e0 3 *.H L 48e0 c 2 48e3 3 *.h L 48e3 ! c 2 39d05 a extensions ! c 2 39d04 6 Header ! c 2 39d03 4 name ! c 2 39bd4 6 Header c 1 48f8 ! c 0 39d40 4 ! c 2 39d47 9 surfboard ! c 2 39d46 a defaultExe ! c 3 39d49 2 c 2 4905 2 e3 L 4905 c 2 4908 9 surfboard L 4908 ! c 2 39d48 b executables ! c 3 39d44 2 c 2 490f 5 *.htm L 490f c 2 4912 6 *.html L 4912 ! c 2 39d43 a extensions ! c 2 39d42 4 Html ! c 2 39d41 4 name ! c 2 39bd5 4 Html c 1 4927 ! c 0 39d82 4 ! c 2 39d89 2 e3 ! c 2 39d88 a defaultExe ! c 3 39d8b 1 c 2 4934 2 e3 L 4934 ! c 2 39d8a b executables ! c 3 39d86 1 c 2 493b 6 *.java L 493b ! c 2 39d85 a extensions ! c 2 39d84 4 Java ! c 2 39d83 4 name ! c 2 39bd6 4 Java c 1 4950 ! c 0 39dbc 4 ! c 2 39dc3 2 e3 ! c 2 39dc2 a defaultExe ! c 3 39dc5 1 c 2 495d 2 e3 L 495d ! c 2 39dc4 b executables ! c 3 39dc0 1 c 2 4964 5 *.tex L 4964 ! c 2 39dbf a extensions ! c 2 39dbe 5 Latex ! c 2 39dbd 4 name ! c 2 39bd7 5 Latex c 1 4979 ! c 0 39df6 4 ! c 2 39dfd 2 e3 ! c 2 39dfc a defaultExe ! c 3 39dff 1 c 2 4986 2 e3 L 4986 ! c 2 39dfe b executables ! c 3 39dfa 0 ! c 2 39df9 a extensions ! c 2 39df8 5 Other ! c 2 39df7 4 name ! c 2 39bd8 5 Other ! c 2 39bcd a categories ! c 0 39bda 1 C ProjectDir 4 49a3 c 2 49a4 16 netscript2/docs/ipdoc/ 11 81 c 2 49a5 0 0 ! c 2 39bdc 16 netscript2/docs/ipdoc/ ! c 2 39bd9 b directories ! C DmBag 5 39af6 4 ! c 2 39b2c dd b ! C DmDictionary 0 39af8 3 ! C DmString 1 39b0a 38 b C DmSet 0 36615 1 C DmString 1 3677a 4 Html L 3677a ! c 1 39b09 a categories ! c 1 39afa c HISTORY.html ! c 1 39af9 4 name ! C DmInteger 2 39b0c 1 ! c 1 39b0b 9 substMode ! c 2 39b61 e4 b ! C DmDictionary 0 39b2d 3 ! C DmString 1 39b3f 39 b C DmSet 0 32f36 1 C DmString 1 33090 5 Other L 33090 ! c 1 39b3e a categories ! c 1 39b2f b HISTORY.txt ! c 1 39b2e 4 name ! C DmInteger 2 39b41 80000001 ! c 1 39b40 9 substMode ! c 2 39b96 dc b ! C DmDictionary 0 39b62 3 ! C DmString 1 39b74 38 b C DmSet 0 3792f 1 C DmString 1 37a94 4 Html L 37a94 ! c 1 39b73 a categories ! c 1 39b64 b README.html ! c 1 39b63 4 name ! C DmInteger 2 39b76 1 ! c 1 39b75 9 substMode ! c 2 39bcb e0 b ! C DmDictionary 0 39b97 3 ! C DmString 1 39ba9 36 b C DmSet 0 49d9 1 C DmString 1 4a07 5 Other L 4a07 ! c 1 39ba8 a categories ! c 1 39b99 a README.txt ! c 1 39b98 4 name ! C DmInteger 2 39bab 80000001 ! c 1 39baa 9 substMode ! c 2 39bcc 5 files ! c 2 39af2 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 39af1 6 launch ! c 2 39aee 4 make ! c 2 39aed 4 make ! c 2 39af0 0 ! c 2 39aef 8 makeFile ! c 5 39af3 0 ! c 2 39af5 7 modules ! c 2 39aec 5 ipdoc ! c 2 39aeb 4 name |
From: Jan T. <de...@us...> - 2002-05-13 11:38:24
|
Update of /cvsroot/net-script/netscript2/docs/ipdoc In directory usw-pr-cvs1:/tmp/cvs-serv16839 Modified Files: wipeout.project Log Message: * renamed files to .html to make them readable for windows users Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/ipdoc/wipeout.project,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wipeout.project 13 May 2002 11:36:20 -0000 1.2 --- wipeout.project 13 May 2002 11:38:19 -0000 1.3 *************** *** 1,14 **** b ! C DmDictionary 0 3309b 8 ! c 0 33115 9 C Category 1 4817 ! c 0 33149 4 ! C DmString 2 33150 2 e3 ! c 2 3314f a defaultExe ! C DmSet 3 33152 1 c 2 4826 2 e3 L 4826 ! c 2 33151 b executables ! c 3 3314d 3 c 2 482d 3 *.C L 482d --- 1,14 ---- b ! C DmDictionary 0 37a98 8 ! c 0 37b7c 9 C Category 1 4817 ! c 0 37bb0 4 ! C DmString 2 37bb7 2 e3 ! c 2 37bb6 a defaultExe ! C DmSet 3 37bb9 1 c 2 4826 2 e3 L 4826 ! c 2 37bb8 b executables ! c 3 37bb4 3 c 2 482d 3 *.C L 482d *************** *** 17,63 **** c 2 4833 5 *.cpp L 4833 ! c 2 3314c a extensions ! c 2 3314b a CPP_source ! c 2 3314a 4 name ! c 2 33117 a CPP_source c 1 4848 ! c 0 3318f 4 ! c 2 33196 2 e3 ! c 2 33195 a defaultExe ! c 3 33198 1 c 2 4855 2 e3 L 4855 ! c 2 33197 b executables ! c 3 33193 1 c 2 485c 3 *.c L 485c ! c 2 33192 a extensions ! c 2 33191 8 C_source ! c 2 33190 4 name ! c 2 33118 8 C_source c 1 4871 ! c 0 331c9 4 ! c 2 331d0 2 e3 ! c 2 331cf a defaultExe ! c 3 331d2 1 c 2 487e 2 e3 L 487e ! c 2 331d1 b executables ! c 3 331cd 1 c 2 4885 3 *.e L 4885 ! c 2 331cc a extensions ! c 2 331cb 6 Eiffel ! c 2 331ca 4 name ! c 2 33119 6 Eiffel c 1 489a ! c 0 33203 4 ! c 2 3320a 2 e3 ! c 2 33209 a defaultExe ! c 3 3320c 1 c 2 48a7 2 e3 L 48a7 ! c 2 3320b b executables ! c 3 33207 4 c 2 48ae 3 *.F L 48ae --- 17,63 ---- c 2 4833 5 *.cpp L 4833 ! c 2 37bb3 a extensions ! c 2 37bb2 a CPP_source ! c 2 37bb1 4 name ! c 2 37b7e a CPP_source c 1 4848 ! c 0 37bf6 4 ! c 2 37bfd 2 e3 ! c 2 37bfc a defaultExe ! c 3 37bff 1 c 2 4855 2 e3 L 4855 ! c 2 37bfe b executables ! c 3 37bfa 1 c 2 485c 3 *.c L 485c ! c 2 37bf9 a extensions ! c 2 37bf8 8 C_source ! c 2 37bf7 4 name ! c 2 37b7f 8 C_source c 1 4871 ! c 0 37c30 4 ! c 2 37c37 2 e3 ! c 2 37c36 a defaultExe ! c 3 37c39 1 c 2 487e 2 e3 L 487e ! c 2 37c38 b executables ! c 3 37c34 1 c 2 4885 3 *.e L 4885 ! c 2 37c33 a extensions ! c 2 37c32 6 Eiffel ! c 2 37c31 4 name ! c 2 37b80 6 Eiffel c 1 489a ! c 0 37c6a 4 ! c 2 37c71 2 e3 ! c 2 37c70 a defaultExe ! c 3 37c73 1 c 2 48a7 2 e3 L 48a7 ! c 2 37c72 b executables ! c 3 37c6e 4 c 2 48ae 3 *.F L 48ae *************** *** 68,193 **** c 2 48b7 5 *.fpp L 48b7 ! c 2 33206 a extensions ! c 2 33205 7 Fortran ! c 2 33204 4 name ! c 2 3311a 7 Fortran c 1 48cc ! c 0 33249 4 ! c 2 33250 2 e3 ! c 2 3324f a defaultExe ! c 3 33252 1 c 2 48d9 2 e3 L 48d9 ! c 2 33251 b executables ! c 3 3324d 2 c 2 48e0 3 *.H L 48e0 c 2 48e3 3 *.h L 48e3 ! c 2 3324c a extensions ! c 2 3324b 6 Header ! c 2 3324a 4 name ! c 2 3311b 6 Header c 1 48f8 ! c 0 33287 4 ! c 2 3328e 9 surfboard ! c 2 3328d a defaultExe ! c 3 33290 2 c 2 4905 2 e3 L 4905 c 2 4908 9 surfboard L 4908 ! c 2 3328f b executables ! c 3 3328b 2 c 2 490f 5 *.htm L 490f c 2 4912 6 *.html L 4912 ! c 2 3328a a extensions ! c 2 33289 4 Html ! c 2 33288 4 name ! c 2 3311c 4 Html c 1 4927 ! c 0 332c9 4 ! c 2 332d0 2 e3 ! c 2 332cf a defaultExe ! c 3 332d2 1 c 2 4934 2 e3 L 4934 ! c 2 332d1 b executables ! c 3 332cd 1 c 2 493b 6 *.java L 493b ! c 2 332cc a extensions ! c 2 332cb 4 Java ! c 2 332ca 4 name ! c 2 3311d 4 Java c 1 4950 ! c 0 33303 4 ! c 2 3330a 2 e3 ! c 2 33309 a defaultExe ! c 3 3330c 1 c 2 495d 2 e3 L 495d ! c 2 3330b b executables ! c 3 33307 1 c 2 4964 5 *.tex L 4964 ! c 2 33306 a extensions ! c 2 33305 5 Latex ! c 2 33304 4 name ! c 2 3311e 5 Latex c 1 4979 ! c 0 3333d 4 ! c 2 33344 2 e3 ! c 2 33343 a defaultExe ! c 3 33346 1 c 2 4986 2 e3 L 4986 ! c 2 33345 b executables ! c 3 33341 0 ! c 2 33340 a extensions ! c 2 3333f 5 Other ! c 2 3333e 4 name ! c 2 3311f 5 Other ! c 2 33114 a categories ! c 0 33121 1 C ProjectDir 4 49a3 c 2 49a4 16 netscript2/docs/ipdoc/ 11 81 c 2 49a5 0 0 ! c 2 33123 16 netscript2/docs/ipdoc/ ! c 2 33120 b directories ! C DmBag 5 330a7 2 ! c 2 330dd dd b ! C DmDictionary 0 330a9 3 ! C DmString 1 330bb 39 b C DmSet 0 32f36 1 C DmString 1 33090 5 Other L 33090 ! c 1 330ba a categories ! c 1 330ab b HISTORY.txt ! c 1 330aa 4 name ! C DmInteger 2 330bd 1 ! c 1 330bc 9 substMode ! c 2 33112 d9 b ! C DmDictionary 0 330de 3 ! C DmString 1 330f0 36 b C DmSet 0 49d9 1 C DmString 1 4a07 5 Other L 4a07 ! c 1 330ef a categories ! c 1 330e0 a README.txt ! c 1 330df 4 name ! C DmInteger 2 330f2 1 ! c 1 330f1 9 substMode ! c 2 33113 5 files ! c 2 330a3 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 330a2 6 launch ! c 2 3309f 4 make ! c 2 3309e 4 make ! c 2 330a1 0 ! c 2 330a0 8 makeFile ! c 5 330a4 0 ! c 2 330a6 7 modules ! c 2 3309d 5 ipdoc ! c 2 3309c 4 name --- 68,215 ---- c 2 48b7 5 *.fpp L 48b7 ! c 2 37c6d a extensions ! c 2 37c6c 7 Fortran ! c 2 37c6b 4 name ! c 2 37b81 7 Fortran c 1 48cc ! c 0 37cb0 4 ! c 2 37cb7 2 e3 ! c 2 37cb6 a defaultExe ! c 3 37cb9 1 c 2 48d9 2 e3 L 48d9 ! c 2 37cb8 b executables ! c 3 37cb4 2 c 2 48e0 3 *.H L 48e0 c 2 48e3 3 *.h L 48e3 ! c 2 37cb3 a extensions ! c 2 37cb2 6 Header ! c 2 37cb1 4 name ! c 2 37b82 6 Header c 1 48f8 ! c 0 37cee 4 ! c 2 37cf5 9 surfboard ! c 2 37cf4 a defaultExe ! c 3 37cf7 2 c 2 4905 2 e3 L 4905 c 2 4908 9 surfboard L 4908 ! c 2 37cf6 b executables ! c 3 37cf2 2 c 2 490f 5 *.htm L 490f c 2 4912 6 *.html L 4912 ! c 2 37cf1 a extensions ! c 2 37cf0 4 Html ! c 2 37cef 4 name ! c 2 37b83 4 Html c 1 4927 ! c 0 37d30 4 ! c 2 37d37 2 e3 ! c 2 37d36 a defaultExe ! c 3 37d39 1 c 2 4934 2 e3 L 4934 ! c 2 37d38 b executables ! c 3 37d34 1 c 2 493b 6 *.java L 493b ! c 2 37d33 a extensions ! c 2 37d32 4 Java ! c 2 37d31 4 name ! c 2 37b84 4 Java c 1 4950 ! c 0 37d6a 4 ! c 2 37d71 2 e3 ! c 2 37d70 a defaultExe ! c 3 37d73 1 c 2 495d 2 e3 L 495d ! c 2 37d72 b executables ! c 3 37d6e 1 c 2 4964 5 *.tex L 4964 ! c 2 37d6d a extensions ! c 2 37d6c 5 Latex ! c 2 37d6b 4 name ! c 2 37b85 5 Latex c 1 4979 ! c 0 37da4 4 ! c 2 37dab 2 e3 ! c 2 37daa a defaultExe ! c 3 37dad 1 c 2 4986 2 e3 L 4986 ! c 2 37dac b executables ! c 3 37da8 0 ! c 2 37da7 a extensions ! c 2 37da6 5 Other ! c 2 37da5 4 name ! c 2 37b86 5 Other ! c 2 37b7b a categories ! c 0 37b88 1 C ProjectDir 4 49a3 c 2 49a4 16 netscript2/docs/ipdoc/ 11 81 c 2 49a5 0 0 ! c 2 37b8a 16 netscript2/docs/ipdoc/ ! c 2 37b87 b directories ! C DmBag 5 37aa4 4 ! c 2 37ada dd b ! C DmDictionary 0 37aa6 3 ! C DmString 1 37ab8 38 b ! C DmSet 0 36615 1 ! C DmString 1 3677a 4 Html ! L 3677a ! c 1 37ab7 a categories ! c 1 37aa8 c HISTORY.html ! c 1 37aa7 4 name ! C DmInteger 2 37aba 1 ! c 1 37ab9 9 substMode ! c 2 37b0f dd b ! C DmDictionary 0 37adb 3 ! C DmString 1 37aed 39 b C DmSet 0 32f36 1 C DmString 1 33090 5 Other L 33090 ! c 1 37aec a categories ! c 1 37add b HISTORY.txt ! c 1 37adc 4 name ! C DmInteger 2 37aef 1 ! c 1 37aee 9 substMode ! c 2 37b44 dc b ! C DmDictionary 0 37b10 3 ! C DmString 1 37b22 38 b ! C DmSet 0 3792f 1 ! C DmString 1 37a94 4 Html ! L 37a94 ! c 1 37b21 a categories ! c 1 37b12 b README.html ! c 1 37b11 4 name ! C DmInteger 2 37b24 1 ! c 1 37b23 9 substMode ! c 2 37b79 d9 b ! C DmDictionary 0 37b45 3 ! C DmString 1 37b57 36 b C DmSet 0 49d9 1 C DmString 1 4a07 5 Other L 4a07 ! c 1 37b56 a categories ! c 1 37b47 a README.txt ! c 1 37b46 4 name ! C DmInteger 2 37b59 1 ! c 1 37b58 9 substMode ! c 2 37b7a 5 files ! c 2 37aa0 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 37a9f 6 launch ! c 2 37a9c 4 make ! c 2 37a9b 4 make ! c 2 37a9e 0 ! c 2 37a9d 8 makeFile ! c 5 37aa1 0 ! c 2 37aa3 7 modules ! c 2 37a9a 5 ipdoc ! c 2 37a99 4 name |
From: Jan T. <de...@us...> - 2002-05-13 11:36:31
|
Update of /cvsroot/net-script/netscript2/docs/ipdoc In directory usw-pr-cvs1:/tmp/cvs-serv16347 Modified Files: README.txt Added Files: HISTORY.txt Log Message: *added documentation --- NEW FILE: HISTORY.txt --- <pre> /---------------------------------------------------------------------\ | $Id: HISTORY.txt,v 1.1 2002/05/13 11:36:28 derkork Exp $ | IPdoc 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 (ko...@in...) \---------------------------------------------------------------------/ IPdoc Version History ----------------------- Version 1.04 (13.05.2002): * added index of all documented elements * added possibility to document package globals * added @deprecated-tag * added @callback-tag * fixed a bug causing weird output if any tag contained an "@" (e.g. writing your email address to the @author-tag) Version 1.02 (internal) and 1.03 (16.04.2002): * layout now tries to imitate javadoc * added @final-tag * added possibility to use an HTML-file as package description Version 1.01 (18.03.2002) * documentation shows inherited methods for each class * description of overridden methods is now copied if no description is provided * added possibility to document classes * added a whole bunch of new @-tags * bugfixes Version 1.0 (09.03.2002) * initial release </pre> Index: README.txt =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/ipdoc/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.txt 10 Mar 2002 14:49:44 -0000 1.1 --- README.txt 13 May 2002 11:36:28 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + <pre> /---------------------------------------------------------------------\ | $Id$ *************** *** 4,8 **** | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000 - 2001 by Jan Thomä, insOMnia (ko...@in...) \---------------------------------------------------------------------/ --- 5,9 ---- | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000-2002 by Jan Thomä, insOMnia (ko...@in...) \---------------------------------------------------------------------/ *************** *** 21,25 **** Then it generates a documentation for all these files. It works much like javadoc for Java does. The documentation is rendered to HTML and can then ! be browsed with any browser. 2. Why IPdoc ? Isn't POD enough ? --- 22,26 ---- Then it generates a documentation for all these files. It works much like javadoc for Java does. The documentation is rendered to HTML and can then ! be browsed with any browser. Ahh, and did i mention - it's lightning fast! 2. Why IPdoc ? Isn't POD enough ? *************** *** 33,38 **** than POD (ever tried to read POD under Windows ?). Therefore I decided to do IPdoc. IPdoc knows about subs and classes and automatically parses your ! source for them. Then it generates the code for your classes and subs. It also ! generates crosslinks between related classes. 3. Kewl! How do i use this thingie ? --- 34,41 ---- than POD (ever tried to read POD under Windows ?). Therefore I decided to do IPdoc. IPdoc knows about subs and classes and automatically parses your ! source for them. Then it generates the HTML code for your classes and subs. ! It also generates crosslinks between related classes and subs. You don't need ! to document a sub in a subclass, if it is already documented in the superclass. ! IpDoc will copy the documentation from the superclass. 3. Kewl! How do i use this thingie ? *************** *** 41,45 **** perl ipdoc.pl -f sourceDirectory[,sourceDirectory] [-d destinationDirectory] ! [-t title] As sourceDirectory specify the directory where your perl sources are located. --- 44,48 ---- perl ipdoc.pl -f sourceDirectory[,sourceDirectory] [-d destinationDirectory] ! [-t title] [-desc <filename|description>] As sourceDirectory specify the directory where your perl sources are located. *************** *** 47,51 **** the directory where the generated HTML should be placed. If none is specified the current directory will receive the generated HTML. Optionally you can ! set a title for your documentation. 4. How do I have to format the source ? --- 50,59 ---- the directory where the generated HTML should be placed. If none is specified the current directory will receive the generated HTML. Optionally you can ! set a title for your documentation. You can load a description for your ! documentation from a file by specifying a filename after the -desc argument. ! If your description is quite short, you can specify it directly after the ! -desc argument, instead of a filename. IPDoc checks if the argument to the ! -desc argument is a valid filename. If it is, the file will be used as ! description, if not, the argument itself will become the description. 4. How do I have to format the source ? *************** *** 55,59 **** IPdoc documentation is done via special formatted comments. An IPdoc documentation comment looks much like a javadoc documentation comment. ! It starts with #/** and ends with #*/. Then end tag must be on a separate line. An example: --- 63,68 ---- IPdoc documentation is done via special formatted comments. An IPdoc documentation comment looks much like a javadoc documentation comment. ! It starts with #/** and ends with #*/. The start and end tags must be on a ! separate line. An example: *************** *** 76,81 **** a standard @return description - the return value of the sub @public - marks this sub as public useable ! @private - marks this sub as private (should not be used from outside) @abstract - marks this implementation as abstract (should be overridden by subclasses) --- 85,95 ---- a standard @return description - the return value of the sub + @callback - marks this sub as public but only allowed for callback + (e.g SAX-Parser Callbacks) @public - marks this sub as public useable ! @protected - marks this sub as protected (should not be used from outside ! but can be overridden by subclasses ) ! @private - marks this sub as private (should not be used from outside ! and should not be overridden by subclasses ) @abstract - marks this implementation as abstract (should be overridden by subclasses) *************** *** 84,87 **** --- 98,108 ---- @author name - sets the author of the sub @version - sets the version of the sub + @final - states that this sub or class should not be overridden by + subclasses. + @deprecated - states that the sub or class is deprecated and it's use + is no longer encouraged. + + Note that you must place each @-tag on a separate line. It may only be + preceded by spaces. So a complete documentation comment could look like: *************** *** 103,106 **** --- 124,136 ---- } + As of Version 1.04 you can now document package globals. A package + global is defined by using the "our" keyword of perl. E.g: + + #/** + # The current version. + #*/ + our $VERSION = "1.04"; + + 4. How is the classname and the inheritance found ? ---------------------------------------------------- *************** *** 108,112 **** IPdoc looks for a line "package MyPackage::MyClass", which will be used to extract the packge name. Inheritance is determined by the "use base" - ! statement. 5. That's quite cool but I miss a feature ! --- 138,154 ---- IPdoc looks for a line "package MyPackage::MyClass", which will be used to extract the packge name. Inheritance is determined by the "use base" - ! statement. If you want to add a comment for the whole class (instead of ! a comment for a single sub, only) put it before the "package"-statement. ! An Example: ! ! #/** ! # This is my example class. It is good for... ! # @author <a href="mailto:ko...@in...">Jan</a> ! #*/ ! package My::Example::Class; ! use base qw(My::Example:SuperClass); ! ! As you can see, you can put HTML into your comments, just like you can do in ! Javadoc. Multiple inheritance is not supported at this time. 5. That's quite cool but I miss a feature ! *************** *** 120,121 **** --- 162,164 ---- Jan + </pre> |
From: Jan T. <de...@us...> - 2002-05-13 11:36:22
|
Update of /cvsroot/net-script/netscript2/docs/ipdoc In directory usw-pr-cvs1:/tmp/cvs-serv16321 Modified Files: wipeout.project Log Message: *added documentation Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/ipdoc/wipeout.project,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wipeout.project 10 Mar 2002 14:49:45 -0000 1.1 --- wipeout.project 13 May 2002 11:36:20 -0000 1.2 *************** *** 1,182 **** b ! C DmDictionary 0 9d70 8 ! c 0 9db5 9 ! C Category 1 1d9a ! c 0 9de9 4 ! C DmString 2 9df0 2 e3 ! c 2 9def a defaultExe ! C DmSet 3 9df2 1 ! c 2 1da9 2 e3 ! L 1da9 ! c 2 9df1 b executables ! c 3 9ded 3 ! c 2 1db0 3 *.C ! L 1db0 ! c 2 1db3 4 *.cc ! L 1db3 ! c 2 1db6 5 *.cpp ! L 1db6 ! c 2 9dec a extensions ! c 2 9deb a CPP_source ! c 2 9dea 4 name ! c 2 9db7 a CPP_source ! c 1 1dcb ! c 0 9e2f 4 ! c 2 9e36 2 e3 ! c 2 9e35 a defaultExe ! c 3 9e38 1 ! c 2 1dd8 2 e3 ! L 1dd8 ! c 2 9e37 b executables ! c 3 9e33 1 ! c 2 1ddf 3 *.c ! L 1ddf ! c 2 9e32 a extensions ! c 2 9e31 8 C_source ! c 2 9e30 4 name ! c 2 9db8 8 C_source ! c 1 1df4 ! c 0 9e69 4 ! c 2 9e70 2 e3 ! c 2 9e6f a defaultExe ! c 3 9e72 1 ! c 2 1e01 2 e3 ! L 1e01 ! c 2 9e71 b executables ! c 3 9e6d 1 ! c 2 1e08 3 *.e ! L 1e08 ! c 2 9e6c a extensions ! c 2 9e6b 6 Eiffel ! c 2 9e6a 4 name ! c 2 9db9 6 Eiffel ! c 1 1e1d ! c 0 9ea3 4 ! c 2 9eaa 2 e3 ! c 2 9ea9 a defaultExe ! c 3 9eac 1 ! c 2 1e2a 2 e3 ! L 1e2a ! c 2 9eab b executables ! c 3 9ea7 4 ! c 2 1e31 3 *.F ! L 1e31 ! c 2 1e34 3 *.f ! L 1e34 ! c 2 1e37 5 *.for ! L 1e37 ! c 2 1e3a 5 *.fpp ! L 1e3a ! c 2 9ea6 a extensions ! c 2 9ea5 7 Fortran ! c 2 9ea4 4 name ! c 2 9dba 7 Fortran ! c 1 1e4f ! c 0 9ee9 4 ! c 2 9ef0 2 e3 ! c 2 9eef a defaultExe ! c 3 9ef2 1 ! c 2 1e5c 2 e3 ! L 1e5c ! c 2 9ef1 b executables ! c 3 9eed 2 ! c 2 1e63 3 *.H ! L 1e63 ! c 2 1e66 3 *.h ! L 1e66 ! c 2 9eec a extensions ! c 2 9eeb 6 Header ! c 2 9eea 4 name ! c 2 9dbb 6 Header ! c 1 1e7b ! c 0 9f27 4 ! c 2 9f2e 9 surfboard ! c 2 9f2d a defaultExe ! c 3 9f30 2 ! c 2 1e88 2 e3 ! L 1e88 ! c 2 1e8b 9 surfboard ! L 1e8b ! c 2 9f2f b executables ! c 3 9f2b 2 ! c 2 1e92 5 *.htm ! L 1e92 ! c 2 1e95 6 *.html ! L 1e95 ! c 2 9f2a a extensions ! c 2 9f29 4 Html ! c 2 9f28 4 name ! c 2 9dbc 4 Html ! c 1 1eaa ! c 0 9f69 4 ! c 2 9f70 2 e3 ! c 2 9f6f a defaultExe ! c 3 9f72 1 ! c 2 1eb7 2 e3 ! L 1eb7 ! c 2 9f71 b executables ! c 3 9f6d 1 ! c 2 1ebe 6 *.java ! L 1ebe ! c 2 9f6c a extensions ! c 2 9f6b 4 Java ! c 2 9f6a 4 name ! c 2 9dbd 4 Java ! c 1 1ed3 ! c 0 9fa3 4 ! c 2 9faa 2 e3 ! c 2 9fa9 a defaultExe ! c 3 9fac 1 ! c 2 1ee0 2 e3 ! L 1ee0 ! c 2 9fab b executables ! c 3 9fa7 1 ! c 2 1ee7 5 *.tex ! L 1ee7 ! c 2 9fa6 a extensions ! c 2 9fa5 5 Latex ! c 2 9fa4 4 name ! c 2 9dbe 5 Latex ! c 1 1efc ! c 0 9fdd 4 ! c 2 9fe4 2 e3 ! c 2 9fe3 a defaultExe ! c 3 9fe6 1 ! c 2 1f09 2 e3 ! L 1f09 ! c 2 9fe5 b executables ! c 3 9fe1 0 ! c 2 9fe0 a extensions ! c 2 9fdf 5 Other ! c 2 9fde 4 name ! c 2 9dbf 5 Other ! c 2 9db4 a categories ! c 0 9dc1 1 ! C ProjectDir 4 1f26 ! c 2 1f27 16 netscript2/docs/ipdoc/ 11 81 ! c 2 1f28 0 0 ! c 2 9dc3 16 netscript2/docs/ipdoc/ ! c 2 9dc0 b directories ! C DmBag 5 9d7c 1 ! c 2 9db2 d2 b ! C DmDictionary 0 9d7e 3 ! C DmString 1 9d90 36 b ! C DmSet 0 9bf3 1 ! C DmString 1 9d65 5 Other ! L 9d65 ! c 1 9d8f a categories ! c 1 9d80 a README.txt ! c 1 9d7f 4 name ! C DmInteger 2 9d92 1 ! c 1 9d91 9 substMode ! c 2 9db3 5 files ! c 2 9d78 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 9d77 6 launch ! c 2 9d74 4 make ! c 2 9d73 4 make ! c 2 9d76 0 ! c 2 9d75 8 makeFile ! c 5 9d79 0 ! c 2 9d7b 7 modules ! c 2 9d72 5 ipdoc ! c 2 9d71 4 name --- 1,193 ---- b ! C DmDictionary 0 3309b 8 ! c 0 33115 9 ! C Category 1 4817 ! c 0 33149 4 ! C DmString 2 33150 2 e3 ! c 2 3314f a defaultExe ! C DmSet 3 33152 1 ! c 2 4826 2 e3 ! L 4826 ! c 2 33151 b executables ! c 3 3314d 3 ! c 2 482d 3 *.C ! L 482d ! c 2 4830 4 *.cc ! L 4830 ! c 2 4833 5 *.cpp ! L 4833 ! c 2 3314c a extensions ! c 2 3314b a CPP_source ! c 2 3314a 4 name ! c 2 33117 a CPP_source ! c 1 4848 ! c 0 3318f 4 ! c 2 33196 2 e3 ! c 2 33195 a defaultExe ! c 3 33198 1 ! c 2 4855 2 e3 ! L 4855 ! c 2 33197 b executables ! c 3 33193 1 ! c 2 485c 3 *.c ! L 485c ! c 2 33192 a extensions ! c 2 33191 8 C_source ! c 2 33190 4 name ! c 2 33118 8 C_source ! c 1 4871 ! c 0 331c9 4 ! c 2 331d0 2 e3 ! c 2 331cf a defaultExe ! c 3 331d2 1 ! c 2 487e 2 e3 ! L 487e ! c 2 331d1 b executables ! c 3 331cd 1 ! c 2 4885 3 *.e ! L 4885 ! c 2 331cc a extensions ! c 2 331cb 6 Eiffel ! c 2 331ca 4 name ! c 2 33119 6 Eiffel ! c 1 489a ! c 0 33203 4 ! c 2 3320a 2 e3 ! c 2 33209 a defaultExe ! c 3 3320c 1 ! c 2 48a7 2 e3 ! L 48a7 ! c 2 3320b b executables ! c 3 33207 4 ! c 2 48ae 3 *.F ! L 48ae ! c 2 48b1 3 *.f ! L 48b1 ! c 2 48b4 5 *.for ! L 48b4 ! c 2 48b7 5 *.fpp ! L 48b7 ! c 2 33206 a extensions ! c 2 33205 7 Fortran ! c 2 33204 4 name ! c 2 3311a 7 Fortran ! c 1 48cc ! c 0 33249 4 ! c 2 33250 2 e3 ! c 2 3324f a defaultExe ! c 3 33252 1 ! c 2 48d9 2 e3 ! L 48d9 ! c 2 33251 b executables ! c 3 3324d 2 ! c 2 48e0 3 *.H ! L 48e0 ! c 2 48e3 3 *.h ! L 48e3 ! c 2 3324c a extensions ! c 2 3324b 6 Header ! c 2 3324a 4 name ! c 2 3311b 6 Header ! c 1 48f8 ! c 0 33287 4 ! c 2 3328e 9 surfboard ! c 2 3328d a defaultExe ! c 3 33290 2 ! c 2 4905 2 e3 ! L 4905 ! c 2 4908 9 surfboard ! L 4908 ! c 2 3328f b executables ! c 3 3328b 2 ! c 2 490f 5 *.htm ! L 490f ! c 2 4912 6 *.html ! L 4912 ! c 2 3328a a extensions ! c 2 33289 4 Html ! c 2 33288 4 name ! c 2 3311c 4 Html ! c 1 4927 ! c 0 332c9 4 ! c 2 332d0 2 e3 ! c 2 332cf a defaultExe ! c 3 332d2 1 ! c 2 4934 2 e3 ! L 4934 ! c 2 332d1 b executables ! c 3 332cd 1 ! c 2 493b 6 *.java ! L 493b ! c 2 332cc a extensions ! c 2 332cb 4 Java ! c 2 332ca 4 name ! c 2 3311d 4 Java ! c 1 4950 ! c 0 33303 4 ! c 2 3330a 2 e3 ! c 2 33309 a defaultExe ! c 3 3330c 1 ! c 2 495d 2 e3 ! L 495d ! c 2 3330b b executables ! c 3 33307 1 ! c 2 4964 5 *.tex ! L 4964 ! c 2 33306 a extensions ! c 2 33305 5 Latex ! c 2 33304 4 name ! c 2 3311e 5 Latex ! c 1 4979 ! c 0 3333d 4 ! c 2 33344 2 e3 ! c 2 33343 a defaultExe ! c 3 33346 1 ! c 2 4986 2 e3 ! L 4986 ! c 2 33345 b executables ! c 3 33341 0 ! c 2 33340 a extensions ! c 2 3333f 5 Other ! c 2 3333e 4 name ! c 2 3311f 5 Other ! c 2 33114 a categories ! c 0 33121 1 ! C ProjectDir 4 49a3 ! c 2 49a4 16 netscript2/docs/ipdoc/ 11 81 ! c 2 49a5 0 0 ! c 2 33123 16 netscript2/docs/ipdoc/ ! c 2 33120 b directories ! C DmBag 5 330a7 2 ! c 2 330dd dd b ! C DmDictionary 0 330a9 3 ! C DmString 1 330bb 39 b ! C DmSet 0 32f36 1 ! C DmString 1 33090 5 Other ! L 33090 ! c 1 330ba a categories ! c 1 330ab b HISTORY.txt ! c 1 330aa 4 name ! C DmInteger 2 330bd 1 ! c 1 330bc 9 substMode ! c 2 33112 d9 b ! C DmDictionary 0 330de 3 ! C DmString 1 330f0 36 b ! C DmSet 0 49d9 1 ! C DmString 1 4a07 5 Other ! L 4a07 ! c 1 330ef a categories ! c 1 330e0 a README.txt ! c 1 330df 4 name ! C DmInteger 2 330f2 1 ! c 1 330f1 9 substMode ! c 2 33113 5 files ! c 2 330a3 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 330a2 6 launch ! c 2 3309f 4 make ! c 2 3309e 4 make ! c 2 330a1 0 ! c 2 330a0 8 makeFile ! c 5 330a4 0 ! c 2 330a6 7 modules ! c 2 3309d 5 ipdoc ! c 2 3309c 4 name |
From: Jan T. <de...@us...> - 2002-05-13 11:19:33
|
Update of /cvsroot/net-script/netscript2/src/tools/IPdoc In directory usw-pr-cvs1:/tmp/cvs-serv9937 Modified Files: Class.pm IPdoc.pm NSDoclet.pm Sub.pm Added Files: CodeElement.pm Global.pm Log Message: * added index --- NEW FILE: CodeElement.pm --- #-------------------------------------------------------- # This class represents IPdoc, the insOMnia Perl documenting # system. # $Id: CodeElement.pm,v 1.1 2002/05/13 11:19:30 derkork Exp $ # # 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... #-------------------------------------------------------- package IPdoc::CodeElement; use strict; #-------------------------------------------------------- # Globals #-------------------------------------------------------- our $VERSION = '1.0'; #/** # constant for element type. #*/ our $ELEMENT_TYPE = "element"; #/** # Represents a class # @public #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname # Create a Class using the Hash-As-An-Object-Idiom my $this = {}; bless( $this, $class ); # create Object my @subs = (); my @params = (); my @paramValues = (); $this -> { m_params } = \@params; $this -> { m_paramValues } = \@paramValues; $this; } #/** # Sets/returns a comment for this sub # @optional a comment for this sub # @return a comment for this sub #*/ sub comment { my ($this, $comment) = @_; if (defined($comment)) { $this -> { m_comment } = $comment; } $this -> { m_comment }; } #/** # Returns a hash reference containing all params set for this sub. # Mapping is names => list reference containing the names, and # values => list reference containing the values. # @return all params for this sub. #*/ sub params { my ($this) = @_; my @params = @{$this -> { m_params } }; my @values = @{$this -> { m_paramValues } }; return { names => \@params, values => \@values }; } #/** # Adds a new param to this sub. # @param the name of the parameter # @param the value of the parameter #*/ sub newParam { my ($this, $name, $value) = @_; push( @{$this->{m_params}},$name); push( @{$this->{m_paramValues}},$value); } #/** # Sets/returns the name of the class # @optional the name of the class # @return the name of the class #*/ sub name { my ($this, $name) = @_; if ( defined($name) ) { $this -> { m_name } = $name; } $this -> { m_name }; } #/** # Sets/returns the parent class object. # @optional the parent class object # @returns the parent class object #*/ sub parent { my ($this, $parent) = @_; if (defined($parent)) { $this -> { m_parent } = $parent; } $this -> { m_parent }; } #/** # Returns the element type (sub or global or class). #*/ sub elementType { $ELEMENT_TYPE; } #/** # Returns the full filename of the html file where this element info is # stored in. Defaults to the full filename name of the enclosing class. # @return the full filename # @public #*/ sub fullFileName { my ($this) = @_; $this -> parent() -> fullFileName(); } #/** # Returns the relative filename where this class documentation is stored # in. Defaults to the relative filename of the enclosing class. # @return the relative filename # @public #*/ sub relativeFileName { my ($this) = @_; $this -> parent() -> relativeFileName(); } 1; --- NEW FILE: Global.pm --- #-------------------------------------------------------- # $Id: Global.pm,v 1.1 2002/05/13 11:19:30 derkork Exp $ # # 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... #-------------------------------------------------------- use strict; #/** # This class represents a global variable. #*/ package IPdoc::Global; use base qw(IPdoc::CodeElement); #-------------------------------------------------------- # Globals #-------------------------------------------------------- our $VERSION = '1.0'; our $ELEMENT_TYPE = "global"; #/** # Represents a class # @public #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname my $this = $class -> SUPER::new(); $this; } sub elementType { $ELEMENT_TYPE; } 1; Index: Class.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/Class.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Class.pm 8 Apr 2002 21:47:57 -0000 1.3 --- Class.pm 13 May 2002 11:19:30 -0000 1.4 *************** *** 9,15 **** # mailto: ko...@in... #-------------------------------------------------------- ! package IPdoc::Class; ! use vars qw($VERSION); use strict; --- 9,17 ---- # mailto: ko...@in... #-------------------------------------------------------- ! #/** ! # This class represents a perl class. ! #*/ package IPdoc::Class; ! use base qw(IPdoc::CodeElement); use strict; *************** *** 18,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 20,27 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; ! + our $ELEMENT_TYPE = "class"; #/** *************** *** 30,97 **** # Create a Class using the Hash-As-An-Object-Idiom ! my $this = {}; ! 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; - $this -> { m_paramValues } = \@paramValues; $this -> { m_subclasses } = \@subclasses; $this; } - #/** - # Sets/returns a comment for this class - # @optional a comment for this class - # @return a comment for this class - #*/ - sub comment { - my ($this, $comment) = @_; - if (defined($comment)) { - $this -> { m_comment } = $comment; - } - $this -> { m_comment }; - } - - #/** - # Returns a hash reference containing all params set for this class. - # Mapping is names => list reference containing the names, and - # values => list reference containing the values. - # @return all params for this class. - #*/ - sub params { - my ($this) = @_; - my @params = @{$this -> { m_params } }; - my @values = @{$this -> { m_paramValues } }; - return { names => \@params, values => \@values }; - } - - #/** - # Adds a new param to this class. - # @param the name of the parameter - # @param the value of the parameter - #*/ - sub newParam { - my ($this, $name, $value) = @_; - push( @{$this->{m_params}},$name); - push( @{$this->{m_paramValues}},$value); - } - - #/** - # Sets/returns the name of the class - # @optional the name of the class - # @return the name of the class - #*/ - sub name { - my ($this, $name) = @_; - if ( defined($name) ) { - $this -> { m_name } = $name; - } - $this -> { m_name }; - } #/** --- 34,52 ---- # Create a Class using the Hash-As-An-Object-Idiom ! my $this = $class -> SUPER::new(); ! my @subs = (); my %subHash = (); my @subclasses = (); + my @globals = (); + my %globalHash = (); $this -> { m_subHash } = \%subHash; $this -> { m_subs } = \@subs; $this -> { m_subclasses } = \@subclasses; + $this -> { m_globals} = \@globals; + $this -> { m_globalHash } = \%globalHash; $this; } #/** *************** *** 209,211 **** --- 164,203 ---- my ($this, $name) = @_; $this -> { m_subHash } -> { $name }; + } + + #/** + # Adds a new global. + # @param an instance of <code>IPdoc::Global</code> + # @public + #*/ + sub newGlobal { + my ( $this, $global ) = @_; + push ( @{$this -> { m_globals }}, $global ); + $this -> { m_globalHash } -> { $global -> name() } = $global; + $global -> parent( $this ); + } + + #/** + # Returns the global for the given name. + # @param the name of the global. + # @return an instance of <code>IPdoc::Global</code> + # @public + #*/ + sub globalForName { + my ($this, $name) = @_; + $this -> { m_globalHash } -> { $name }; + } + + #/** + # Returns all globals this class has. + # @return a list reference holding all global objects of this class + #*/ + sub globals { + my ($this) = @_; + $this -> { m_globals }; + } + + + sub elementType { + $ELEMENT_TYPE; } Index: IPdoc.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/IPdoc.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IPdoc.pm 8 Apr 2002 21:47:57 -0000 1.4 --- IPdoc.pm 13 May 2002 11:19:30 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- - # This class represents IPdoc, the insOMnia Perl documenting - # system. # $Id$ # --- 1,3 ---- *************** *** 10,16 **** #-------------------------------------------------------- package IPdoc::IPdoc; ! use vars qw($VERSION); use IPdoc::NSDoclet; use IPdoc::Class; use IPdoc::Sub; --- 8,18 ---- #-------------------------------------------------------- + #/** + # This class represents IPdoc, the insOMnia Perl documenting system. + #*/ package IPdoc::IPdoc; ! use IPdoc::NSDoclet; + use IPdoc::Global; use IPdoc::Class; use IPdoc::Sub; *************** *** 22,26 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 24,28 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.03'; #/** *************** *** 49,58 **** # Reads the given config file and then parses all given files and # directories, creating documentation. ! # @param a hash reference containing the following key-value-pairs: ! # files - a comma separated list of files and/or directories ! # which should be documented ! # destination - the destination directory into which the ! # documentation should be placed ! # title - (optional) the title for the documentation # @public #*/ --- 51,64 ---- # Reads the given config file and then parses all given files and # directories, creating documentation. ! # @param a hash reference containing the following key-value-pairs:<ul> ! # <li>files - a comma separated list of files and/or directories ! # which should be documented</li> ! # <li>destination - the destination directory into which the ! # documentation should be placed</li> ! # <li>title - (optional) the title for the documentation</li> ! # <li>description - (optional) a filename of a file holding a description ! # for this documentation. As an alternative, this string may ! # contain no filename, but the description itself.</li> ! # </ul> # @public #*/ *************** *** 60,63 **** --- 66,83 ---- my ($this, $paramRef) = @_; $this -> { m_destDir } = $paramRef -> { "destination" }; + my $description = $paramRef -> { "description" }; + $this -> { m_description } = ""; + if ( -e $description ) { + print "Loading description from file $description ...\n"; + open( AFILE, "<$description" ); + while( <AFILE> ) { + $this -> { m_description } .= $_; + } + close( AFILE ); + } + else { + $this -> { m_description } = $description; + } + if ( defined($paramRef -> { "title"})) { $this -> { m_title } = $paramRef -> { "title" }; *************** *** 102,108 **** # now we can render the classes to the destination directory for ( values(%classes) ) { ! $this -> renderClass( $_ ) ; } - print "Writing navigation...\n"; # now lets render some navigation --- 122,127 ---- # now we can render the classes to the destination directory for ( values(%classes) ) { ! $this -> renderClass( $_ ) ; } print "Writing navigation...\n"; # now lets render some navigation *************** *** 143,147 **** opendir( DIR, "$baseDir/$dirname" ) or carp "Cannot open directory: $baseDir/$dirname. Skipping...\n"; while( defined(my $file = readdir(DIR)) ) { ! if ($file =~ /pm$/ && -f "$baseDir/$dirname/$file") { push ( @{$this -> { m_fileList } }, "$dirname/$file" ); push ( @{$this -> { m_baseDirs}}, $baseDir); --- 162,166 ---- opendir( DIR, "$baseDir/$dirname" ) or carp "Cannot open directory: $baseDir/$dirname. Skipping...\n"; while( defined(my $file = readdir(DIR)) ) { ! if ($file =~ /\.pm$/ && -f "$baseDir/$dirname/$file") { push ( @{$this -> { m_fileList } }, "$dirname/$file" ); push ( @{$this -> { m_baseDirs}}, $baseDir); *************** *** 184,196 **** while (<AFILE>) { my $line = $_; ! if ( $line =~ /[^#]*package[\s]*([^;]+);/ && $class -> name() eq "" && !$commentRunning) { $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 = ""; } --- 203,209 ---- while (<AFILE>) { my $line = $_; ! if ( $line =~ /^\s*package[\s]*([^;]+);/ && $class -> name() eq "" && !$commentRunning) { $class -> name($1); ! $lastComment = $this -> processComment( $lastComment, $class ); } *************** *** 220,235 **** } ! if ($line =~ /^[ ]*sub[ ]+([a-zA-Z0-9_]+)/ && ! $commentRunning) { my $sub = IPdoc::Sub -> new(); $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 = ""; } } close (AFILE); --- 233,251 ---- } ! if ($line =~ /^\s*sub[ ]+([a-zA-Z0-9_]+)/ && ! $commentRunning) { my $sub = IPdoc::Sub -> new(); $sub -> name($1); ! ! $lastComment = $this -> processComment( $lastComment, $sub ); $class -> newSub($sub); } + + if ( $line =~ /^\s*our[ ]+(\$[a-zA-Z0-9_]+)/ && !$commentRunning) { + my $global = IPdoc::Global -> new(); + $global -> name($1); + $lastComment = $this -> processComment( $lastComment, $global ); + $class -> newGlobal( $global ); + } + } close (AFILE); *************** *** 238,241 **** --- 254,281 ---- #/** + # Processes a comment. + # @param the comment. + # @param an instance of <code>IPdoc::CodeElement</code> or its descendants + # @return the empty string + # @private + #*/ + sub processComment { + my ( $this, $comment, $object ) = @_; + + # split comment into comment and params + if ( $comment =~ /\n\s*@/ ) { + my ( $theComment, @params ) = split( /\n\s*@/, $comment ); + for ( @params ) { + /([a-zA-Z_-]+)(\C*)/; # split into name and description + $object -> newParam( $1, $2 ); + } + $comment = $theComment; + } + + $object -> comment( $comment ); + ""; + } + + #/** # Renders a class to a file using a doclet. # @param the class object to render *************** *** 254,263 **** my $doclet = $this -> { m_doclet } -> new($VERSION); - open( AFILE, ">$dir/$filename" ); ! print AFILE $doclet -> renderHead( $class -> name() . " Documentation" ); print AFILE $doclet -> renderClass( $class ); print AFILE $doclet -> renderSubs( $class ); ! print AFILE $doclet -> renderFoot(); close(AFILE); } --- 294,311 ---- my $doclet = $this -> { m_doclet } -> new($VERSION); open( AFILE, ">$dir/$filename" ); ! print AFILE $doclet -> renderHead( $this -> { m_title } , ! $class -> relativeFileName()."main.html", ! $class -> relativeFileName()."symbol_index.html", ! $class -> relativeFileName()."index.html", ! $class -> relativeFileName().$class -> fullFileName() ); print AFILE $doclet -> renderClass( $class ); + print AFILE $doclet -> renderGlobals( $class ); print AFILE $doclet -> renderSubs( $class ); ! print AFILE $doclet -> renderFoot( $this -> { m_title } , ! $class -> relativeFileName()."main.html", ! $class -> relativeFileName()."symbol_index.html", ! $class -> relativeFileName()."index.html", ! $class -> relativeFileName(). $class -> fullFileName() ); close(AFILE); } *************** *** 303,310 **** print AFILE $doclet -> renderPackageList( \@allPackages, "pkg_[PKNAME].html" ); close(AFILE); #next is the main frame open (AFILE, ">$dir/main.html"); ! print AFILE $doclet -> renderMainPage( $this -> { m_title } ); close( AFILE); --- 351,365 ---- print AFILE $doclet -> renderPackageList( \@allPackages, "pkg_[PKNAME].html" ); close(AFILE); + + #and the symbol index + open ( AFILE, ">$dir/symbol_index.html" ); + print AFILE $doclet -> renderSymbolIndex( $this -> { m_title }, + "main.html", "symbol_index.html", "index.html", "main.html", \@allClasses, "pkg_[PKNAME].html" ); + close (AFILE); #next is the main frame open (AFILE, ">$dir/main.html"); ! print AFILE $doclet -> renderMainPage( $this -> { m_title }, ! "main.html", "symbol_index.html", "index.html", "main.html", $this -> { m_description } ); close( AFILE); Index: NSDoclet.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/NSDoclet.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NSDoclet.pm 8 Apr 2002 21:47:02 -0000 1.3 --- NSDoclet.pm 13 May 2002 11:19:30 -0000 1.4 *************** *** 11,20 **** package IPdoc::NSDoclet; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 11,20 ---- package IPdoc::NSDoclet; ! use IPdoc::Sub; #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** *************** *** 36,58 **** #/** # Renders the head. # @param title # @return the rendered head # @public #*/ sub renderHead { ! my ($this, $title) = @_; ! "<html><head><title>$title</title></head><body bgcolor=\"#ffffff\">"; } #/** # Renders the foot. # @return the rendered foot #*/ sub renderFoot { ! my ($this) = @_; ! "<hr><small>Created by IPDoc v".$this -> { m_ipdoc_version }. ! " using the NSDoclet doclet.</small></body></html>"; } --- 36,97 ---- + #/** # Renders the head. # @param title + # @param the filename for the home + # @param the filenamename for the index + # @param the filename for the frameset + # @param the filename of the class itself + # @optional additional html code # @return the rendered head # @public #*/ sub renderHead { ! my ($this, $title, $home, $index, $frameset, $self, $code) = @_; ! "<html><head><title>$title</title></head><body bgcolor=\"#ffffff\">". ! $this -> renderBar($home, $index, $frameset, $self, $title, $code). ! "<p>"; ! ! } ! ! #/** ! # Renders the Bar ! # @param the home file ! # @param the index file ! # @param the file holding the frameset ! # @param this filename ! # @param the title of the documentation ! # @optional additional html code ! #*/ ! sub renderBar { ! my ($this, $home, $index, $frameset, $self, $title, $code ) = @_; ! "<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#EEEEFF\">". ! "<a style=\"color:black\" href=\"$home\"><b>Home</b></a> ". ! "<a style=\"color:black\" href=\"$index\"><b>Index</b></a></td>". ! "<td align=\"right\" width=\"25%\" rowspan=\"2\" valign=\"top\"><b><i>$title</i></b></td></tr>". ! "<tr bgcolor=\"#FFFFFF\"><td align=\"right\">". ! "<a style=\"font-size: 8pt\" href=\"$frameset\" target=\"_top\"><b>FRAMES</b></a> | <a style=\"font-size: 8pt\" target=\"_top\" href=\"$self\">". ! "<b>NO FRAMES</b></a></td></table>$code<hr>"; } #/** # Renders the foot. + # @param the title of the documentation + # @param the filename for the home + # @param the filenamename for the index + # @param the filename for the frameset + # @param the filename of the class itself + # @optional additional html code # @return the rendered foot #*/ sub renderFoot { ! my ($this, $title, $home, $index, $frameset, $self, $code) = @_; ! "</p><p>".$this -> renderBar( $home, $index, $frameset, $self, $title, $code ). ! "</p><p>". ! "<small>Created by IPDoc v".$this -> { m_ipdoc_version }. ! " using the NSDoclet doclet. IPDoc is the insOMnia Perl documenting System.". ! " It is open source and available under the Artistic License. Get your copy ". ! "at <a href=\"http://sf.net/projects/net-script\">The NetScript Project page.</a></small></p></body></html>"; } *************** *** 106,110 **** my @subclasses = @{$class -> subClasses()}; ! $result .= "<b>Direct known subclasses: </b>" if scalar @subclasses; for (@subclasses) { my $scName = $_ -> name(); --- 145,152 ---- my @subclasses = @{$class -> subClasses()}; ! # sort them by name ! @subclasses = sort { $a -> name() cmp $b -> name() } @subclasses; ! ! $result .= "<b>Direct known subclasses: </b>" if scalar(@subclasses); for (@subclasses) { my $scName = $_ -> name(); *************** *** 120,132 **** $result .= "<hr>"; #render a method table ! $result .= "<table width=\"100%\" border=\"1\"><tr><th>Subs</th></tr>"; ! for ( @{$class -> subs()} ) { my $subName = $_ -> name(); my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1...</td></tr>"; } --- 162,194 ---- $result .= "<hr>"; + my @globals = @{$class -> globals()}; + # check if globals are available + if ( @globals ) { + # render a globals table + $result .= "<table width=\"100%\" border=\"1\"><tr bgcolor=\"#CCCCFF\"><th align=\"left\"><div style=\"font-size:14pt\">Globals summary</div></th></tr>"; + @globals = sort { $a -> name() cmp $b -> name() } @globals; + for ( @globals ) { + my $globalName = $_ -> name(); + my $globalComment = $_ -> comment(); + # cut comment down to the first line or sentence. + $subComment =~ /^([^\.]+)/; + $result .= "<tr><td><a href=\"#global_$globalName\"><b>$globalName</b></a><br>$1</td></tr>"; + } + + $result .= "</table><br>"; + + } + #render a method table ! $result .= "<table width=\"100%\" border=\"1\"><tr bgcolor=\"#CCCCFF\"><th align=\"left\"><div style=\"font-size:14pt\">Sub summary</div></th></tr>"; ! my @subs = @{$class -> subs()}; ! @subs = sort { $a -> name() cmp $b -> name() } @subs; ! for ( @subs ) { my $subName = $_ -> name(); my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1</td></tr>"; } *************** *** 134,147 **** $parent = $class -> parent(); while( defined( $parent ) ) { my $classname = $parent -> name(); my $classfile = $class -> relativeFileName().$parent -> fullFileName(); if ( scalar( @{$parent -> subs} ) ) { ! $result .= "<br><table width=\"100%\" border=\"1\"><tr><th>Subs inherited from <a href=\"$classfile\">$classname</a></th></tr>"; ! $result .= "<tr><td>"; my $first = 1; ! for ( @{$parent -> subs()} ) { my $subName = $_ -> name(); ! my $subLink = $classfile . "#sub_" . $subName; # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; --- 196,214 ---- $parent = $class -> parent(); + my %doneParents = (); while( defined( $parent ) ) { + last if $doneParents{$parent -> name()}; my $classname = $parent -> name(); my $classfile = $class -> relativeFileName().$parent -> fullFileName(); if ( scalar( @{$parent -> subs} ) ) { ! $result .= "<br><table width=\"100%\" border=\"1\"><tr bgcolor=\"#EEEEFF\"><th align=\"left\">Subs inherited from <a href=\"$classfile\">$classname</a></th></tr>"; ! $result .= "<tr><td><code>"; my $first = 1; ! my @parentSubs = @{$parent->subs()}; ! @parentSubs = sort { $a -> name() cmp $b -> name() } @parentSubs; ! for ( @parentSubs ) { my $subName = $_ -> name(); ! my $type = $_ -> elementType(); ! my $subLink = $classfile . "#$type_" . $subName; # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; *************** *** 154,159 **** $result .= "<a href=\"$subLink\">$subName</a>"; } ! $result .= "</td></tr></table>"; } $parent = $parent -> parent(); } --- 221,227 ---- $result .= "<a href=\"$subLink\">$subName</a>"; } ! $result .= "</code></td></tr></table>"; } + $doneParents{$parent->name()} = $parent ->name(); $parent = $parent -> parent(); } *************** *** 161,164 **** --- 229,254 ---- } + + #/** + # Renders all globals of the given class object. + # @param a class object + # @return the rendered globals + # @public + #*/ + sub renderGlobals { + my ($this, $class) = @_; + my @globals = @{$class -> globals()}; + my $result = ""; + if ( @globals ) { + $result .= "<p><table width=\"100%\" border=\"1\"><tr bgcolor=\"#CCCCFF\"><th align=\"left\" style=\"font-size:14pt\">Global detail</th></tr></table>"; + for (@globals) { + $result .= $this -> renderGlobal( $_ ); + $result .= "<hr>"; + } + $result .= "</p>"; + } + $result; + } + #/** # Renders all subs of the given class object. *************** *** 170,176 **** --- 260,269 ---- my ($this, $class) = @_; my $result = ""; + $result .= "<p><table width=\"100%\" border=\"1\"><tr bgcolor=\"#CCCCFF\"><th align=\"left\" style=\"font-size:14pt\">Sub detail</th></tr></table>"; for (@{$class -> subs()}) { $result .= $this -> renderSub( $_ ); + $result .= "<hr>"; } + $result .= "</p>"; $result; } *************** *** 187,190 **** --- 280,284 ---- my $description = $sub -> comment(); my $class = $sub -> parent(); + my $type = $sub -> elementType(); my $params = $sub -> params(); *************** *** 193,202 **** my $parent = $class -> parent(); my $aSub = undef; ! while( defined($parent) && $description eq "" ) { $aSub = $parent -> subForName( $sub -> name() ); if (defined($aSub)) { $description = $aSub -> comment(); } $parent = $parent -> parent(); } --- 287,298 ---- my $parent = $class -> parent(); my $aSub = undef; ! my %doneParents = (); while( defined($parent) && $description eq "" ) { + last if $doneParents{$parent->name()}; $aSub = $parent -> subForName( $sub -> name() ); if (defined($aSub)) { $description = $aSub -> comment(); } + $doneParents{ $parent->name() } = $parent ->name(); $parent = $parent -> parent(); } *************** *** 212,217 **** } } ! my $result = "<hr><h3><a name=\"sub_$name\">$name</a></h3>$description<br><br>"; $result .= $this -> renderParams( $params ); $result; } --- 308,334 ---- } } ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; ! $result .= $this -> renderParams( $params ); ! $resutl .= "</p></dl>"; ! $result; ! } ! ! #/** ! # Renders a global.. ! # @param the global object to render ! # @return the rendered string ! # @private ! #*/ ! sub renderGlobal { ! my ($this, $global ) = @_; ! my $name = $global -> name(); ! my $description = $global -> comment(); ! my $class = $global -> parent(); ! my $type = $global -> elementType(); ! my $params = $global -> params(); ! ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; $result .= $this -> renderParams( $params ); + $resutl .= "</p></dl>"; $result; } *************** *** 231,251 **** "not-standard" => "This implementation is non-standard.", "return" => "return value:", "public" => "This sub can be used from outside.", ! "protected" => "This sub should not be used from outside but can be overridden by subclasses.", ! "private" => "This sub should not be used from outside and not be overridden by subclasses.", "abstract" => "This implementation is abstract.", "note" => "Implementation note:", ! "fixme" => "To be fixed:", "author" => "Author:", "version" => "Version:", "final" => "This sub or class should not be overridden by subclasses." ); my @paramNames = @{$paramRef -> { names }}; my @paramValues = @{$paramRef -> { values }}; ! while (@paramNames) { ! $result .= "<b>".$mappings{(shift @paramNames)}."</b>".(shift @paramValues)."<br>"; } $result; } --- 348,386 ---- "not-standard" => "This implementation is non-standard.", "return" => "return value:", + "callback" => "This sub is a callback within the framework and should not be used from outside.", "public" => "This sub can be used from outside.", ! "protected" => "This sub should not be used from outside but can be overridden and used by subclasses.", ! "private" => "This sub should not be used from outside and not be overridden or used by subclasses.", "abstract" => "This implementation is abstract.", "note" => "Implementation note:", ! "fixme" => "to be fixed:", ! "todo" => "to be done:", "author" => "Author:", "version" => "Version:", + "deprecated" => "Deprecated.", "final" => "This sub or class should not be overridden by subclasses." ); + my @order = ( "deprecated", "callback", "public", "private", "protected", "abstract", "final", + "param", "optional", "return", "not-implemented", + "not-standard", "note", "fixme", "todo", "version", "author" ); my @paramNames = @{$paramRef -> { names }}; my @paramValues = @{$paramRef -> { values }}; ! # sort the parameters to have always the same order ! ! ! $result .= "<dl>"; ! for (@order) { ! $elem = $_; ! foreach $index (0..$#paramNames ) { #FIXME: this is incredibly slow ! if ( $paramNames[$index] eq $elem ) { ! $result .= "<dd><b>".$mappings{($paramNames[$index])}."</b><dl><dd>".(@paramValues[$index])."</dd></dl></dd>"; ! } ! } ! } + $result .= "</dl>"; $result; + } *************** *** 320,328 **** # Renders the main Page. # @param a title # @return the rendered string #*/ sub renderMainPage { ! my ($this, $title) = @_; ! my $result = "<html><body bgcolor=\"#ffffff\">$title</body></html>"; $result; } --- 455,550 ---- # Renders the main Page. # @param a title + # @param home filename + # @param index filename + # @param frameset filename + # @param self filename + # @param a string holding a description # @return the rendered string #*/ sub renderMainPage { ! my ($this, $title, $home, $index, $frameset, $self, $description ) = @_; ! my $result = $this -> renderHead( $title, $home, $index, $frameset, $self ); ! $result .= "<center><h1>$title - API Documentation </h1></center><p>".$description."</p>"; ! $result .= $this -> renderFoot( $title, $home, $index, $frameset, $self ); ! $result; ! } ! ! #/** ! # Renders the Index ! # @param ! #*/ ! sub renderSymbolIndex { ! my ($this, $title, $home, $index, $frameset, $self, $classes, $fmtString) = @_; ! my $result = ""; ! ! my @allClasses = @{$classes} ; ! ! # this array holds all symbols (CodeElements) ! my @allSymbols = (); ! # add the class, its subs and globals to the array ! for ( @allClasses ) { ! push( @allSymbols, $_ ); ! push( @allSymbols, @{$_ -> subs()} ); ! push( @allSymbols, @{$_ -> globals()} ); ! } ! ! # sort the array alphabetically by name ! @allSymbols = sort { ! $name1 = $a -> name(); ! $name2 = $b -> name(); ! $name1 =~ s/^.*:://g; ! $name2 =~ s/^.*:://g; ! lc($name1) cmp lc($name2); ! } @allSymbols; ! ! my $lastLetter = ""; ! my $letters = ""; ! my $biglist = ""; ! my $first = 1; ! for (@allSymbols) { ! my $parent = $_ -> parent(); ! my $file = $_ -> fullFileName(); ! my $type = $_ -> elementType(); ! my $name = $_ -> name(); ! my $shortName = $name; ! my $package = ""; ! if ( $name =~ /^(.*)::(.*)/ ) { # assumes greedyness ! $shortName = $2; ! $package = $1; ! } ! my $comment = $_ -> comment(); ! # cut comment down to the first line or sentence. ! if ( $comment =~ /^([^\.]+)/ ) { ! $comment = $1; ! } ! ! $shortName =~ /^(.)/; # FIXME: Looks slow ! if ( $lastLetter ne uc($1) ) { ! $lastLetter = uc($1); ! $letters .= "<a href=\"#letter_$lastLetter\">$lastLetter</a> "; ! $bigList .= "</dl><hr>" unless $first; ! $first = 0; ! $bigList .= "<a name=\"letter_$lastLetter\"><h2><b>$lastLetter</b></h2></a><dl>"; ! } ! $bigList .= "<dt><a href=\"$file#$type_$name\">$shortName</a> - "; ! if ( $type eq $IPdoc::Class::ELEMENT_TYPE ) { ! my $pkName = $package; ! $pkName =~ s/:/_/g; ! my $href = $fmtString; ! $href =~ s/\[PKNAME\]/$pkName/e; ! $bigList .= "class in package <a href=\"$href\" target=\"pkgframe\">$package</a>"; ! } ! else { ! my $pname = $parent -> name(); ! my $href = $parent -> fullFileName(); ! $bigList .= " $type in class <a href=\"$href\">$pname</a>"; ! } ! ! $bigList .="</dt><dd> $comment</dd>"; ! } ! ! $result .= $this -> renderHead( $title, $home, $index, $frameset, $self, $letters ); ! $result .= $bigList; ! $result .= $this -> renderFoot( $title, $home, $index, $frameset, $self, $letters ); $result; } Index: Sub.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/Sub.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Sub.pm 8 Apr 2002 21:47:57 -0000 1.2 --- Sub.pm 13 May 2002 11:19:30 -0000 1.3 *************** *** 1,5 **** #-------------------------------------------------------- - # This class represents IPdoc, the insOMnia Perl documenting - # system. # $Id$ # --- 1,3 ---- *************** *** 10,15 **** #-------------------------------------------------------- package IPdoc::Sub; ! use vars qw($VERSION); use strict; --- 8,16 ---- #-------------------------------------------------------- + #/** + # This class represents a perl sub. + #*/ package IPdoc::Sub; ! use base qw(IPdoc::CodeElement); use strict; *************** *** 18,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 19,25 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; + our $ELEMENT_TYPE = "sub"; #/** *************** *** 30,107 **** # Create a Class using the Hash-As-An-Object-Idiom ! my $this = {}; ! bless( $this, $class ); # create Object ! my @subs = (); ! my @params = (); ! my @paramValues = (); ! $this -> { m_params } = \@params; ! $this -> { m_paramValues } = \@paramValues; $this; } ! #/** ! # Sets/returns a comment for this sub ! # @optional a comment for this sub ! # @return a comment for this sub ! #*/ ! sub comment { ! my ($this, $comment) = @_; ! if (defined($comment)) { ! $this -> { m_comment } = $comment; ! } ! $this -> { m_comment }; ! } ! ! #/** ! # Returns a hash reference containing all params set for this sub. ! # Mapping is names => list reference containing the names, and ! # values => list reference containing the values. ! # @return all params for this sub. ! #*/ ! sub params { ! my ($this) = @_; ! my @params = @{$this -> { m_params } }; ! my @values = @{$this -> { m_paramValues } }; ! return { names => \@params, values => \@values }; ! } ! ! #/** ! # Adds a new param to this sub. ! # @param the name of the parameter ! # @param the value of the parameter ! #*/ ! sub newParam { ! my ($this, $name, $value) = @_; ! push( @{$this->{m_params}},$name); ! push( @{$this->{m_paramValues}},$value); ! } ! ! ! #/** ! # Sets/returns the name of the class ! # @optional the name of the class ! # @return the name of the class ! #*/ ! sub name { ! my ($this, $name) = @_; ! if ( defined($name) ) { ! $this -> { m_name } = $name; ! } ! $this -> { m_name }; ! } ! ! ! #/** ! # Sets/returns the parent class object. ! # @optional the parent class object ! # @returns the parent class object ! #*/ ! sub parent { ! my ($this, $parent) = @_; ! if (defined($parent)) { ! $this -> { m_parent } = $parent; ! } ! $this -> { m_parent }; } ! --- 32,42 ---- # Create a Class using the Hash-As-An-Object-Idiom ! my $this = $class -> SUPER::new(); $this; } ! sub elementType { ! $ELEMENT_TYPE; } ! 1; |
From: Jan T. <de...@us...> - 2002-05-13 11:19:23
|
Update of /cvsroot/net-script/netscript2/src/tools/IPdoc In directory usw-pr-cvs1:/tmp/cvs-serv9664 Modified Files: wipeout.project Log Message: * added index Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/wipeout.project,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wipeout.project 5 Feb 2002 00:30:37 -0000 1.1 --- wipeout.project 13 May 2002 11:19:20 -0000 1.2 *************** *** 1,215 **** b ! C DmDictionary 0 3dceb 8 ! c 0 3ddcf 9 ! C Category 1 881b ! c 0 3de09 4 ! C DmString 2 3de10 2 e3 ! c 2 3de0f a defaultExe ! C DmSet 3 3de12 1 ! c 2 882a 2 e3 ! L 882a ! c 2 3de11 b executables ! c 3 3de0d 3 ! c 2 8831 3 *.C ! L 8831 ! c 2 8834 4 *.cc ! L 8834 ! c 2 8837 5 *.cpp ! L 8837 ! c 2 3de0c a extensions ! c 2 3de0b a CPP_source ! c 2 3de0a 4 name ! c 2 3ddd1 a CPP_source ! c 1 884c ! c 0 3de4f 4 ! c 2 3de56 2 e3 ! c 2 3de55 a defaultExe ! c 3 3de58 1 ! c 2 8859 2 e3 ! L 8859 ! c 2 3de57 b executables ! c 3 3de53 1 ! c 2 8860 3 *.c ! L 8860 ! c 2 3de52 a extensions ! c 2 3de51 8 C_source ! c 2 3de50 4 name ! c 2 3ddd2 8 C_source ! c 1 8875 ! c 0 3de89 4 ! c 2 3de90 2 e3 ! c 2 3de8f a defaultExe ! c 3 3de92 1 ! c 2 8882 2 e3 ! L 8882 ! c 2 3de91 b executables ! c 3 3de8d 1 ! c 2 8889 3 *.e ! L 8889 ! c 2 3de8c a extensions ! c 2 3de8b 6 Eiffel ! c 2 3de8a 4 name ! c 2 3ddd3 6 Eiffel ! c 1 889e ! c 0 3dec3 4 ! c 2 3deca 2 e3 ! c 2 3dec9 a defaultExe ! c 3 3decc 1 ! c 2 88ab 2 e3 ! L 88ab ! c 2 3decb b executables ! c 3 3dec7 4 ! c 2 88b2 3 *.F ! L 88b2 ! c 2 88b5 3 *.f ! L 88b5 ! c 2 88b8 5 *.for ! L 88b8 ! c 2 88bb 5 *.fpp ! L 88bb ! c 2 3dec6 a extensions ! c 2 3dec5 7 Fortran ! c 2 3dec4 4 name ! c 2 3ddd4 7 Fortran ! c 1 88d0 ! c 0 3df09 4 ! c 2 3df10 2 e3 ! c 2 3df0f a defaultExe ! c 3 3df12 1 ! c 2 88dd 2 e3 ! L 88dd ! c 2 3df11 b executables ! c 3 3df0d 2 ! c 2 88e4 3 *.H ! L 88e4 ! c 2 88e7 3 *.h ! L 88e7 ! c 2 3df0c a extensions ! c 2 3df0b 6 Header ! c 2 3df0a 4 name ! c 2 3ddd5 6 Header ! c 1 88fc ! c 0 3df47 4 ! c 2 3df4e 9 surfboard ! c 2 3df4d a defaultExe ! c 3 3df50 2 ! c 2 8909 2 e3 ! L 8909 ! c 2 890c 9 surfboard ! L 890c ! c 2 3df4f b executables ! c 3 3df4b 2 ! c 2 8913 5 *.htm ! L 8913 ! c 2 8916 6 *.html ! L 8916 ! c 2 3df4a a extensions ! c 2 3df49 4 Html ! c 2 3df48 4 name ! c 2 3ddd6 4 Html ! c 1 892b ! c 0 3df89 4 ! c 2 3df90 2 e3 ! c 2 3df8f a defaultExe ! c 3 3df92 1 ! c 2 8938 2 e3 ! L 8938 ! c 2 3df91 b executables ! c 3 3df8d 1 ! c 2 893f 6 *.java ! L 893f ! c 2 3df8c a extensions ! c 2 3df8b 4 Java ! c 2 3df8a 4 name ! c 2 3ddd7 4 Java ! c 1 8954 ! c 0 3dfc3 4 ! c 2 3dfca 2 e3 ! c 2 3dfc9 a defaultExe ! c 3 3dfcc 1 ! c 2 8961 2 e3 ! L 8961 ! c 2 3dfcb b executables ! c 3 3dfc7 1 ! c 2 8968 5 *.tex ! L 8968 ! c 2 3dfc6 a extensions ! c 2 3dfc5 5 Latex ! c 2 3dfc4 4 name ! c 2 3ddd8 5 Latex ! c 1 897d ! c 0 3dffd 4 ! c 2 3e004 2 e3 ! c 2 3e003 a defaultExe ! c 3 3e006 1 ! c 2 898a 2 e3 ! L 898a ! c 2 3e005 b executables ! c 3 3e001 0 ! c 2 3e000 a extensions ! c 2 3dfff 5 Other ! c 2 3dffe 4 name ! c 2 3ddd9 5 Other ! c 2 3ddce a categories ! c 0 3dddb 1 ! C ProjectDir 4 89a7 ! c 2 89a8 1b netscript2/src/tools/IPdoc/ 11 81 ! c 2 89a9 0 0 ! c 2 3dddd 1b netscript2/src/tools/IPdoc/ ! c 2 3ddda b directories ! C DmBag 5 3dcf7 4 ! c 2 3dd2d da b ! C DmDictionary 0 3dcf9 3 ! C DmString 1 3dd0b 39 b ! C DmSet 0 3b497 1 ! C DmString 1 3b601 5 Other ! L 3b601 ! c 1 3dd0a a categories ! c 1 3dcfb 8 Class.pm ! c 1 3dcfa 4 name ! C DmInteger 2 3dd0d 1 ! c 1 3dd0c 9 substMode ! c 2 3dd62 d7 b ! C DmDictionary 0 3dd2e 3 ! C DmString 1 3dd40 36 b ! C DmSet 0 89dd 1 ! C DmString 1 8a0b 5 Other ! L 8a0b ! c 1 3dd3f a categories ! c 1 3dd30 8 IPdoc.pm ! c 1 3dd2f 4 name ! C DmInteger 2 3dd42 1 ! c 1 3dd41 9 substMode ! c 2 3dd97 dd b ! C DmDictionary 0 3dd63 3 ! C DmString 1 3dd75 39 b ! C DmSet 0 3bcc2 1 ! C DmString 1 3be2c 5 Other ! L 3be2c ! c 1 3dd74 a categories ! c 1 3dd65 b NSDoclet.pm ! c 1 3dd64 4 name ! C DmInteger 2 3dd77 1 ! c 1 3dd76 9 substMode ! c 2 3ddcc d8 b ! C DmDictionary 0 3dd98 3 ! C DmString 1 3ddaa 39 b ! C DmSet 0 3db76 1 ! C DmString 1 3dce0 5 Other ! L 3dce0 ! c 1 3dda9 a categories ! c 1 3dd9a 6 Sub.pm ! c 1 3dd99 4 name ! C DmInteger 2 3ddac 1 ! c 1 3ddab 9 substMode ! c 2 3ddcd 5 files ! c 2 3dcf3 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 3dcf2 6 launch ! c 2 3dcef 4 make ! c 2 3dcee 4 make ! c 2 3dcf1 0 ! c 2 3dcf0 8 makeFile ! c 5 3dcf4 0 ! c 2 3dcf6 7 modules ! c 2 3dced 5 IPdoc ! c 2 3dcec 4 name --- 1,237 ---- b ! C DmDictionary 0 1551d 8 ! c 0 1566b 9 ! C Category 1 9fb3 ! c 0 156a5 4 ! C DmString 2 156ac 2 e3 ! c 2 156ab a defaultExe ! C DmSet 3 156ae 1 ! c 2 9fc2 2 e3 ! L 9fc2 ! c 2 156ad b executables ! c 3 156a9 3 ! c 2 9fc9 3 *.C ! L 9fc9 ! c 2 9fcc 4 *.cc ! L 9fcc ! c 2 9fcf 5 *.cpp ! L 9fcf ! c 2 156a8 a extensions ! c 2 156a7 a CPP_source ! c 2 156a6 4 name ! c 2 1566d a CPP_source ! c 1 9fe4 ! c 0 156eb 4 ! c 2 156f2 2 e3 ! c 2 156f1 a defaultExe ! c 3 156f4 1 ! c 2 9ff1 2 e3 ! L 9ff1 ! c 2 156f3 b executables ! c 3 156ef 1 ! c 2 9ff8 3 *.c ! L 9ff8 ! c 2 156ee a extensions ! c 2 156ed 8 C_source ! c 2 156ec 4 name ! c 2 1566e 8 C_source ! c 1 a00d ! c 0 15725 4 ! c 2 1572c 2 e3 ! c 2 1572b a defaultExe ! c 3 1572e 1 ! c 2 a01a 2 e3 ! L a01a ! c 2 1572d b executables ! c 3 15729 1 ! c 2 a021 3 *.e ! L a021 ! c 2 15728 a extensions ! c 2 15727 6 Eiffel ! c 2 15726 4 name ! c 2 1566f 6 Eiffel ! c 1 a036 ! c 0 1575f 4 ! c 2 15766 2 e3 ! c 2 15765 a defaultExe ! c 3 15768 1 ! c 2 a043 2 e3 ! L a043 ! c 2 15767 b executables ! c 3 15763 4 ! c 2 a04a 3 *.F ! L a04a ! c 2 a04d 3 *.f ! L a04d ! c 2 a050 5 *.for ! L a050 ! c 2 a053 5 *.fpp ! L a053 ! c 2 15762 a extensions ! c 2 15761 7 Fortran ! c 2 15760 4 name ! c 2 15670 7 Fortran ! c 1 a068 ! c 0 157a5 4 ! c 2 157ac 2 e3 ! c 2 157ab a defaultExe ! c 3 157ae 1 ! c 2 a075 2 e3 ! L a075 ! c 2 157ad b executables ! c 3 157a9 2 ! c 2 a07c 3 *.H ! L a07c ! c 2 a07f 3 *.h ! L a07f ! c 2 157a8 a extensions ! c 2 157a7 6 Header ! c 2 157a6 4 name ! c 2 15671 6 Header ! c 1 a094 ! c 0 157e3 4 ! c 2 157ea 9 surfboard ! c 2 157e9 a defaultExe ! c 3 157ec 2 ! c 2 a0a1 2 e3 ! L a0a1 ! c 2 a0a4 9 surfboard ! L a0a4 ! c 2 157eb b executables ! c 3 157e7 2 ! c 2 a0ab 5 *.htm ! L a0ab ! c 2 a0ae 6 *.html ! L a0ae ! c 2 157e6 a extensions ! c 2 157e5 4 Html ! c 2 157e4 4 name ! c 2 15672 4 Html ! c 1 a0c3 ! c 0 15825 4 ! c 2 1582c 2 e3 ! c 2 1582b a defaultExe ! c 3 1582e 1 ! c 2 a0d0 2 e3 ! L a0d0 ! c 2 1582d b executables ! c 3 15829 1 ! c 2 a0d7 6 *.java ! L a0d7 ! c 2 15828 a extensions ! c 2 15827 4 Java ! c 2 15826 4 name ! c 2 15673 4 Java ! c 1 a0ec ! c 0 1585f 4 ! c 2 15866 2 e3 ! c 2 15865 a defaultExe ! c 3 15868 1 ! c 2 a0f9 2 e3 ! L a0f9 ! c 2 15867 b executables ! c 3 15863 1 ! c 2 a100 5 *.tex ! L a100 ! c 2 15862 a extensions ! c 2 15861 5 Latex ! c 2 15860 4 name ! c 2 15674 5 Latex ! c 1 a115 ! c 0 15899 4 ! c 2 158a0 2 e3 ! c 2 1589f a defaultExe ! c 3 158a2 1 ! c 2 a122 2 e3 ! L a122 ! c 2 158a1 b executables ! c 3 1589d 0 ! c 2 1589c a extensions ! c 2 1589b 5 Other ! c 2 1589a 4 name ! c 2 15675 5 Other ! c 2 1566a a categories ! c 0 15677 1 ! C ProjectDir 4 a13f ! c 2 a140 1b netscript2/src/tools/IPdoc/ 11 81 ! c 2 a141 0 0 ! c 2 15679 1b netscript2/src/tools/IPdoc/ ! c 2 15676 b directories ! C DmBag 5 15529 6 ! c 2 1555f d7 b ! C DmDictionary 0 1552b 3 ! C DmString 1 1553d 36 b ! C DmSet 0 a17b 1 ! C DmString 1 a1a9 5 Other ! L a1a9 ! c 1 1553c a categories ! c 1 1552d 8 Class.pm ! c 1 1552c 4 name ! C DmInteger 2 1553f 1 ! c 1 1553e 9 substMode ! c 2 15594 e0 b ! C DmDictionary 0 15560 3 ! C DmString 1 15572 39 b ! C DmSet 0 14ad1 1 ! C DmString 1 14c3b 5 Other ! L 14c3b ! c 1 15571 a categories ! c 1 15562 e CodeElement.pm ! c 1 15561 4 name ! C DmInteger 2 15574 1 ! c 1 15573 9 substMode ! c 2 155c9 db b ! C DmDictionary 0 15595 3 ! C DmString 1 155a7 39 b ! C DmSet 0 153a8 1 ! C DmString 1 15512 5 Other ! L 15512 ! c 1 155a6 a categories ! c 1 15597 9 Global.pm ! c 1 15596 4 name ! C DmInteger 2 155a9 1 ! c 1 155a8 9 substMode ! c 2 155fe d7 b ! C DmDictionary 0 155ca 3 ! C DmString 1 155dc 36 b ! C DmSet 0 a1ba 1 ! C DmString 1 a1e8 5 Other ! L a1e8 ! c 1 155db a categories ! c 1 155cc 8 IPdoc.pm ! c 1 155cb 4 name ! C DmInteger 2 155de 1 ! c 1 155dd 9 substMode ! c 2 15633 da b ! C DmDictionary 0 155ff 3 ! C DmString 1 15611 36 b ! C DmSet 0 a1f9 1 ! C DmString 1 a227 5 Other ! L a227 ! c 1 15610 a categories ! c 1 15601 b NSDoclet.pm ! c 1 15600 4 name ! C DmInteger 2 15613 1 ! c 1 15612 9 substMode ! c 2 15668 d5 b ! C DmDictionary 0 15634 3 ! C DmString 1 15646 36 b ! C DmSet 0 a238 1 ! C DmString 1 a266 5 Other ! L a266 ! c 1 15645 a categories ! c 1 15636 6 Sub.pm ! c 1 15635 4 name ! C DmInteger 2 15648 1 ! c 1 15647 9 substMode ! c 2 15669 5 files ! c 2 15525 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 15524 6 launch ! c 2 15521 4 make ! c 2 15520 4 make ! c 2 15523 0 ! c 2 15522 8 makeFile ! c 5 15526 0 ! c 2 15528 7 modules ! c 2 1551f 5 IPdoc ! c 2 1551e 4 name |
From: Jan T. <de...@us...> - 2002-05-11 13:13:12
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv11007 Modified Files: DebugLibrary.pm Log Message: * removed a print-statement Index: DebugLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DebugLibrary.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebugLibrary.pm 11 May 2002 13:09:03 -0000 1.1 --- DebugLibrary.pm 11 May 2002 13:13:10 -0000 1.2 *************** *** 66,70 **** sub documentFinished { my ( $this, $event ) = @_; - print "documentFinished!!"; my $domWalker = $event -> eventUnknown(); my $document = $domWalker -> currentSource() -> ownerDocument(); --- 66,69 ---- |
From: Jan T. <de...@us...> - 2002-05-11 13:12:38
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv10916 Modified Files: Interpreter.pm Log Message: * added autoload for DebugLibrary Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Interpreter.pm 9 May 2002 19:14:00 -0000 1.5 --- Interpreter.pm 11 May 2002 13:12:35 -0000 1.6 *************** *** 16,20 **** #*/ package NetScript::Interpreter; ! use vars qw($VERSION); use strict; --- 16,20 ---- #*/ package NetScript::Interpreter; ! use strict; *************** *** 29,32 **** --- 29,33 ---- use NetScript::Engine::StatementEvaluator; use NetScript::Libraries::DefaultLibrary; + use NetScript::Libraries::DebugLibrary; use NetScript::Util::XMLParserRelay; use NetScript::Util::FileRetriever; *************** *** 37,40 **** --- 38,46 ---- use XML::DOM2::XMLDOMWriterStyle; + #-------------------------------------------------------- + # Globals + #-------------------------------------------------------- + our $VERSION = '2.0'; # Current Version of Class + # This is for catching errors at compile-time use CGI::Carp qw(fatalsToBrowser set_message); *************** *** 59,104 **** } - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - $VERSION = '2.0'; # Current Version of Class - - #/** - # Constant for a Debug-Event - #*/ - sub DEBUG_EVENT { "NetScript::Interpreter::DEBUG_EVENT"; } - - #/** - # Constant for an Warning-Event - #*/ - sub WARNING_EVENT { "NetScript::Interpreter::WARNING_EVENT"; } - - #/** - # Constant for a Fatal-Error-Event - #*/ - sub FATAL_EVENT { "NetScript::Interpreter::FATAL_EVENT"; } - - #/** - # Constant for an Event, that will be raised before parsing of - # the input file. - #*/ - sub PARSE_START_EVENT { "NetScript::Interpreter::PARSE_START_EVENT"; } - - #/** - # Constant for an Event, that will be raised after parsing of - # the input file. - #*/ - sub PARSE_END_EVENT { "NetScript::Interpreter::PARSE_END_EVENT"; } - - #/** - # Constant for an Event, that will be raised before interpreter will - # terminate. - #*/ - sub INTERPRETER_EXIT_EVENT { "NetScript::Interpreter::INTERPRETER_EXIT_EVENT"; } - - #/** - # Constant for the NetScript namespace URI. - #*/ - sub NETSCRIPT_NAMESPACE_URI { "http://www.insomnia-hq.de/netscript"; } #/** --- 65,68 ---- *************** *** 127,130 **** --- 91,97 ---- my $defLib = NetScript::Libraries::DefaultLibrary -> new(); $defLib -> init( $this ); + + my $debugLib = NetScript::Libraries::DebugLibrary -> new(); + $debugLib -> init( $this ); return $this; # return Object } *************** *** 166,170 **** - $this -> getEventRelay() -> createAndRaiseEvent(&PARSE_START_EVENT()); # start input file parsing my $domparser = XML::DOM2::DOMParser -> new(); --- 133,136 ---- *************** *** 188,192 **** - $this -> getEventRelay() -> createAndRaiseEvent(&PARSE_END_EVENT()); # end input file parsing --- 154,157 ---- *************** *** 194,198 **** # shutdown - $this -> getEventRelay() -> createAndRaiseEvent(&INTERPRETER_EXIT_EVENT()); } --- 159,162 ---- |
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv10534 Modified Files: Attr.pm CDATASection.pm CharacterData.pm Comment.pm DOMException.pm DOMImplementation.pm DOMParser.pm DOMParserStyle.pm DOMWriter.pm DOMWriterStyle.pm Document.pm DocumentFragment.pm DocumentType.pm Element.pm Entity.pm EntityReference.pm NamedNodeMap.pm Node.pm NodeList.pm Notation.pm ProcessingInstruction.pm Text.pm XMLDOMWriterStyle.pm notes.txt Log Message: * increased speed by more than 13% Index: Attr.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Attr.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Attr.pm 17 Mar 2002 19:26:14 -0000 1.5 --- Attr.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Attr; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Attr; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 110,114 **** # FIXME: Support for entity references my $node = $this -> childNodes() -> item( { index => $_ } ); ! if ( $node -> nodeType() == $this -> TEXT_NODE() ) { $result .= $node -> nodeValue(); } --- 110,114 ---- # FIXME: Support for entity references my $node = $this -> childNodes() -> item( { index => $_ } ); ! if ( $node -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { $result .= $node -> nodeValue(); } *************** *** 198,202 **** sub nodeType { my ($this) = @_; ! $this -> ATTRIBUTE_NODE(); } --- 198,202 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ATTRIBUTE_NODE; } Index: CDATASection.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CDATASection.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CDATASection.pm 17 Mar 2002 19:26:14 -0000 1.5 --- CDATASection.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::CDATASection; use base qw(XML::DOM2::Text); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::CDATASection; use base qw(XML::DOM2::Text); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 94,98 **** sub nodeType { my ($this) = @_; ! $this -> CDATA_SECTION_NODE(); } --- 94,98 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::CDATA_SECTION_NODE; } Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CharacterData.pm 9 May 2002 19:09:41 -0000 1.5 --- CharacterData.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::CharacterData; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::CharacterData; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: Comment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Comment.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Comment.pm 17 Mar 2002 19:26:14 -0000 1.5 --- Comment.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Comment; use base qw(XML::DOM2::CharacterData); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Comment; use base qw(XML::DOM2::CharacterData); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 95,99 **** sub nodeType { my ($this) = @_; ! $this -> COMMENT_NODE(); } --- 95,99 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::COMMENT_NODE; } Index: DOMException.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMException.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DOMException.pm 17 Mar 2002 19:26:14 -0000 1.7 --- DOMException.pm 11 May 2002 13:10:23 -0000 1.8 *************** *** 11,15 **** use strict; package XML::DOM2::DOMException; ! use vars qw($VERSION); use Carp; --- 11,15 ---- use strict; package XML::DOM2::DOMException; ! use Carp; *************** *** 17,21 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 17,21 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: DOMImplementation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMImplementation.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DOMImplementation.pm 26 Apr 2002 10:50:52 -0000 1.5 --- DOMImplementation.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 11,15 **** use strict; package XML::DOM2::DOMImplementation; ! use vars qw($VERSION); use XML::DOM2::Document; use XML::DOM2::DOMException; --- 11,15 ---- use strict; package XML::DOM2::DOMImplementation; ! use XML::DOM2::Document; use XML::DOM2::DOMException; *************** *** 18,22 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 18,22 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMParser.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DOMParser.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 11,15 **** use strict; package XML::DOM2::DOMParser; ! use vars qw($VERSION); use XML::DOM2::DOMImplementation; --- 11,15 ---- use strict; package XML::DOM2::DOMParser; ! use XML::DOM2::DOMImplementation; *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 21,25 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: DOMParserStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParserStyle.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMParserStyle.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DOMParserStyle.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 11,15 **** use strict; package XML::DOM2::DOMParserStyle; ! use vars qw($VERSION); # This package is a style which forwards function calls --- 11,15 ---- use strict; package XML::DOM2::DOMParserStyle; ! # This package is a style which forwards function calls *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: DOMWriter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriter.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DOMWriter.pm 26 Apr 2002 10:50:52 -0000 1.2 --- DOMWriter.pm 11 May 2002 13:10:23 -0000 1.3 *************** *** 11,15 **** use strict; package XML::DOM2::DOMWriter; ! use vars qw($VERSION); use XML::DOM2::Node; --- 11,15 ---- use strict; package XML::DOM2::DOMWriter; ! use XML::DOM2::Node; *************** *** 18,22 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 66,81 **** my $nodeType = $child -> nodeType(); $style -> processElement( $child ) ! if ($nodeType == XML::DOM2::Node -> ELEMENT_NODE() ); $style -> processText( $child ) ! if ($nodeType == XML::DOM2::Node -> TEXT_NODE() ); $style -> processPI( $child ) ! if ($nodeType == XML::DOM2::Node -> PROCESSING_INSTRUCTION_NODE()); $style -> processCDATASection( $child ) ! if ($nodeType == XML::DOM2::Node -> CDATA_SECTION_NODE()); $style -> processComment( $child ) ! if ($nodeType == XML::DOM2::Node -> COMMENT_NODE()); #if the node type is an element we have to finish it later ! if ($nodeType == XML::DOM2::Node -> ELEMENT_NODE()) { push ( @elements, $child ); unshift( @childrenList, "ELEMENT" ); --- 66,81 ---- my $nodeType = $child -> nodeType(); $style -> processElement( $child ) ! if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE ); $style -> processText( $child ) ! if ($nodeType == $XML::DOM2::Node::TEXT_NODE ); $style -> processPI( $child ) ! if ($nodeType == $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE); $style -> processCDATASection( $child ) ! if ($nodeType == $XML::DOM2::Node::CDATA_SECTION_NODE); $style -> processComment( $child ) ! if ($nodeType == $XML::DOM2::Node::COMMENT_NODE); #if the node type is an element we have to finish it later ! if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE) { push ( @elements, $child ); unshift( @childrenList, "ELEMENT" ); Index: DOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriterStyle.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DOMWriterStyle.pm 17 Mar 2002 19:26:14 -0000 1.1 --- DOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.2 *************** *** 11,20 **** use strict; package XML::DOM2::DOMWriterStyle; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 11,20 ---- use strict; package XML::DOM2::DOMWriterStyle; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Document.pm 26 Apr 2002 10:50:52 -0000 1.6 --- Document.pm 11 May 2002 13:10:23 -0000 1.7 *************** *** 12,16 **** package XML::DOM2::Document; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Document; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 28,32 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 28,32 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 412,416 **** my $deep = $paramRef -> { deep }; ! if ($node -> nodeType() == XML::DOM2::Node -> ATTRIBUTE_NODE()) { # make a shallow copy my $newNode = $node -> cloneNode(); --- 412,416 ---- my $deep = $paramRef -> { deep }; ! if ($node -> nodeType() == $XML::DOM2::Node::ATTRIBUTE_NODE) { # make a shallow copy my $newNode = $node -> cloneNode(); *************** *** 454,458 **** my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( --- 454,458 ---- my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( *************** *** 486,490 **** my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( --- 486,490 ---- my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( *************** *** 509,513 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_NODE(); } --- 509,513 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_NODE; } Index: DocumentFragment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentFragment.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentFragment.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DocumentFragment.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::DocumentFragment; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::DocumentFragment; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 32,36 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_FRAGMENT_NODE(); } --- 32,36 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE; } Index: DocumentType.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentType.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DocumentType.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::DocumentType; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::DocumentType; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 20,24 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 20,24 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 110,114 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_TYPE_NODE(); } --- 110,114 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_TYPE_NODE; } Index: Element.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Element.pm 26 Apr 2002 10:50:52 -0000 1.6 --- Element.pm 11 May 2002 13:10:23 -0000 1.7 *************** *** 12,16 **** package XML::DOM2::Element; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Element; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 21,25 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 176,180 **** my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == &ELEMENT_NODE() ) { # if an element is found add it to the list if ( $name eq "*" || $child -> nodeName() eq $name) { --- 176,180 ---- my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # if an element is found add it to the list if ( $name eq "*" || $child -> nodeName() eq $name) { *************** *** 223,227 **** my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == &ELEMENT_NODE() ) { # if an element is found add it to the list if ( ( $localName eq "*" || $child -> localName() eq $localName ) && --- 223,227 ---- my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # if an element is found add it to the list if ( ( $localName eq "*" || $child -> localName() eq $localName ) && *************** *** 548,552 **** sub nodeType { my ($this) = @_; ! $this -> ELEMENT_NODE(); } --- 548,552 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ELEMENT_NODE; } Index: Entity.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Entity.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Entity.pm 17 Mar 2002 19:26:14 -0000 1.3 --- Entity.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::Entity; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Entity; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 77,81 **** sub nodeType { my ($this) = @_; ! $this -> ENTITY_NODE(); } --- 77,81 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ENTITY_NODE; } Index: EntityReference.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/EntityReference.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EntityReference.pm 17 Mar 2002 19:26:14 -0000 1.3 --- EntityReference.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::EntityReference; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::EntityReference; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 32,36 **** sub nodeType { my ($this) = @_; ! $this -> ENTITY_REFERENCE_NODE(); } --- 32,36 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ENTITY_REFERENCE_NODE; } Index: NamedNodeMap.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NamedNodeMap.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NamedNodeMap.pm 26 Apr 2002 10:50:52 -0000 1.8 --- NamedNodeMap.pm 11 May 2002 13:10:23 -0000 1.9 *************** *** 11,20 **** use strict; package XML::DOM2::NamedNodeMap; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 11,20 ---- use strict; package XML::DOM2::NamedNodeMap; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Node.pm 9 May 2002 19:09:41 -0000 1.16 --- Node.pm 11 May 2002 13:10:23 -0000 1.17 *************** *** 16,20 **** use strict; package XML::DOM2::Node; - use vars qw($VERSION); use XML::DOM2::NodeList; use XML::DOM2::NamedNodeMap; --- 16,19 ---- *************** *** 23,43 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! sub ELEMENT_NODE { 1; } ! sub ATTRIBUTE_NODE { 2; } ! sub TEXT_NODE { 3; } ! sub CDATA_SECTION_NODE { 4; } ! sub ENTITY_REFERENCE_NODE { 5; } ! sub ENTITY_NODE { 6; } ! sub PROCESSING_INSTRUCTION_NODE { 7; } ! sub COMMENT_NODE { 8; } ! sub DOCUMENT_NODE { 9; } ! sub DOCUMENT_TYPE_NODE { 10; } ! sub DOCUMENT_FRAGMENT_NODE { 11; } ! sub NOTATION_NODE { 12; } #-------------------------------------------------------- --- 22,43 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! ! our $ELEMENT_NODE = 1; ! our $ATTRIBUTE_NODE = 2; ! our $TEXT_NODE = 3; ! our $CDATA_SECTION_NODE = 4; ! our $ENTITY_REFERENCE_NODE = 5; ! our $ENTITY_NODE = 6; ! our $PROCESSING_INSTRUCTION_NODE = 7; ! our $COMMENT_NODE = 8; ! our $DOCUMENT_NODE = 9; ! our $DOCUMENT_TYPE_NODE = 10; ! our $DOCUMENT_FRAGMENT_NODE = 11; ! our $NOTATION_NODE = 12; #-------------------------------------------------------- *************** *** 59,63 **** bless( $this, $class ); # create Object ! $this -> { m_childNodes } = undef; # XML::DOM2::NodeList -> new (); #LAZY $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; --- 59,63 ---- bless( $this, $class ); # create Object ! $this -> { m_childNodes } = XML::DOM2::NodeList -> new (); $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; *************** *** 98,104 **** sub childNodes { my ( $this ) = @_; - unless( defined( $this -> { m_childNodes } ) ) { - $this -> { m_childNodes } = XML::DOM2::NodeList -> new(); - } $this -> { m_childNodes }; } --- 98,101 ---- *************** *** 117,126 **** $this -> { m_firstChild }; - # if ( $this -> childNodes() -> length() > 0 ) { - # return $this -> childNodes() -> item( { index => 0 } ) ; - # } - # else { - # return undef; - # } } --- 114,117 ---- *************** *** 137,148 **** $this -> { m_lastChild }; - # my $len = $this -> childNodes() -> length(); - # - # if ( $len > 0 ) { - # return $this -> childNodes() -> item( { index => $len - 1 } ) ; - # } - # else { - # return undef; - # } } --- 128,131 ---- *************** *** 201,209 **** my $result = undef; SWITCH: { ! $result = "#cdata-section", last SWITCH if $this -> nodeType() == &CDATA_SECTION_NODE(); ! $result = "#comment", last SWITCH if $this -> nodeType() == &COMMENT_NODE(); ! $result = "#document", last SWITCH if $this -> nodeType() == &DOCUMENT_NODE(); ! $result = "#document-fragment", last SWITCH if $this -> nodeType() == &DOCUMENT_FRAGMENT_NODE(); ! $result = "#text", last SWITCH if $this -> nodeType() == &TEXT_NODE(); } $result; --- 184,192 ---- my $result = undef; SWITCH: { ! $result = "#cdata-section", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::CDATA_SECTION_NODE; ! $result = "#comment", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::COMMENT_NODE; ! $result = "#document", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::DOCUMENT_NODE; ! $result = "#document-fragment", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE; ! $result = "#text", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::TEXT_NODE; } $result; *************** *** 361,365 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 344,348 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; *************** *** 495,499 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 478,482 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; *************** *** 691,695 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 674,678 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; Index: NodeList.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NodeList.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NodeList.pm 9 May 2002 19:09:41 -0000 1.11 --- NodeList.pm 11 May 2002 13:10:23 -0000 1.12 *************** *** 11,20 **** use strict; package XML::DOM2::NodeList; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 11,20 ---- use strict; package XML::DOM2::NodeList; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: Notation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Notation.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Notation.pm 17 Mar 2002 19:26:15 -0000 1.3 --- Notation.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::Notation; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Notation; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 66,70 **** sub nodeType { my ($this) = @_; ! $this -> NOTATION_NODE(); } --- 66,70 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::NOTATION_NODE; } Index: ProcessingInstruction.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/ProcessingInstruction.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProcessingInstruction.pm 17 Mar 2002 19:26:15 -0000 1.4 --- ProcessingInstruction.pm 11 May 2002 13:10:23 -0000 1.5 *************** *** 12,16 **** package XML::DOM2::ProcessingInstruction; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::ProcessingInstruction; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 145,149 **** sub nodeType { my ($this) = @_; ! $this -> PROCESSING_INSTRUCTION_NODE(); } --- 145,149 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE; } Index: Text.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Text.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Text.pm 17 Mar 2002 19:26:15 -0000 1.5 --- Text.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Text; use base qw(XML::DOM2::CharacterData); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Text; use base qw(XML::DOM2::CharacterData); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 153,157 **** sub nodeType() { my ($this) = @_; ! $this -> TEXT_NODE(); } --- 153,157 ---- sub nodeType() { my ($this) = @_; ! $XML::DOM2::Node::TEXT_NODE; } Index: XMLDOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/XMLDOMWriterStyle.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XMLDOMWriterStyle.pm 17 Mar 2002 19:27:57 -0000 1.2 --- XMLDOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.3 *************** *** 12,21 **** package XML::DOM2::XMLDOMWriterStyle; use base qw(XML::DOM2::DOMWriterStyle); ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 12,21 ---- package XML::DOM2::XMLDOMWriterStyle; use base qw(XML::DOM2::DOMWriterStyle); ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: notes.txt =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/notes.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** notes.txt 26 Apr 2002 10:50:52 -0000 1.6 --- notes.txt 11 May 2002 13:10:23 -0000 1.7 *************** *** 42,45 **** --- 42,48 ---- sources and the W3C specs. + The following requirements have to be met in order to use this package + + * Perl 5.6 or higher |
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv10362 Modified Files: ConfigFileParser.pm ConfigurationParser.pm FileRetriever.pm PropertyFileParser.pm UIDGenerator.pm XMLParserRelay.pm Log Message: Index: ConfigFileParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/ConfigFileParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfigFileParser.pm 3 May 2002 13:30:39 -0000 1.3 --- ConfigFileParser.pm 11 May 2002 13:09:39 -0000 1.4 *************** *** 20,24 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 20,24 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: ConfigurationParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/ConfigurationParser.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigurationParser.pm 3 May 2002 13:30:39 -0000 1.1 --- ConfigurationParser.pm 11 May 2002 13:09:39 -0000 1.2 *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; $CONFIG_FILE = 'configuration'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; $CONFIG_FILE = 'configuration'; Index: FileRetriever.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/FileRetriever.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileRetriever.pm 3 May 2002 13:30:39 -0000 1.3 --- FileRetriever.pm 11 May 2002 13:09:39 -0000 1.4 *************** *** 17,21 **** use strict; package NetScript::Util::FileRetriever; ! use vars qw($VERSION); #-------------------------------------------------------- --- 17,21 ---- use strict; package NetScript::Util::FileRetriever; ! #-------------------------------------------------------- *************** *** 27,31 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 27,31 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: PropertyFileParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/PropertyFileParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyFileParser.pm 3 May 2002 13:30:39 -0000 1.4 --- PropertyFileParser.pm 11 May 2002 13:09:39 -0000 1.5 *************** *** 15,19 **** package NetScript::Util::PropertyFileParser; ! use vars qw($VERSION); #-------------------------------------------------------- --- 15,19 ---- package NetScript::Util::PropertyFileParser; ! #-------------------------------------------------------- *************** *** 26,30 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 26,30 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: UIDGenerator.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/UIDGenerator.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UIDGenerator.pm 9 May 2002 19:13:03 -0000 1.1 --- UIDGenerator.pm 11 May 2002 13:09:39 -0000 1.2 *************** *** 17,21 **** #*/ package NetScript::Util::UIDGenerator; ! use vars qw($VERSION); use Time::HiRes qw( time ); --- 17,21 ---- #*/ package NetScript::Util::UIDGenerator; ! use Time::HiRes qw( time ); Index: XMLParserRelay.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/XMLParserRelay.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XMLParserRelay.pm 3 May 2002 13:30:39 -0000 1.3 --- XMLParserRelay.pm 11 May 2002 13:09:39 -0000 1.4 *************** *** 15,19 **** #*/ package NetScript::Util::XMLParserRelay; ! use vars qw($VERSION); #-------------------------------------------------------- --- 15,19 ---- #*/ package NetScript::Util::XMLParserRelay; ! #-------------------------------------------------------- *************** *** 26,30 **** # Globals #-------------------------------------------------------- ! $VERSION = "1.0"; #/** --- 26,30 ---- # Globals #-------------------------------------------------------- ! our $VERSION = "1.0"; #/** |
From: Jan T. <de...@us...> - 2002-05-11 13:09:06
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv10237 Modified Files: DefaultLibrary.pm Library.pm Added Files: DebugLibrary.pm Log Message: * added DebugLibrary * several minor fixes --- NEW FILE: DebugLibrary.pm --- #-------------------------------------------------------- # $Id: DebugLibrary.pm,v 1.1 2002/05/11 13:09:03 derkork Exp $ # # Class DebugLibrary # # NetScript 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... #-------------------------------------------------------- use strict; #/** # The debug library catches debug-events and appends all debug # message to the end of the document into a comment node. #*/ package NetScript::Libraries::DebugLibrary; use base qw(NetScript::Libraries::Library); our $VERSION = '1.0'; our $DEBUG_EVENT = "DEBUG_LIBRARY_DEBUG_EVENT"; use NetScript::Engine::EventListener; use NetScript::Engine::EventRelay; use NetScript::Interpreter; use NetScript::Engine::DOMWalker; #/** # Ctor. Creates a new DefaultLibrary Object. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref($proto) || $proto; my $this = $class -> SUPER::new(); $this -> { m_debug } = "\nDebug Messages:\n-----------------\n"; $this; } sub init { my ($this, $interpreter) = @_; $this -> SUPER::init( $interpreter ); # create event listeners for all events my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( $NetScript::Engine::DOMWalker::DOCUMENT_END_EVENT, "documentFinished", $this ); my $eventListener2 = NetScript::Engine::EventListener -> new(); $eventListener2 -> init( $NetScript::Libraries::DebugLibrary::DEBUG_EVENT, "debugEvent", $this ); my $eventRelay = $this -> interpreter() -> getEventRelay(); $eventRelay -> addEventListener( $eventListener1 ); $eventRelay -> addEventListener( $eventListener2 ); } #/** # Called when the document is finished. # @param an instance of <code>NetScript::Engine::Event</code>. # @callback #*/ sub documentFinished { my ( $this, $event ) = @_; print "documentFinished!!"; my $domWalker = $event -> eventUnknown(); my $document = $domWalker -> currentSource() -> ownerDocument(); my $comment = $document -> createComment( { data => $this -> debugMessage() } ); $domWalker -> insertIntoTarget( $comment ); 1; #do not consume event } #/** # Called when a debug message has to be inserted. The message # must be in the eventMessage - field. The eventUnknown-field # should contain the sender of the event. Messages are # printed this way: # <pre> # [sender] message # </pre> # @param an instance of <code>NetScript::Engine::Event</code>. # @callback #*/ sub debugEvent { my ( $this, $event ) = @_; my $sender = $event -> eventUnknown(); my $message = $event -> eventMessage(); $this -> { m_debug } .= "[$sender] $message\n"; 0; # consume the event } #/** # Returns the debug message. Any sequence of 2 or more - is # converted to 2 or more =. # @private #*/ sub debugMessage { my ($this) = @_; my $result = $this -> { m_debug }; $result =~ s/(-[-]+)/"=" x length($1)/gex; $result; } sub shutdown { my ($this) = @_; $this -> SUPER::shutdown(); } 1; #make require happy Index: DefaultLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DefaultLibrary.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DefaultLibrary.pm 9 May 2002 19:12:16 -0000 1.1 --- DefaultLibrary.pm 11 May 2002 13:09:03 -0000 1.2 *************** *** 19,25 **** package NetScript::Libraries::DefaultLibrary; use base qw(NetScript::Libraries::Library); - use vars qw($VERSION); ! $VERSION = '1.0'; use NetScript::Engine::EventListener; --- 19,24 ---- package NetScript::Libraries::DefaultLibrary; use base qw(NetScript::Libraries::Library); ! our $VERSION = '1.0'; use NetScript::Engine::EventListener; *************** *** 49,85 **** my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( ! NetScript::Engine::DOMWalker -> ELEMENT_START_EVENT(), "elementStarted", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener2 = NetScript::Engine::EventListener -> new(); $eventListener2 -> init( ! NetScript::Engine::DOMWalker -> PI_EVENT(), "copyNode", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener3 = NetScript::Engine::EventListener -> new(); $eventListener3 -> init( ! NetScript::Engine::DOMWalker -> TEXT_EVENT(), "copyNode", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener4 = NetScript::Engine::EventListener -> new(); $eventListener4 -> init( ! NetScript::Engine::DOMWalker -> COMMENT_EVENT(), "copyNode", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener5 = NetScript::Engine::EventListener -> new(); $eventListener5 -> init( ! NetScript::Engine::DOMWalker ->OTHER_NODE_EVENT(), "copyNode", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener6 = NetScript::Engine::EventListener -> new(); $eventListener6 -> init( ! NetScript::Engine::DOMWalker -> ELEMENT_END_EVENT(), "elementFinished", $this, ! NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventRelay = $this -> interpreter() -> getEventRelay(); --- 48,84 ---- my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( ! $NetScript::Engine::DOMWalker::ELEMENT_START_EVENT, "elementStarted", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventListener2 = NetScript::Engine::EventListener -> new(); $eventListener2 -> init( ! $NetScript::Engine::DOMWalker::PI_EVENT, "copyNode", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventListener3 = NetScript::Engine::EventListener -> new(); $eventListener3 -> init( ! $NetScript::Engine::DOMWalker::TEXT_EVENT, "copyNode", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventListener4 = NetScript::Engine::EventListener -> new(); $eventListener4 -> init( ! $NetScript::Engine::DOMWalker::COMMENT_EVENT, "copyNode", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventListener5 = NetScript::Engine::EventListener -> new(); $eventListener5 -> init( ! $NetScript::Engine::DOMWalker::OTHER_NODE_EVENT, "copyNode", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventListener6 = NetScript::Engine::EventListener -> new(); $eventListener6 -> init( ! $NetScript::Engine::DOMWalker::ELEMENT_END_EVENT, "elementFinished", $this, ! $NetScript::Engine::EventListener::PRIORITY_LAST ); my $eventRelay = $this -> interpreter() -> getEventRelay(); *************** *** 88,94 **** $eventRelay -> addEventListener( $eventListener3 ); $eventRelay -> addEventListener( $eventListener4 ); - # Test - should double all comments... - # $eventRelay -> addEventListener( $eventListener4 ); - $eventRelay -> addEventListener( $eventListener5 ); $eventRelay -> addEventListener( $eventListener6 ); --- 87,90 ---- *************** *** 98,102 **** # Copies the current node. # @param an instance of <code>NetScript::Engine::Event</code> ! # @public #*/ sub copyNode { --- 94,98 ---- # Copies the current node. # @param an instance of <code>NetScript::Engine::Event</code> ! # @callback #*/ sub copyNode { *************** *** 105,109 **** my $node = $domWalker -> currentSource(); $domWalker -> insertIntoTarget( $node, 1 ); ! 1; # consume event } --- 101,105 ---- my $node = $domWalker -> currentSource(); $domWalker -> insertIntoTarget( $node, 1 ); ! 0; # consume event } *************** *** 111,115 **** # Called when an element starts. # @param an instance of <code>NetScript::Engine::Event</code> ! # @public #*/ sub elementStarted { --- 107,111 ---- # Called when an element starts. # @param an instance of <code>NetScript::Engine::Event</code> ! # @callback #*/ sub elementStarted { *************** *** 119,123 **** push( @{$this -> { m_elemStack }}, $id ); $this -> copyNode( $event ); ! 1; # consume event } --- 115,119 ---- push( @{$this -> { m_elemStack }}, $id ); $this -> copyNode( $event ); ! 0; # consume event } *************** *** 125,129 **** # Called when an element ends. # @param an instance of <code>NetScript::Engine::Event</code> ! # @public #*/ sub elementFinished { --- 121,125 ---- # Called when an element ends. # @param an instance of <code>NetScript::Engine::Event</code> ! # @callback #*/ sub elementFinished { *************** *** 134,138 **** $domWalker -> currentTarget( $node ); $domWalker -> clearMark( $id ); ! 1; # consume event } --- 130,134 ---- $domWalker -> currentTarget( $node ); $domWalker -> clearMark( $id ); ! 0; # consume event } Index: Library.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/Library.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Library.pm 9 May 2002 19:12:16 -0000 1.1 --- Library.pm 11 May 2002 13:09:03 -0000 1.2 *************** *** 20,26 **** #*/ package NetScript::Libraries::Library; - use vars qw($VERSION); ! $VERSION = '1.0'; #/** --- 20,26 ---- #*/ package NetScript::Libraries::Library; ! ! our $VERSION = '1.0'; #/** |
From: Jan T. <de...@us...> - 2002-05-11 13:08:56
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv10197 Modified Files: wipeout.project Log Message: * added DebugLibrary * several minor fixes Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/wipeout.project,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wipeout.project 9 May 2002 19:12:05 -0000 1.2 --- wipeout.project 11 May 2002 13:08:54 -0000 1.3 *************** *** 1,193 **** b ! C DmDictionary 0 4e778 8 ! c 0 4e7f2 9 ! C Category 1 5b79 ! c 0 4e832 4 ! C DmString 2 4e839 2 e3 ! c 2 4e838 a defaultExe ! C DmSet 3 4e83b 1 ! c 2 5b88 2 e3 ! L 5b88 ! c 2 4e83a b executables ! c 3 4e836 3 ! c 2 5b8f 3 *.C ! L 5b8f ! c 2 5b92 4 *.cc ! L 5b92 ! c 2 5b95 5 *.cpp ! L 5b95 ! c 2 4e835 a extensions ! c 2 4e834 a CPP_source ! c 2 4e833 4 name ! c 2 4e7f4 a CPP_source ! c 1 5baa ! c 0 4e878 4 ! c 2 4e87f 2 e3 ! c 2 4e87e a defaultExe ! c 3 4e881 1 ! c 2 5bb7 2 e3 ! L 5bb7 ! c 2 4e880 b executables ! c 3 4e87c 1 ! c 2 5bbe 3 *.c ! L 5bbe ! c 2 4e87b a extensions ! c 2 4e87a 8 C_source ! c 2 4e879 4 name ! c 2 4e7f5 8 C_source ! c 1 5bd3 ! c 0 4e8b2 4 ! c 2 4e8b9 2 e3 ! c 2 4e8b8 a defaultExe ! c 3 4e8bb 1 ! c 2 5be0 2 e3 ! L 5be0 ! c 2 4e8ba b executables ! c 3 4e8b6 1 ! c 2 5be7 3 *.e ! L 5be7 ! c 2 4e8b5 a extensions ! c 2 4e8b4 6 Eiffel ! c 2 4e8b3 4 name ! c 2 4e7f6 6 Eiffel ! c 1 5bfc ! c 0 4e8ec 4 ! c 2 4e8f3 2 e3 ! c 2 4e8f2 a defaultExe ! c 3 4e8f5 1 ! c 2 5c09 2 e3 ! L 5c09 ! c 2 4e8f4 b executables ! c 3 4e8f0 4 ! c 2 5c10 3 *.F ! L 5c10 ! c 2 5c13 3 *.f ! L 5c13 ! c 2 5c16 5 *.for ! L 5c16 ! c 2 5c19 5 *.fpp ! L 5c19 ! c 2 4e8ef a extensions ! c 2 4e8ee 7 Fortran ! c 2 4e8ed 4 name ! c 2 4e7f7 7 Fortran ! c 1 5c2e ! c 0 4e932 4 ! c 2 4e939 2 e3 ! c 2 4e938 a defaultExe ! c 3 4e93b 1 ! c 2 5c3b 2 e3 ! L 5c3b ! c 2 4e93a b executables ! c 3 4e936 2 ! c 2 5c42 3 *.H ! L 5c42 ! c 2 5c45 3 *.h ! L 5c45 ! c 2 4e935 a extensions ! c 2 4e934 6 Header ! c 2 4e933 4 name ! c 2 4e7f8 6 Header ! c 1 5c5a ! c 0 4e970 4 ! c 2 4e977 9 surfboard ! c 2 4e976 a defaultExe ! c 3 4e979 2 ! c 2 5c67 2 e3 ! L 5c67 ! c 2 5c6a 9 surfboard ! L 5c6a ! c 2 4e978 b executables ! c 3 4e974 2 ! c 2 5c71 5 *.htm ! L 5c71 ! c 2 5c74 6 *.html ! L 5c74 ! c 2 4e973 a extensions ! c 2 4e972 4 Html ! c 2 4e971 4 name ! c 2 4e7f9 4 Html ! c 1 5c89 ! c 0 4e9b2 4 ! c 2 4e9b9 2 e3 ! c 2 4e9b8 a defaultExe ! c 3 4e9bb 1 ! c 2 5c96 2 e3 ! L 5c96 ! c 2 4e9ba b executables ! c 3 4e9b6 1 ! c 2 5c9d 6 *.java ! L 5c9d ! c 2 4e9b5 a extensions ! c 2 4e9b4 4 Java ! c 2 4e9b3 4 name ! c 2 4e7fa 4 Java ! c 1 5cb2 ! c 0 4e9ec 4 ! c 2 4e9f3 2 e3 ! c 2 4e9f2 a defaultExe ! c 3 4e9f5 1 ! c 2 5cbf 2 e3 ! L 5cbf ! c 2 4e9f4 b executables ! c 3 4e9f0 1 ! c 2 5cc6 5 *.tex ! L 5cc6 ! c 2 4e9ef a extensions ! c 2 4e9ee 5 Latex ! c 2 4e9ed 4 name ! c 2 4e7fb 5 Latex ! c 1 5cdb ! c 0 4ea26 4 ! c 2 4ea2d 2 e3 ! c 2 4ea2c a defaultExe ! c 3 4ea2f 1 ! c 2 5ce8 2 e3 ! L 5ce8 ! c 2 4ea2e b executables ! c 3 4ea2a 0 ! c 2 4ea29 a extensions ! c 2 4ea28 5 Other ! c 2 4ea27 4 name ! c 2 4e7fc 5 Other ! c 2 4e7f1 a categories ! c 0 4e7fe 1 ! C ProjectDir 4 5d05 ! c 2 5d06 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 5d07 0 0 ! c 2 4e800 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 4e7fd b directories ! C DmBag 5 4e784 2 ! c 2 4e7ba e4 b ! C DmDictionary 0 4e786 3 ! C DmString 1 4e798 39 b ! C DmSet 0 4e5f3 1 ! C DmString 1 4e76d 5 Other ! L 4e76d ! c 1 4e797 a categories ! c 1 4e788 11 DefaultLibrary.pm ! c 1 4e787 4 name ! C DmInteger 2 4e79a 1 ! c 1 4e799 9 substMode ! c 2 4e7ef dc b ! C DmDictionary 0 4e7bb 3 ! C DmString 1 4e7cd 39 b ! C DmSet 0 38f12 1 ! C DmString 1 3908c 5 Other ! L 3908c ! c 1 4e7cc a categories ! c 1 4e7bd a Library.pm ! c 1 4e7bc 4 name ! C DmInteger 2 4e7cf 1 ! c 1 4e7ce 9 substMode ! c 2 4e7f0 5 files ! c 2 4e780 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 4e77f 6 launch ! c 2 4e77c 4 make ! c 2 4e77b 4 make ! c 2 4e77e 0 ! c 2 4e77d 8 makeFile ! c 5 4e781 0 ! c 2 4e783 7 modules ! c 2 4e77a 9 Libraries ! c 2 4e779 4 name --- 1,204 ---- b ! C DmDictionary 0 d0c0 8 ! c 0 d16f 9 ! C Category 1 51b8 ! c 0 d1af 4 ! C DmString 2 d1b6 2 e3 ! c 2 d1b5 a defaultExe ! C DmSet 3 d1b8 1 ! c 2 51c7 2 e3 ! L 51c7 ! c 2 d1b7 b executables ! c 3 d1b3 3 ! c 2 51ce 3 *.C ! L 51ce ! c 2 51d1 4 *.cc ! L 51d1 ! c 2 51d4 5 *.cpp ! L 51d4 ! c 2 d1b2 a extensions ! c 2 d1b1 a CPP_source ! c 2 d1b0 4 name ! c 2 d171 a CPP_source ! c 1 51e9 ! c 0 d1f5 4 ! c 2 d1fc 2 e3 ! c 2 d1fb a defaultExe ! c 3 d1fe 1 ! c 2 51f6 2 e3 ! L 51f6 ! c 2 d1fd b executables ! c 3 d1f9 1 ! c 2 51fd 3 *.c ! L 51fd ! c 2 d1f8 a extensions ! c 2 d1f7 8 C_source ! c 2 d1f6 4 name ! c 2 d172 8 C_source ! c 1 5212 ! c 0 d22f 4 ! c 2 d236 2 e3 ! c 2 d235 a defaultExe ! c 3 d238 1 ! c 2 521f 2 e3 ! L 521f ! c 2 d237 b executables ! c 3 d233 1 ! c 2 5226 3 *.e ! L 5226 ! c 2 d232 a extensions ! c 2 d231 6 Eiffel ! c 2 d230 4 name ! c 2 d173 6 Eiffel ! c 1 523b ! c 0 d269 4 ! c 2 d270 2 e3 ! c 2 d26f a defaultExe ! c 3 d272 1 ! c 2 5248 2 e3 ! L 5248 ! c 2 d271 b executables ! c 3 d26d 4 ! c 2 524f 3 *.F ! L 524f ! c 2 5252 3 *.f ! L 5252 ! c 2 5255 5 *.for ! L 5255 ! c 2 5258 5 *.fpp ! L 5258 ! c 2 d26c a extensions ! c 2 d26b 7 Fortran ! c 2 d26a 4 name ! c 2 d174 7 Fortran ! c 1 526d ! c 0 d2af 4 ! c 2 d2b6 2 e3 ! c 2 d2b5 a defaultExe ! c 3 d2b8 1 ! c 2 527a 2 e3 ! L 527a ! c 2 d2b7 b executables ! c 3 d2b3 2 ! c 2 5281 3 *.H ! L 5281 ! c 2 5284 3 *.h ! L 5284 ! c 2 d2b2 a extensions ! c 2 d2b1 6 Header ! c 2 d2b0 4 name ! c 2 d175 6 Header ! c 1 5299 ! c 0 d2ed 4 ! c 2 d2f4 9 surfboard ! c 2 d2f3 a defaultExe ! c 3 d2f6 2 ! c 2 52a6 2 e3 ! L 52a6 ! c 2 52a9 9 surfboard ! L 52a9 ! c 2 d2f5 b executables ! c 3 d2f1 2 ! c 2 52b0 5 *.htm ! L 52b0 ! c 2 52b3 6 *.html ! L 52b3 ! c 2 d2f0 a extensions ! c 2 d2ef 4 Html ! c 2 d2ee 4 name ! c 2 d176 4 Html ! c 1 52c8 ! c 0 d32f 4 ! c 2 d336 2 e3 ! c 2 d335 a defaultExe ! c 3 d338 1 ! c 2 52d5 2 e3 ! L 52d5 ! c 2 d337 b executables ! c 3 d333 1 ! c 2 52dc 6 *.java ! L 52dc ! c 2 d332 a extensions ! c 2 d331 4 Java ! c 2 d330 4 name ! c 2 d177 4 Java ! c 1 52f1 ! c 0 d369 4 ! c 2 d370 2 e3 ! c 2 d36f a defaultExe ! c 3 d372 1 ! c 2 52fe 2 e3 ! L 52fe ! c 2 d371 b executables ! c 3 d36d 1 ! c 2 5305 5 *.tex ! L 5305 ! c 2 d36c a extensions ! c 2 d36b 5 Latex ! c 2 d36a 4 name ! c 2 d178 5 Latex ! c 1 531a ! c 0 d3a3 4 ! c 2 d3aa 2 e3 ! c 2 d3a9 a defaultExe ! c 3 d3ac 1 ! c 2 5327 2 e3 ! L 5327 ! c 2 d3ab b executables ! c 3 d3a7 0 ! c 2 d3a6 a extensions ! c 2 d3a5 5 Other ! c 2 d3a4 4 name ! c 2 d179 5 Other ! c 2 d16e a categories ! c 0 d17b 1 ! C ProjectDir 4 5344 ! c 2 5345 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 5346 0 0 ! c 2 d17d 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 d17a b directories ! C DmBag 5 d0cc 3 ! c 2 d102 d7 b ! C DmDictionary 0 d0ce 3 ! C DmString 1 d0e0 36 b ! C DmSet 0 cf3b 1 ! C DmString 1 d0b5 5 Other ! L d0b5 ! c 1 d0df a categories ! c 1 d0d0 f DebugLibrary.pm ! c 1 d0cf 4 name ! C DmInteger 2 d0e2 1 ! c 1 d0e1 9 substMode ! c 2 d137 da b ! C DmDictionary 0 d103 3 ! C DmString 1 d115 36 b ! C DmSet 0 537c 1 ! C DmString 1 53aa 5 Other ! L 53aa ! c 1 d114 a categories ! c 1 d105 11 DefaultLibrary.pm ! c 1 d104 4 name ! C DmInteger 2 d117 1 ! c 1 d116 9 substMode ! c 2 d16c d2 b ! C DmDictionary 0 d138 3 ! C DmString 1 d14a 36 b ! C DmSet 0 53bb 1 ! C DmString 1 53e9 5 Other ! L 53e9 ! c 1 d149 a categories ! c 1 d13a a Library.pm ! c 1 d139 4 name ! C DmInteger 2 d14c 1 ! c 1 d14b 9 substMode ! c 2 d16d 5 files ! c 2 d0c8 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 d0c7 6 launch ! c 2 d0c4 4 make ! c 2 d0c3 4 make ! c 2 d0c6 0 ! c 2 d0c5 8 makeFile ! c 5 d0c9 0 ! c 2 d0cb 7 modules ! c 2 d0c2 9 Libraries ! c 2 d0c1 4 name |
From: Jan T. <de...@us...> - 2002-05-11 13:08:23
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv10117 Modified Files: BasicStatement.pm Class.pm DOMWalker.pm Event.pm EventListener.pm EventRelay.pm State.pm Statement.pm StatementEvaluator.pm Log Message: * speed improvements * fixed bug in event relay, which prevented non-priorized listeners from being added * added new events to DOMWalker Index: BasicStatement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/BasicStatement.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BasicStatement.pm 9 May 2002 19:11:03 -0000 1.3 --- BasicStatement.pm 11 May 2002 13:08:20 -0000 1.4 *************** *** 22,26 **** package NetScript::Engine::BasicStatement; use base qw(NetScript::Engine::Statement); ! use vars qw($VERSION); use XML::DOM2::Node; --- 22,26 ---- package NetScript::Engine::BasicStatement; use base qw(NetScript::Engine::Statement); ! use XML::DOM2::Node; *************** *** 29,33 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 29,33 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** *************** *** 75,79 **** # Check for the Node Type. ! if ( $newNode -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() ) { # attributes in elements will be checked for variables my $attributes = $newNode -> attributes(); --- 75,79 ---- # Check for the Node Type. ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # attributes in elements will be checked for variables my $attributes = $newNode -> attributes(); *************** *** 87,91 **** } } ! elsif ( $newNode -> nodeType() == XML::DOM2::Node -> TEXT_NODE() ) { my $text = $newNode -> data(); $text = $interpreter -> getStatementEvaluator() --- 87,91 ---- } } ! elsif ( $newNode -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { my $text = $newNode -> data(); $text = $interpreter -> getStatementEvaluator() Index: Class.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Class.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Class.pm 8 Apr 2002 21:30:14 -0000 1.2 --- Class.pm 11 May 2002 13:08:20 -0000 1.3 *************** *** 14,23 **** #*/ package NetScript::Engine::Class; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 14,23 ---- #*/ package NetScript::Engine::Class; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: DOMWalker.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DOMWalker.pm 9 May 2002 19:11:03 -0000 1.2 --- DOMWalker.pm 11 May 2002 13:08:20 -0000 1.3 *************** *** 21,25 **** #*/ package NetScript::Engine::DOMWalker; ! use vars qw($VERSION); use NetScript::Engine::BasicStatement; --- 21,25 ---- #*/ package NetScript::Engine::DOMWalker; ! use NetScript::Engine::BasicStatement; *************** *** 29,37 **** #/** # Event which is generated upon start of an element. # @public # @final #*/ ! sub ELEMENT_START_EVENT { "DOMWALKER_ELEMENT_START_EVENT"; } #/** --- 29,51 ---- #/** + # Event which is generated upon start of the document + # @public + # @final + #*/ + our $DOCUMENT_START_EVENT = "DOMWALKER_DOCUMENT_START_EVENT"; + + #/** + # Event which is generated upon start of the document + # @public + # @final + #*/ + our $DOCUMENT_END_EVENT = "DOMWALKER_DOCUMENT_END_EVENT"; + + #/** # Event which is generated upon start of an element. # @public # @final #*/ ! our $ELEMENT_START_EVENT = "DOMWALKER_ELEMENT_START_EVENT"; #/** *************** *** 40,44 **** # @final #*/ ! sub ELEMENT_END_EVENT { "DOMWALKER_ELEMENT_END_EVENT"; } #/** --- 54,58 ---- # @final #*/ ! our $ELEMENT_END_EVENT = "DOMWALKER_ELEMENT_END_EVENT"; #/** *************** *** 47,51 **** # @final #*/ ! sub PI_EVENT { "DOMWALKER_PI_EVENT"; } #/** --- 61,65 ---- # @final #*/ ! our $PI_EVENT = "DOMWALKER_PI_EVENT"; #/** *************** *** 54,58 **** # @final #*/ ! sub OTHER_NODE_EVENT { } #/** --- 68,72 ---- # @final #*/ ! our $OTHER_NODE_EVENT = "DOMWALKER_OTHER_NODE_EVENT"; #/** *************** *** 61,65 **** # @final #*/ ! sub TEXT_EVENT { "DOMWALKER_TEXT_EVENT"; } #/** --- 75,79 ---- # @final #*/ ! our $TEXT_EVENT = "DOMWALKER_TEXT_EVENT"; #/** *************** *** 68,72 **** # @final #*/ ! sub COMMENT_EVENT { "DOMWALKER_COMMENT_EVENT"; } #/** --- 82,86 ---- # @final #*/ ! our $COMMENT_EVENT = "DOMWALKER_COMMENT_EVENT"; #/** *************** *** 210,214 **** # set current target node to new node ! if ( $clone -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() && $isRefNode ) { $this -> currentTarget( $clone ) ; --- 224,228 ---- # set current target node to new node ! if ( $clone -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE && $isRefNode ) { $this -> currentTarget( $clone ) ; *************** *** 279,293 **** $this -> currentSource( $node ); ! if ($node -> nodeType == XML::DOM2::Node -> ELEMENT_NODE() ) { ! # create end Event ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $this -> ELEMENT_END_EVENT(), undef, $this ); ! } ! } #/** ! # Creates an even for the given node. # @param an instance of <code>XML::DOM2::Node</code> # @private --- 293,302 ---- $this -> currentSource( $node ); ! $this -> createEndEvent( $node ); } #/** ! # Creates an event for the given node. # @param an instance of <code>XML::DOM2::Node</code> # @private *************** *** 297,318 **** my $nodeType = $node -> nodeType(); my $eventType; ! ! if ( $nodeType == XML::DOM2::Node -> ELEMENT_NODE() ) { ! $eventType = $this -> ELEMENT_START_EVENT(); } ! elsif ( $nodeType == XML::DOM2::Node -> TEXT_NODE() ) { ! $eventType = $this -> TEXT_EVENT(); } ! elsif ( $nodeType == XML::DOM2::Node -> PROCESSING_INSTRUCTION_NODE() ) { ! $eventType = $this -> PI_EVENT(); } ! elsif ( $nodeType == XML::DOM2::Node -> COMMENT_NODE() ) { ! $eventType = $this -> COMMENT_EVENT(); } else { ! $eventType = $this -> OTHER_NODE_EVENT(); } $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $eventType, undef, $this ); } --- 306,353 ---- my $nodeType = $node -> nodeType(); my $eventType; ! if ( $nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { ! $eventType = $NetScript::Engine::DOMWalker::ELEMENT_START_EVENT; } ! elsif ( $nodeType == $XML::DOM2::Node::TEXT_NODE ) { ! $eventType = $NetScript::Engine::DOMWalker::TEXT_EVENT; } ! elsif ( $nodeType == $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE ) { ! $eventType = $NetScript::Engine::DOMWalker::PI_EVENT; } ! elsif ( $nodeType == $XML::DOM2::Node::COMMENT_NODE ) { ! $eventType = $NetScript::Engine::DOMWalker::COMMENT_EVENT; ! } ! elsif ( $nodeType == $XML::DOM2::Node::DOCUMENT_NODE ) { ! $eventType = $NetScript::Engine::DOMWalker::DOCUMENT_START_EVENT; } else { ! $eventType = $NetScript::Engine::DOMWalker::OTHER_NODE_EVENT; } $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $eventType, undef, $this ); + } + + #/** + # Creates an end event for the given node. + # @param an instance of <code>XML::DOM2::Node</code> + # @private + #*/ + sub createEndEvent { + my ( $this, $node ) = @_; + my $nodeType = $node -> nodeType(); + my $eventType; + if ($node -> nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { + $eventType = $NetScript::Engine::DOMWalker::ELEMENT_END_EVENT; + } + elsif ( $node -> nodeType == $XML::DOM2::Node::DOCUMENT_NODE ) { + $eventType = $NetScript::Engine::DOMWalker::DOCUMENT_END_EVENT; + } + else { + # no event on unknown node + return; + } + + $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( + $eventType, undef, $this ); } Index: Event.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Event.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Event.pm 9 May 2002 19:11:03 -0000 1.4 --- Event.pm 11 May 2002 13:08:20 -0000 1.5 *************** *** 14,23 **** use strict; package NetScript::Engine::Event; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 14,23 ---- use strict; package NetScript::Engine::Event; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: EventListener.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/EventListener.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EventListener.pm 9 May 2002 19:11:03 -0000 1.1 --- EventListener.pm 11 May 2002 13:08:20 -0000 1.2 *************** *** 17,21 **** #*/ package NetScript::Engine::EventListener; ! use vars qw($VERSION); #-------------------------------------------------------- --- 17,21 ---- #*/ package NetScript::Engine::EventListener; ! #-------------------------------------------------------- *************** *** 27,31 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 27,31 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** *************** *** 34,38 **** # @final #*/ ! sub PRIORITY_FIRST { 1; } #/** --- 34,38 ---- # @final #*/ ! our $PRIORITY_FIRST = 1; #/** *************** *** 41,45 **** # @final #*/ ! sub PRIORITY_LAST { 2; } #/** --- 41,45 ---- # @final #*/ ! our $PRIORITY_LAST = 2; #/** Index: EventRelay.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/EventRelay.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EventRelay.pm 9 May 2002 19:11:03 -0000 1.5 --- EventRelay.pm 11 May 2002 13:08:20 -0000 1.6 *************** *** 22,26 **** #*/ package NetScript::Engine::EventRelay; ! use vars qw($VERSION); #-------------------------------------------------------- --- 22,26 ---- #*/ package NetScript::Engine::EventRelay; ! #-------------------------------------------------------- *************** *** 33,37 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 33,37 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** *************** *** 66,70 **** my $arrayRef = $this -> { m_EventListeners } -> { $listener -> eventType() }; - # create array if doesn't exist unless ( defined( $arrayRef ) ) { --- 66,69 ---- *************** *** 76,83 **** my $priority = $listener -> priority(); ! if ( $priority == $listener -> PRIORITY_FIRST() ) { unshift( @{ $arrayRef }, $listener ); } ! elsif ( $priority == $listener -> PRIORITY_LAST() ) { push( @{ $arrayRef }, $listener ); } --- 75,82 ---- my $priority = $listener -> priority(); ! if ( $priority == $NetScript::Engine::EventListener::PRIORITY_FIRST ) { unshift( @{ $arrayRef }, $listener ); } ! elsif ( $priority == $NetScript::Engine::EventListener::PRIORITY_LAST ) { push( @{ $arrayRef }, $listener ); } *************** *** 87,92 **** for ( @{ $arrayRef } ) { splice( @{ $arrayRef }, $index, 0, $listener ), last if ! $_ -> priority() != $listener -> PRIORITY_FIRST(); $index++; } } --- 86,95 ---- for ( @{ $arrayRef } ) { splice( @{ $arrayRef }, $index, 0, $listener ), last if ! $_ -> priority() != $NetScript::Engine::EventListener::PRIORITY_FIRST; $index++; + } + # nothing within or all priority-first + if ( $index == scalar( @{$arrayRef} ) ) { + push( @{$arrayRef}, $listener ); # just append } } Index: State.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/State.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** State.pm 1 Apr 2002 20:30:56 -0000 1.2 --- State.pm 11 May 2002 13:08:20 -0000 1.3 *************** *** 12,21 **** use strict; package NetScript::Engine::State; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 12,21 ---- use strict; package NetScript::Engine::State; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: Statement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Statement.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Statement.pm 8 Apr 2002 21:30:14 -0000 1.3 --- Statement.pm 11 May 2002 13:08:20 -0000 1.4 *************** *** 16,25 **** #*/ package NetScript::Engine::Statement; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #/** --- 16,25 ---- #*/ package NetScript::Engine::Statement; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #/** Index: StatementEvaluator.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/StatementEvaluator.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StatementEvaluator.pm 2 May 2002 14:20:04 -0000 1.3 --- StatementEvaluator.pm 11 May 2002 13:08:20 -0000 1.4 *************** *** 14,18 **** #*/ package NetScript::Engine::StatementEvaluator; ! use vars qw($VERSION); --- 14,18 ---- #*/ package NetScript::Engine::StatementEvaluator; ! *************** *** 24,28 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 24,28 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; |
From: Jan T. <de...@us...> - 2002-05-09 19:14:03
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv26834 Modified Files: Interpreter.pm Log Message: * integrated new Event Handling System * autoload of DefaultLibrary Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Interpreter.pm 3 May 2002 13:32:00 -0000 1.4 --- Interpreter.pm 9 May 2002 19:14:00 -0000 1.5 *************** *** 14,18 **** # file and then redirects the work to the libraries which are # registered. - # @author <a href="mailto:ko...@in...">Jan Thomä</a> #*/ package NetScript::Interpreter; --- 14,17 ---- *************** *** 29,35 **** --- 28,36 ---- use NetScript::Engine::EventRelay; use NetScript::Engine::StatementEvaluator; + use NetScript::Libraries::DefaultLibrary; use NetScript::Util::XMLParserRelay; use NetScript::Util::FileRetriever; use NetScript::Util::ConfigurationParser; + use NetScript::Util::UIDGenerator; use XML::DOM2::DOMParser; use XML::DOM2::DOMWriter; *************** *** 117,130 **** $this -> { m_ConfigFile } = "file:./config.xml"; $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); $this -> { m_FileRetriever } = NetScript::Util::FileRetriever -> new( $this ); $this -> { m_StatementEvaluator } = NetScript::Engine::StatementEvaluator -> new( $this ); - $this -> { m_EventRelay } -> - addEventListener( $this, { &FATAL_EVENT() => "onFatalEvent" } ); return $this; # return Object } #/** --- 118,142 ---- $this -> { m_ConfigFile } = "file:./config.xml"; $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); + $this -> { m_UIDGenerator } = + NetScript::Util::UIDGenerator -> new(); $this -> { m_FileRetriever } = NetScript::Util::FileRetriever -> new( $this ); $this -> { m_StatementEvaluator } = NetScript::Engine::StatementEvaluator -> new( $this ); + my $defLib = NetScript::Libraries::DefaultLibrary -> new(); + $defLib -> init( $this ); return $this; # return Object } + #/** + # Returns a unique ID, generated by <code>NetScript::Util::UIDGenerator</code> + # @return a unique ID + # @public + #*/ + sub getUID { + my ( $this ) = @_; + $this -> { m_UIDGenerator } -> createUID(); + } #/** *************** *** 160,167 **** "file:./test.xml" ) } ); ! # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); ! # Walk over the DOM my $resultDOM = $domwalker -> walkOver( $dom ); --- 172,179 ---- "file:./test.xml" ) } ); ! # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); ! # Walk over the DOM my $resultDOM = $domwalker -> walkOver( $dom ); *************** *** 171,177 **** document => $resultDOM, style => $domstyle } ); ! ! # print $this -> getCGI() -> header(); ! # print $string; --- 183,189 ---- document => $resultDOM, style => $domstyle } ); ! ! print $this -> getCGI() -> header(); ! print $string; |
From: Jan T. <de...@us...> - 2002-05-09 19:13:06
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv26609 Added Files: UIDGenerator.pm Log Message: * added a generator for Unique IDs --- NEW FILE: UIDGenerator.pm --- #-------------------------------------------------------- # $Id: UIDGenerator.pm,v 1.1 2002/05/09 19:13:03 derkork Exp $ # # Class UIDGenerator # # NetScript 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... #-------------------------------------------------------- use strict; #/** # The UIDGenerator generates unique IDs for any purpose. # The UIDGenerator uses <code>Time::HiRes</code> for generation # of IDs. The IDs are guaranteed to be unique for the same host. #*/ package NetScript::Util::UIDGenerator; use vars qw($VERSION); use Time::HiRes qw( time ); #/** # Ctor. #*/ sub new { my ($proto ) = @_; my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname my $this = {}; bless( $this, $class ); # create Object return $this; # return Object } #/** # Returns a scalar holding a unique ID. # @return a scalar. # @public #*/ sub createUID { my ( $this ) = @_; "$$-$^T-".time()."-".rand(); } 1; # make require happy |
From: Jan T. <de...@us...> - 2002-05-09 19:13:00
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv26557 Modified Files: wipeout.project Log Message: * added a generator for Unique IDs Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/wipeout.project,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wipeout.project 3 May 2002 13:30:31 -0000 1.4 --- wipeout.project 9 May 2002 19:12:53 -0000 1.5 *************** *** 1,237 **** b ! C DmDictionary 0 25671 8 ! c 0 257bf 9 ! C Category 1 6200 ! c 0 257ff 4 ! C DmString 2 25806 2 e3 ! c 2 25805 a defaultExe ! C DmSet 3 25808 1 ! c 2 620f 2 e3 ! L 620f ! c 2 25807 b executables ! c 3 25803 3 ! c 2 6216 3 *.C ! L 6216 ! c 2 6219 4 *.cc ! L 6219 ! c 2 621c 5 *.cpp ! L 621c ! c 2 25802 a extensions ! c 2 25801 a CPP_source ! c 2 25800 4 name ! c 2 257c1 a CPP_source ! c 1 6231 ! c 0 25845 4 ! c 2 2584c 2 e3 ! c 2 2584b a defaultExe ! c 3 2584e 1 ! c 2 623e 2 e3 ! L 623e ! c 2 2584d b executables ! c 3 25849 1 ! c 2 6245 3 *.c ! L 6245 ! c 2 25848 a extensions ! c 2 25847 8 C_source ! c 2 25846 4 name ! c 2 257c2 8 C_source ! c 1 625a ! c 0 2587f 4 ! c 2 25886 2 e3 ! c 2 25885 a defaultExe ! c 3 25888 1 ! c 2 6267 2 e3 ! L 6267 ! c 2 25887 b executables ! c 3 25883 1 ! c 2 626e 3 *.e ! L 626e ! c 2 25882 a extensions ! c 2 25881 6 Eiffel ! c 2 25880 4 name ! c 2 257c3 6 Eiffel ! c 1 6283 ! c 0 258b9 4 ! c 2 258c0 2 e3 ! c 2 258bf a defaultExe ! c 3 258c2 1 ! c 2 6290 2 e3 ! L 6290 ! c 2 258c1 b executables ! c 3 258bd 4 ! c 2 6297 3 *.F ! L 6297 ! c 2 629a 3 *.f ! L 629a ! c 2 629d 5 *.for ! L 629d ! c 2 62a0 5 *.fpp ! L 62a0 ! c 2 258bc a extensions ! c 2 258bb 7 Fortran ! c 2 258ba 4 name ! c 2 257c4 7 Fortran ! c 1 62b5 ! c 0 258ff 4 ! c 2 25906 2 e3 ! c 2 25905 a defaultExe ! c 3 25908 1 ! c 2 62c2 2 e3 ! L 62c2 ! c 2 25907 b executables ! c 3 25903 2 ! c 2 62c9 3 *.H ! L 62c9 ! c 2 62cc 3 *.h ! L 62cc ! c 2 25902 a extensions ! c 2 25901 6 Header ! c 2 25900 4 name ! c 2 257c5 6 Header ! c 1 62e1 ! c 0 2593d 4 ! c 2 25944 9 surfboard ! c 2 25943 a defaultExe ! c 3 25946 2 ! c 2 62ee 2 e3 ! L 62ee ! c 2 62f1 9 surfboard ! L 62f1 ! c 2 25945 b executables ! c 3 25941 2 ! c 2 62f8 5 *.htm ! L 62f8 ! c 2 62fb 6 *.html ! L 62fb ! c 2 25940 a extensions ! c 2 2593f 4 Html ! c 2 2593e 4 name ! c 2 257c6 4 Html ! c 1 6310 ! c 0 2597f 4 ! c 2 25986 2 e3 ! c 2 25985 a defaultExe ! c 3 25988 1 ! c 2 631d 2 e3 ! L 631d ! c 2 25987 b executables ! c 3 25983 1 ! c 2 6324 6 *.java ! L 6324 ! c 2 25982 a extensions ! c 2 25981 4 Java ! c 2 25980 4 name ! c 2 257c7 4 Java ! c 1 6339 ! c 0 259b9 4 ! c 2 259c0 2 e3 ! c 2 259bf a defaultExe ! c 3 259c2 1 ! c 2 6346 2 e3 ! L 6346 ! c 2 259c1 b executables ! c 3 259bd 1 ! c 2 634d 5 *.tex ! L 634d ! c 2 259bc a extensions ! c 2 259bb 5 Latex ! c 2 259ba 4 name ! c 2 257c8 5 Latex ! c 1 6362 ! c 0 259f3 4 ! c 2 259fa 2 e3 ! c 2 259f9 a defaultExe ! c 3 259fc 1 ! c 2 636f 2 e3 ! L 636f ! c 2 259fb b executables ! c 3 259f7 0 ! c 2 259f6 a extensions ! c 2 259f5 5 Other ! c 2 259f4 4 name ! c 2 257c9 5 Other ! c 2 257be a categories ! c 0 257cb 1 ! C ProjectDir 4 638c ! c 2 638d 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 638e 0 0 ! c 2 257cd 23 netscript2/src/perl/NetScript/Util/ ! c 2 257ca b directories ! C DmBag 5 2567d 6 ! c 2 256b3 e3 b ! C DmDictionary 0 2567f 3 ! C DmString 1 25691 36 b ! C DmSet 0 63ca 1 ! C DmString 1 63f8 5 Other ! L 63f8 ! c 1 25690 a categories ! c 1 25681 13 ConfigFileParser.pm ! c 1 25680 4 name ! C DmInteger 2 25693 1 ! c 1 25692 9 substMode ! c 2 256e8 e9 b ! C DmDictionary 0 256b4 3 ! C DmString 1 256c6 39 b ! C DmSet 0 254ec 1 ! C DmString 1 25666 5 Other ! L 25666 ! c 1 256c5 a categories ! c 1 256b6 16 ConfigurationParser.pm ! c 1 256b5 4 name ! C DmInteger 2 256c8 1 ! c 1 256c7 9 substMode ! c 2 2571d e0 b ! C DmDictionary 0 256e9 3 ! C DmString 1 256fb 36 b ! C DmSet 0 6409 1 ! C DmString 1 6437 5 Other ! L 6437 ! c 1 256fa a categories ! c 1 256eb 10 FileRetriever.pm ! c 1 256ea 4 name ! C DmInteger 2 256fd 1 ! c 1 256fc 9 substMode ! c 2 25752 e4 b ! C DmDictionary 0 2571e 3 ! C DmString 1 25730 36 b ! C DmSet 0 6448 1 ! C DmString 1 6476 5 Other ! L 6476 ! c 1 2572f a categories ! c 1 25720 14 ObjectParserStyle.pm ! c 1 2571f 4 name ! C DmInteger 2 25732 1 ! c 1 25731 9 substMode ! c 2 25787 e5 b ! C DmDictionary 0 25753 3 ! C DmString 1 25765 36 b ! C DmSet 0 6487 1 ! C DmString 1 64b5 5 Other ! L 64b5 ! c 1 25764 a categories ! c 1 25755 15 PropertyFileParser.pm ! c 1 25754 4 name ! C DmInteger 2 25767 1 ! c 1 25766 9 substMode ! c 2 257bc e1 b ! C DmDictionary 0 25788 3 ! C DmString 1 2579a 36 b ! C DmSet 0 64c6 1 ! C DmString 1 64f4 5 Other ! L 64f4 ! c 1 25799 a categories ! c 1 2578a 11 XMLParserRelay.pm ! c 1 25789 4 name ! C DmInteger 2 2579c 1 ! c 1 2579b 9 substMode ! c 2 257bd 5 files ! c 2 25679 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 25678 6 launch ! c 2 25675 4 make ! c 2 25674 4 make ! c 2 25677 0 ! c 2 25676 8 makeFile ! c 5 2567a 0 ! c 2 2567c 7 modules ! c 2 25673 4 Util ! c 2 25672 4 name --- 1,248 ---- b ! C DmDictionary 0 bc15 8 ! c 0 bd98 9 ! C Category 1 646a ! c 0 bdd8 4 ! C DmString 2 bddf 2 e3 ! c 2 bdde a defaultExe ! C DmSet 3 bde1 1 ! c 2 6479 2 e3 ! L 6479 ! c 2 bde0 b executables ! c 3 bddc 3 ! c 2 6480 3 *.C ! L 6480 ! c 2 6483 4 *.cc ! L 6483 ! c 2 6486 5 *.cpp ! L 6486 ! c 2 bddb a extensions ! c 2 bdda a CPP_source ! c 2 bdd9 4 name ! c 2 bd9a a CPP_source ! c 1 649b ! c 0 be1e 4 ! c 2 be25 2 e3 ! c 2 be24 a defaultExe ! c 3 be27 1 ! c 2 64a8 2 e3 ! L 64a8 ! c 2 be26 b executables ! c 3 be22 1 ! c 2 64af 3 *.c ! L 64af ! c 2 be21 a extensions ! c 2 be20 8 C_source ! c 2 be1f 4 name ! c 2 bd9b 8 C_source ! c 1 64c4 ! c 0 be58 4 ! c 2 be5f 2 e3 ! c 2 be5e a defaultExe ! c 3 be61 1 ! c 2 64d1 2 e3 ! L 64d1 ! c 2 be60 b executables ! c 3 be5c 1 ! c 2 64d8 3 *.e ! L 64d8 ! c 2 be5b a extensions ! c 2 be5a 6 Eiffel ! c 2 be59 4 name ! c 2 bd9c 6 Eiffel ! c 1 64ed ! c 0 be92 4 ! c 2 be99 2 e3 ! c 2 be98 a defaultExe ! c 3 be9b 1 ! c 2 64fa 2 e3 ! L 64fa ! c 2 be9a b executables ! c 3 be96 4 ! c 2 6501 3 *.F ! L 6501 ! c 2 6504 3 *.f ! L 6504 ! c 2 6507 5 *.for ! L 6507 ! c 2 650a 5 *.fpp ! L 650a ! c 2 be95 a extensions ! c 2 be94 7 Fortran ! c 2 be93 4 name ! c 2 bd9d 7 Fortran ! c 1 651f ! c 0 bed8 4 ! c 2 bedf 2 e3 ! c 2 bede a defaultExe ! c 3 bee1 1 ! c 2 652c 2 e3 ! L 652c ! c 2 bee0 b executables ! c 3 bedc 2 ! c 2 6533 3 *.H ! L 6533 ! c 2 6536 3 *.h ! L 6536 ! c 2 bedb a extensions ! c 2 beda 6 Header ! c 2 bed9 4 name ! c 2 bd9e 6 Header ! c 1 654b ! c 0 bf16 4 ! c 2 bf1d 9 surfboard ! c 2 bf1c a defaultExe ! c 3 bf1f 2 ! c 2 6558 2 e3 ! L 6558 ! c 2 655b 9 surfboard ! L 655b ! c 2 bf1e b executables ! c 3 bf1a 2 ! c 2 6562 5 *.htm ! L 6562 ! c 2 6565 6 *.html ! L 6565 ! c 2 bf19 a extensions ! c 2 bf18 4 Html ! c 2 bf17 4 name ! c 2 bd9f 4 Html ! c 1 657a ! c 0 bf58 4 ! c 2 bf5f 2 e3 ! c 2 bf5e a defaultExe ! c 3 bf61 1 ! c 2 6587 2 e3 ! L 6587 ! c 2 bf60 b executables ! c 3 bf5c 1 ! c 2 658e 6 *.java ! L 658e ! c 2 bf5b a extensions ! c 2 bf5a 4 Java ! c 2 bf59 4 name ! c 2 bda0 4 Java ! c 1 65a3 ! c 0 bf92 4 ! c 2 bf99 2 e3 ! c 2 bf98 a defaultExe ! c 3 bf9b 1 ! c 2 65b0 2 e3 ! L 65b0 ! c 2 bf9a b executables ! c 3 bf96 1 ! c 2 65b7 5 *.tex ! L 65b7 ! c 2 bf95 a extensions ! c 2 bf94 5 Latex ! c 2 bf93 4 name ! c 2 bda1 5 Latex ! c 1 65cc ! c 0 bfcc 4 ! c 2 bfd3 2 e3 ! c 2 bfd2 a defaultExe ! c 3 bfd5 1 ! c 2 65d9 2 e3 ! L 65d9 ! c 2 bfd4 b executables ! c 3 bfd0 0 ! c 2 bfcf a extensions ! c 2 bfce 5 Other ! c 2 bfcd 4 name ! c 2 bda2 5 Other ! c 2 bd97 a categories ! c 0 bda4 1 ! C ProjectDir 4 65f6 ! c 2 65f7 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 65f8 0 0 ! c 2 bda6 23 netscript2/src/perl/NetScript/Util/ ! c 2 bda3 b directories ! C DmBag 5 bc21 7 ! c 2 bc57 dc b ! C DmDictionary 0 bc23 3 ! C DmString 1 bc35 36 b ! C DmSet 0 6636 1 ! C DmString 1 6664 5 Other ! L 6664 ! c 1 bc34 a categories ! c 1 bc25 13 ConfigFileParser.pm ! c 1 bc24 4 name ! C DmInteger 2 bc37 1 ! c 1 bc36 9 substMode ! c 2 bc8c df b ! C DmDictionary 0 bc58 3 ! C DmString 1 bc6a 36 b ! C DmSet 0 6675 1 ! C DmString 1 66a3 5 Other ! L 66a3 ! c 1 bc69 a categories ! c 1 bc5a 16 ConfigurationParser.pm ! c 1 bc59 4 name ! C DmInteger 2 bc6c 1 ! c 1 bc6b 9 substMode ! c 2 bcc1 d9 b ! C DmDictionary 0 bc8d 3 ! C DmString 1 bc9f 36 b ! C DmSet 0 66b4 1 ! C DmString 1 66e2 5 Other ! L 66e2 ! c 1 bc9e a categories ! c 1 bc8f 10 FileRetriever.pm ! c 1 bc8e 4 name ! C DmInteger 2 bca1 1 ! c 1 bca0 9 substMode ! c 2 bcf6 dd b ! C DmDictionary 0 bcc2 3 ! C DmString 1 bcd4 36 b ! C DmSet 0 66f3 1 ! C DmString 1 6721 5 Other ! L 6721 ! c 1 bcd3 a categories ! c 1 bcc4 14 ObjectParserStyle.pm ! c 1 bcc3 4 name ! C DmInteger 2 bcd6 1 ! c 1 bcd5 9 substMode ! c 2 bd2b de b ! C DmDictionary 0 bcf7 3 ! C DmString 1 bd09 36 b ! C DmSet 0 6732 1 ! C DmString 1 6760 5 Other ! L 6760 ! c 1 bd08 a categories ! c 1 bcf9 15 PropertyFileParser.pm ! c 1 bcf8 4 name ! C DmInteger 2 bd0b 1 ! c 1 bd0a 9 substMode ! c 2 bd60 d7 b ! C DmDictionary 0 bd2c 3 ! C DmString 1 bd3e 36 b ! C DmSet 0 ba90 1 ! C DmString 1 bc0a 5 Other ! L bc0a ! c 1 bd3d a categories ! c 1 bd2e f UIDGenerator.pm ! c 1 bd2d 4 name ! C DmInteger 2 bd40 1 ! c 1 bd3f 9 substMode ! c 2 bd95 da b ! C DmDictionary 0 bd61 3 ! C DmString 1 bd73 36 b ! C DmSet 0 6771 1 ! C DmString 1 679f 5 Other ! L 679f ! c 1 bd72 a categories ! c 1 bd63 11 XMLParserRelay.pm ! c 1 bd62 4 name ! C DmInteger 2 bd75 1 ! c 1 bd74 9 substMode ! c 2 bd96 5 files ! c 2 bc1d 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 bc1c 6 launch ! c 2 bc19 4 make ! c 2 bc18 4 make ! c 2 bc1b 0 ! c 2 bc1a 8 makeFile ! c 5 bc1e 0 ! c 2 bc20 7 modules ! c 2 bc17 4 Util ! c 2 bc16 4 name |
From: Jan T. <de...@us...> - 2002-05-09 19:12:20
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv26260 Added Files: DefaultLibrary.pm Library.pm Log Message: * created Library interface * added Default Library (fallback) --- NEW FILE: DefaultLibrary.pm --- #-------------------------------------------------------- # $Id: DefaultLibrary.pm,v 1.1 2002/05/09 19:12:16 derkork Exp $ # # Class DefaultLibrary # # NetScript 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... #-------------------------------------------------------- use strict; #/** # The default library is a simple copy-tag-library. It catches # all events thrown by the <code>NetScript::Engine::DOMWalker</code> # and processes them. The Listeners are set to <code>PRIORITY_LAST</code> # so other libraries are able to process special Tags themselves. #*/ package NetScript::Libraries::DefaultLibrary; use base qw(NetScript::Libraries::Library); use vars qw($VERSION); $VERSION = '1.0'; use NetScript::Engine::EventListener; use NetScript::Engine::EventRelay; use NetScript::Interpreter; use NetScript::Engine::DOMWalker; #/** # Ctor. Creates a new DefaultLibrary Object. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref($proto) || $proto; my $this = $class -> SUPER::new(); my @elemStack = (); $this -> { m_elemStack } = \@elemStack; $this; } sub init { my ($this, $interpreter) = @_; $this -> SUPER::init( $interpreter ); # create event listeners for all events my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( NetScript::Engine::DOMWalker -> ELEMENT_START_EVENT(), "elementStarted", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener2 = NetScript::Engine::EventListener -> new(); $eventListener2 -> init( NetScript::Engine::DOMWalker -> PI_EVENT(), "copyNode", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener3 = NetScript::Engine::EventListener -> new(); $eventListener3 -> init( NetScript::Engine::DOMWalker -> TEXT_EVENT(), "copyNode", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener4 = NetScript::Engine::EventListener -> new(); $eventListener4 -> init( NetScript::Engine::DOMWalker -> COMMENT_EVENT(), "copyNode", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener5 = NetScript::Engine::EventListener -> new(); $eventListener5 -> init( NetScript::Engine::DOMWalker ->OTHER_NODE_EVENT(), "copyNode", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventListener6 = NetScript::Engine::EventListener -> new(); $eventListener6 -> init( NetScript::Engine::DOMWalker -> ELEMENT_END_EVENT(), "elementFinished", $this, NetScript::Engine::EventListener -> PRIORITY_LAST() ); my $eventRelay = $this -> interpreter() -> getEventRelay(); $eventRelay -> addEventListener( $eventListener1 ); $eventRelay -> addEventListener( $eventListener2 ); $eventRelay -> addEventListener( $eventListener3 ); $eventRelay -> addEventListener( $eventListener4 ); # Test - should double all comments... # $eventRelay -> addEventListener( $eventListener4 ); $eventRelay -> addEventListener( $eventListener5 ); $eventRelay -> addEventListener( $eventListener6 ); } #/** # Copies the current node. # @param an instance of <code>NetScript::Engine::Event</code> # @public #*/ sub copyNode { my ($this, $event) = @_; my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); $domWalker -> insertIntoTarget( $node, 1 ); 1; # consume event } #/** # Called when an element starts. # @param an instance of <code>NetScript::Engine::Event</code> # @public #*/ sub elementStarted { my ($this, $event) = @_; my $domWalker = $event -> eventUnknown(); my $id = $domWalker -> markCurrentTarget(); push( @{$this -> { m_elemStack }}, $id ); $this -> copyNode( $event ); 1; # consume event } #/** # Called when an element ends. # @param an instance of <code>NetScript::Engine::Event</code> # @public #*/ sub elementFinished { my ($this, $event) = @_; my $domWalker = $event -> eventUnknown(); my $id = pop( @{$this -> { m_elemStack }} ); my $node = $domWalker -> markedNode( $id ); $domWalker -> currentTarget( $node ); $domWalker -> clearMark( $id ); 1; # consume event } sub shutdown { my ($this) = @_; $this -> SUPER::shutdown(); } 1; #make require happy --- NEW FILE: Library.pm --- #-------------------------------------------------------- # NetScript Library Class # $Id: Library.pm,v 1.1 2002/05/09 19:12:16 derkork Exp $ # # NetScript 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... #-------------------------------------------------------- use strict; #/** # This is the base class of all Netscript Libraries. Libraries # should be derived from this class,to make sure, they implement # the interface. Libraries communicate via Events. The # Interpreter and other libraries send Events which can be # retrieved by the libraries. The libraries can then react # to them and also send events themselves. # @abstract #*/ package NetScript::Libraries::Library; use vars qw($VERSION); $VERSION = '1.0'; #/** # Ctor. Creates a new Library Object. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname # Create a Class using the Hash-As-An-Object-Idiom my $this = {}; bless( $this, $class ); # create Object $this -> { m_interpreter } = undef; # Return this. $this; } #/** # This sub is called by the interpreter to allow the library to # do any initial setup necessary. # @param an instance of NetScript::Interpreter # @public # @abstract # @note subclasses should call this sub if they override it #*/ sub init { my ($this, $interpreter) = @_; $this -> { m_interpreter } = $interpreter; } #/** # This sub is called by the interpreter to allow the library # to do shutdown procedures. # @public # @abstract # @note subclasses should call this sub, if they override it #*/ sub shutdown { } #/** # Returns an instance of <code>NetScript::Interpreter</code> # @public #*/ sub interpreter { my ( $this ) = @_; $this -> { m_interpreter }; } 1; #make require happy |
From: Jan T. <de...@us...> - 2002-05-09 19:12:09
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv26205 Modified Files: wipeout.project Log Message: * created Library interface * added Default Library (fallback) Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/wipeout.project,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wipeout.project 2 Aug 2001 22:00:43 -0000 1.1 --- wipeout.project 9 May 2002 19:12:05 -0000 1.2 *************** *** 1,171 **** b ! C DmDictionary 0 a7a1 8 ! c 0 a7b1 9 ! C Category 1 8f9a ! c 0 a7f1 4 ! C DmString 2 a7f8 2 e3 ! c 2 a7f7 a defaultExe ! C DmSet 3 a7fa 1 ! c 2 8fac 2 e3 ! L 8fac ! c 2 a7f9 b executables ! c 3 a7f5 3 ! c 2 8fa2 3 *.C ! L 8fa2 ! c 2 8fa4 4 *.cc ! L 8fa4 ! c 2 8fa6 5 *.cpp ! L 8fa6 ! c 2 a7f4 a extensions ! c 2 a7f3 a CPP_source ! c 2 a7f2 4 name ! c 2 a7b3 a CPP_source ! c 1 8fb0 ! c 0 a837 4 ! c 2 a83e 2 e3 ! c 2 a83d a defaultExe ! c 3 a840 1 ! c 2 8fbe 2 e3 ! L 8fbe ! c 2 a83f b executables ! c 3 a83b 1 ! c 2 8fb8 3 *.c ! L 8fb8 ! c 2 a83a a extensions ! c 2 a839 8 C_source ! c 2 a838 4 name ! c 2 a7b4 8 C_source ! c 1 8fc2 ! c 0 a871 4 ! c 2 a878 2 e3 ! c 2 a877 a defaultExe ! c 3 a87a 1 ! c 2 8fd0 2 e3 ! L 8fd0 ! c 2 a879 b executables ! c 3 a875 1 ! c 2 8fca 3 *.e ! L 8fca ! c 2 a874 a extensions ! c 2 a873 6 Eiffel ! c 2 a872 4 name ! c 2 a7b5 6 Eiffel ! c 1 8fd4 ! c 0 a8ab 4 ! c 2 a8b2 2 e3 ! c 2 a8b1 a defaultExe ! c 3 a8b4 1 ! c 2 8fe8 2 e3 ! L 8fe8 ! c 2 a8b3 b executables ! c 3 a8af 4 ! c 2 8fdc 3 *.F ! L 8fdc ! c 2 8fde 3 *.f ! L 8fde ! c 2 8fe0 5 *.for ! L 8fe0 ! c 2 8fe2 5 *.fpp ! L 8fe2 ! c 2 a8ae a extensions ! c 2 a8ad 7 Fortran ! c 2 a8ac 4 name ! c 2 a7b6 7 Fortran ! c 1 8fec ! c 0 a8f1 4 ! c 2 a8f8 2 e3 ! c 2 a8f7 a defaultExe ! c 3 a8fa 1 ! c 2 8ffc 2 e3 ! L 8ffc ! c 2 a8f9 b executables ! c 3 a8f5 2 ! c 2 8ff4 3 *.H ! L 8ff4 ! c 2 8ff6 3 *.h ! L 8ff6 ! c 2 a8f4 a extensions ! c 2 a8f3 6 Header ! c 2 a8f2 4 name ! c 2 a7b7 6 Header ! c 1 9000 ! c 0 a92f 4 ! c 2 a936 9 surfboard ! c 2 a935 a defaultExe ! c 3 a938 2 ! c 2 9010 2 e3 ! L 9010 ! c 2 9012 9 surfboard ! L 9012 ! c 2 a937 b executables ! c 3 a933 2 ! c 2 9008 5 *.htm ! L 9008 ! c 2 900a 6 *.html ! L 900a ! c 2 a932 a extensions ! c 2 a931 4 Html ! c 2 a930 4 name ! c 2 a7b8 4 Html ! c 1 9016 ! c 0 a971 4 ! c 2 a978 2 e3 ! c 2 a977 a defaultExe ! c 3 a97a 1 ! c 2 9024 2 e3 ! L 9024 ! c 2 a979 b executables ! c 3 a975 1 ! c 2 901e 6 *.java ! L 901e ! c 2 a974 a extensions ! c 2 a973 4 Java ! c 2 a972 4 name ! c 2 a7b9 4 Java ! c 1 9028 ! c 0 a9ab 4 ! c 2 a9b2 2 e3 ! c 2 a9b1 a defaultExe ! c 3 a9b4 1 ! c 2 9036 2 e3 ! L 9036 ! c 2 a9b3 b executables ! c 3 a9af 1 ! c 2 9030 5 *.tex ! L 9030 ! c 2 a9ae a extensions ! c 2 a9ad 5 Latex ! c 2 a9ac 4 name ! c 2 a7ba 5 Latex ! c 1 903a ! c 0 a9e5 4 ! c 2 a9ec 2 e3 ! c 2 a9eb a defaultExe ! c 3 a9ee 1 ! c 2 9045 2 e3 ! L 9045 ! c 2 a9ed b executables ! c 3 a9e9 0 ! c 2 a9e8 a extensions ! c 2 a9e7 5 Other ! c 2 a9e6 4 name ! c 2 a7bb 5 Other ! c 2 a7b0 a categories ! c 0 a7bd 1 ! C ProjectDir 4 9072 ! c 2 9073 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 9074 0 0 ! c 2 a7bf 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 a7bc b directories ! C DmBag 5 a7ad 0 ! c 2 a7af 5 files ! c 2 a7a9 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 a7a8 6 launch ! c 2 a7a5 4 make ! c 2 a7a4 4 make ! c 2 a7a7 0 ! c 2 a7a6 8 makeFile ! c 5 a7aa 0 ! c 2 a7ac 7 modules ! c 2 a7a3 9 Libraries ! c 2 a7a2 4 name --- 1,193 ---- b ! C DmDictionary 0 4e778 8 ! c 0 4e7f2 9 ! C Category 1 5b79 ! c 0 4e832 4 ! C DmString 2 4e839 2 e3 ! c 2 4e838 a defaultExe ! C DmSet 3 4e83b 1 ! c 2 5b88 2 e3 ! L 5b88 ! c 2 4e83a b executables ! c 3 4e836 3 ! c 2 5b8f 3 *.C ! L 5b8f ! c 2 5b92 4 *.cc ! L 5b92 ! c 2 5b95 5 *.cpp ! L 5b95 ! c 2 4e835 a extensions ! c 2 4e834 a CPP_source ! c 2 4e833 4 name ! c 2 4e7f4 a CPP_source ! c 1 5baa ! c 0 4e878 4 ! c 2 4e87f 2 e3 ! c 2 4e87e a defaultExe ! c 3 4e881 1 ! c 2 5bb7 2 e3 ! L 5bb7 ! c 2 4e880 b executables ! c 3 4e87c 1 ! c 2 5bbe 3 *.c ! L 5bbe ! c 2 4e87b a extensions ! c 2 4e87a 8 C_source ! c 2 4e879 4 name ! c 2 4e7f5 8 C_source ! c 1 5bd3 ! c 0 4e8b2 4 ! c 2 4e8b9 2 e3 ! c 2 4e8b8 a defaultExe ! c 3 4e8bb 1 ! c 2 5be0 2 e3 ! L 5be0 ! c 2 4e8ba b executables ! c 3 4e8b6 1 ! c 2 5be7 3 *.e ! L 5be7 ! c 2 4e8b5 a extensions ! c 2 4e8b4 6 Eiffel ! c 2 4e8b3 4 name ! c 2 4e7f6 6 Eiffel ! c 1 5bfc ! c 0 4e8ec 4 ! c 2 4e8f3 2 e3 ! c 2 4e8f2 a defaultExe ! c 3 4e8f5 1 ! c 2 5c09 2 e3 ! L 5c09 ! c 2 4e8f4 b executables ! c 3 4e8f0 4 ! c 2 5c10 3 *.F ! L 5c10 ! c 2 5c13 3 *.f ! L 5c13 ! c 2 5c16 5 *.for ! L 5c16 ! c 2 5c19 5 *.fpp ! L 5c19 ! c 2 4e8ef a extensions ! c 2 4e8ee 7 Fortran ! c 2 4e8ed 4 name ! c 2 4e7f7 7 Fortran ! c 1 5c2e ! c 0 4e932 4 ! c 2 4e939 2 e3 ! c 2 4e938 a defaultExe ! c 3 4e93b 1 ! c 2 5c3b 2 e3 ! L 5c3b ! c 2 4e93a b executables ! c 3 4e936 2 ! c 2 5c42 3 *.H ! L 5c42 ! c 2 5c45 3 *.h ! L 5c45 ! c 2 4e935 a extensions ! c 2 4e934 6 Header ! c 2 4e933 4 name ! c 2 4e7f8 6 Header ! c 1 5c5a ! c 0 4e970 4 ! c 2 4e977 9 surfboard ! c 2 4e976 a defaultExe ! c 3 4e979 2 ! c 2 5c67 2 e3 ! L 5c67 ! c 2 5c6a 9 surfboard ! L 5c6a ! c 2 4e978 b executables ! c 3 4e974 2 ! c 2 5c71 5 *.htm ! L 5c71 ! c 2 5c74 6 *.html ! L 5c74 ! c 2 4e973 a extensions ! c 2 4e972 4 Html ! c 2 4e971 4 name ! c 2 4e7f9 4 Html ! c 1 5c89 ! c 0 4e9b2 4 ! c 2 4e9b9 2 e3 ! c 2 4e9b8 a defaultExe ! c 3 4e9bb 1 ! c 2 5c96 2 e3 ! L 5c96 ! c 2 4e9ba b executables ! c 3 4e9b6 1 ! c 2 5c9d 6 *.java ! L 5c9d ! c 2 4e9b5 a extensions ! c 2 4e9b4 4 Java ! c 2 4e9b3 4 name ! c 2 4e7fa 4 Java ! c 1 5cb2 ! c 0 4e9ec 4 ! c 2 4e9f3 2 e3 ! c 2 4e9f2 a defaultExe ! c 3 4e9f5 1 ! c 2 5cbf 2 e3 ! L 5cbf ! c 2 4e9f4 b executables ! c 3 4e9f0 1 ! c 2 5cc6 5 *.tex ! L 5cc6 ! c 2 4e9ef a extensions ! c 2 4e9ee 5 Latex ! c 2 4e9ed 4 name ! c 2 4e7fb 5 Latex ! c 1 5cdb ! c 0 4ea26 4 ! c 2 4ea2d 2 e3 ! c 2 4ea2c a defaultExe ! c 3 4ea2f 1 ! c 2 5ce8 2 e3 ! L 5ce8 ! c 2 4ea2e b executables ! c 3 4ea2a 0 ! c 2 4ea29 a extensions ! c 2 4ea28 5 Other ! c 2 4ea27 4 name ! c 2 4e7fc 5 Other ! c 2 4e7f1 a categories ! c 0 4e7fe 1 ! C ProjectDir 4 5d05 ! c 2 5d06 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 5d07 0 0 ! c 2 4e800 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 4e7fd b directories ! C DmBag 5 4e784 2 ! c 2 4e7ba e4 b ! C DmDictionary 0 4e786 3 ! C DmString 1 4e798 39 b ! C DmSet 0 4e5f3 1 ! C DmString 1 4e76d 5 Other ! L 4e76d ! c 1 4e797 a categories ! c 1 4e788 11 DefaultLibrary.pm ! c 1 4e787 4 name ! C DmInteger 2 4e79a 1 ! c 1 4e799 9 substMode ! c 2 4e7ef dc b ! C DmDictionary 0 4e7bb 3 ! C DmString 1 4e7cd 39 b ! C DmSet 0 38f12 1 ! C DmString 1 3908c 5 Other ! L 3908c ! c 1 4e7cc a categories ! c 1 4e7bd a Library.pm ! c 1 4e7bc 4 name ! C DmInteger 2 4e7cf 1 ! c 1 4e7ce 9 substMode ! c 2 4e7f0 5 files ! c 2 4e780 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 4e77f 6 launch ! c 2 4e77c 4 make ! c 2 4e77b 4 make ! c 2 4e77e 0 ! c 2 4e77d 8 makeFile ! c 5 4e781 0 ! c 2 4e783 7 modules ! c 2 4e77a 9 Libraries ! c 2 4e779 4 name |
From: Jan T. <de...@us...> - 2002-05-09 19:11:10
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv25828 Modified Files: BasicStatement.pm DOMWalker.pm Event.pm EventRelay.pm Added Files: EventListener.pm Log Message: * re-implemented DOMWalker * re-implemented Event System * added EventListener --- NEW FILE: EventListener.pm --- #-------------------------------------------------------- # $Id: EventListener.pm,v 1.1 2002/05/09 19:11:03 derkork Exp $ # # Class EventListener # NetScript 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... #-------------------------------------------------------- use strict; #/** # An EventListener listens to an event and calls a method of an # object, when receiving the event. The event listener decides # whether it consumes the event or releases it to be sent to # other event listeners. #*/ package NetScript::Engine::EventListener; use vars qw($VERSION); #-------------------------------------------------------- # Imports #-------------------------------------------------------- use NetScript::Engine::Event; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #/** # Constant for "Listener should be informed first". # @public # @final #*/ sub PRIORITY_FIRST { 1; } #/** # Constant for "Listener should be informed last". # @public # @final #*/ sub PRIORITY_LAST { 2; } #/** # Ctor. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname # Create a Class using the Hash-As-An-Object-Idiom my $this = {}; bless( $this, $class ); # create Object $this -> { m_Object } = undef; $this -> { m_Sub } = undef; $this -> { m_EventType } = undef; $this -> { m_Priority } = 0; return $this; # return Object } #/** # Initialises the event listener. # @param a scalar holding the event type to which this listener # should listen. # @param the name of the callback method that should be called # upon receipt of an event of the appropriate type. Callback # methods have to return a boolean value specifying whether # the event should be consumed or not. # @param an object on which the callback method should be called # @optional a scalar holding one of these: # <ul><li><code>PRIORITY_FIRST</code> - specifies that the listener # should be informed before all other listeners.</li> # <li><code>PRIORITY_LAST</code> - specifies, that the listener # should be informed after all other listeners.</li></ul> # If this parameter is not specified the order is arbitrary. If # more than one listener wants to be informed first or last on the # same event, the order is also arbitrary. Use with caution. # @public #*/ sub init { my ( $this, $eventType, $sub, $object, $priority ) = @_; $this -> { m_Object } = $object; $this -> { m_Sub } = $sub; $this -> { m_EventType } = $eventType; $this -> { m_Priority } = $priority; } #/** # Returns the Event type to which this listener is listening. # @public #*/ sub eventType { my ( $this ) = @_; $this -> { m_EventType }; } #/** # Returns the priority of this listener. # @public #*/ sub priority { my ($this) = @_; $this -> { m_Priority }; } #/** # Fires the Event to the attached object. # @param an instance of <code>NetScript::Engine::Event</code> # @return a boolean value specifying if the event was consumed or not. # @public #*/ sub fireEvent { my ( $this, $event ) = @_; my $object = $this -> { m_Object }; my $sub = $this -> { m_Sub }; $object -> $sub( $event ); } 1; # make "require" happy Index: BasicStatement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/BasicStatement.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BasicStatement.pm 26 Apr 2002 10:49:06 -0000 1.2 --- BasicStatement.pm 9 May 2002 19:11:03 -0000 1.3 *************** *** 35,39 **** #*/ sub new { ! my ($proto, $argsRef) = @_; my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname --- 35,39 ---- #*/ sub new { ! my ($proto) = @_; my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname *************** *** 60,64 **** #/** # Returns a copy of the node. Additionally replaces ! # variables in text nodes, # @todo Support for ProcessingInstruction # @return the value of the statement (XML::DOM2::Node) --- 60,65 ---- #/** # Returns a copy of the node. Additionally replaces ! # variables in text nodes, ProcessingInstractions, Element ! # attributes and comments. # @todo Support for ProcessingInstruction # @return the value of the statement (XML::DOM2::Node) Index: DOMWalker.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DOMWalker.pm 26 Apr 2002 10:49:06 -0000 1.1 --- DOMWalker.pm 9 May 2002 19:11:03 -0000 1.2 *************** *** 13,18 **** #/** # The DOMWalker is the main executing Instance of the Interpreter ! # It walks over the incoming DOM, evaluates the Nodes and creates ! # the Result-DOM, which is then written out. # @final #*/ --- 13,21 ---- #/** # The DOMWalker is the main executing Instance of the Interpreter ! # It walks over the incoming DOM, and throws out events for each ! # Node. The event listeners can then process the events and insert ! # Nodes into the target document and/or modify the source node of ! # the source document. The events contain the Walker itself als ! # EventUnknown. # @final #*/ *************** *** 26,33 **** #/** # Ctor. # @param an instance of NetScript::Interpreter. # @public - # @final #*/ sub new { --- 29,77 ---- #/** + # Event which is generated upon start of an element. + # @public + # @final + #*/ + sub ELEMENT_START_EVENT { "DOMWALKER_ELEMENT_START_EVENT"; } + + #/** + # Event which is generated upon end of an element. + # @public + # @final + #*/ + sub ELEMENT_END_EVENT { "DOMWALKER_ELEMENT_END_EVENT"; } + + #/** + # Event which is generated upon encounter of a processing instruction. + # @public + # @final + #*/ + sub PI_EVENT { "DOMWALKER_PI_EVENT"; } + + #/** + # Event which is generated upon encounter of any other node. + # @public + # @final + #*/ + sub OTHER_NODE_EVENT { } + + #/** + # Event which is generated upon encounter of a text node + # @public + # @final + #*/ + sub TEXT_EVENT { "DOMWALKER_TEXT_EVENT"; } + + #/** + # Event which is generated upon encounter of comment node. + # @public + # @final + #*/ + sub COMMENT_EVENT { "DOMWALKER_COMMENT_EVENT"; } + + #/** # Ctor. # @param an instance of NetScript::Interpreter. # @public #*/ sub new { *************** *** 37,248 **** my $this = {}; ! $this -> { m_basicStatement } = NetScript::Engine::BasicStatement -> new(); $this -> { m_interpreter } = $interpreter; - bless( $this, $class ); # create Object return $this; # return Object } #/** ! # This sub walks over the given DOM and returns a result ! # DOM.The given DOM remains unchanged ! # @param an instance of XML::DOM2::Document ! # @return an instance of XML::DOM2::Document # @public - # @final #*/ ! sub walkOver { ! my ( $this, $document ) = @_; ! ! # Save the document ! $this -> { m_document } = $document; ! my $di = XML::DOM2::DOMImplementation -> new(); ! ! # Create a result document ! my $newDocument = $di -> createDocument( { ! namespaceURI => "dummy", ! qualifiedName => "dummy" ! }); ! $this -> { m_resultDocument } = $newDocument; ! ! # save the reference node ! $this -> referenceNode( $newDocument ); ! $newDocument -> removeChild( { ! oldChild => $newDocument -> documentElement() ! }); ! # start processing from up till down, recursively ! $this -> startProcess( $document ); ! ! $newDocument; } #/** ! # Processes an level within the tree. ! # @private #*/ ! sub startProcess { my ( $this, $node ) = @_; ! ! #we got a node, process it, then process its children... ! if ( $node -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() || ! $node -> nodeType() == XML::DOM2::Node -> DOCUMENT_NODE() ) { ! ! unless( $node -> nodeType == XML::DOM2::Node -> DOCUMENT_NODE() ) { ! $this -> processElement( $node ); ! } ! # process the children ! my $children = $node -> childNodes(); ! my $length = $children -> length(); ! ! for ( 0..$length-1 ) { ! $this -> startProcess( $children -> item ( { ! index => $_ ! } ) ); ! } ! ! unless( $node -> nodeType == XML::DOM2::Node -> DOCUMENT_NODE() ) { ! $this -> elementFinished(); ! } ! } ! elsif ( $node -> nodeType() == XML::DOM2::Node -> ! PROCESSING_INSTRUCTION_NODE() ) { ! $this -> processProcessingInstruction( $node ); ! } ! else { ! $this -> processSimpleNode( $node ); ! } } - #/** ! # Processes a processing instruction. All processing instructions ! # which are related to netscript look this way: ! # <code><?netscript command [parameter [parameter] ...]?></code> ! # These PIs are executed but not copied to the destination tree. ! # Parameters are separated by spaces. Non-NetScript-related PIs are ! # just copied. ! # @private ! # @param an instance of XML::DOM2::ProcessingInstruction #*/ ! sub processProcessingInstruction { ! my ( $this, $pi ) = @_; ! my $target = $pi -> target(); ! ! if ( $target eq "netscript" ) { ! my $data = $pi -> data(); ! ! } ! else { ! # no netscript pi so just copy it. ! #import the node to the new document ! $this -> processSimpleNode( $pi ); ! } } #/** ! # Processes a simple node. Simple nodes have no function. ! # They are just copied to the destination document and ! # variables within them are replaced. ! # @private ! # @param an instance of XML::DOM2::Node or its descendants #*/ ! sub processSimpleNode { ! my ( $this, $node ) = @_; ! $this -> basicStatement() -> init( ! $this -> interpreter(), ! $node, ! $this -> result() ); ! $this -> referenceNode() -> appendChild( { ! newChild => $this -> basicStatement() -> evaluate() ! }); } #/** ! # Processes an Element node. ! # @private ! # @param an instance of XML::DOM2::Element #*/ ! sub processElement { ! my ($this, $element) = @_; ! ! # copy node ! $this -> basicStatement() -> init( ! $this -> interpreter(), ! $element, ! $this -> result() ); ! my $copy = $this -> basicStatement() -> evaluate(); - # append to reference node - $this -> referenceNode() -> appendChild({ - newChild => $copy - }); ! #set as new reference node ! $this -> referenceNode( $copy ) ; } #/** ! # Finishes the current reference node. ! # @private #*/ ! sub elementFinished { ! my ($this) = @_; ! # set the parent of the current reference node as new reference node ! $this -> referenceNode( $this -> referenceNode() -> parentNode() ); } #/** ! # Returns the source document. # @public - # @return an instance of XML::DOM2::Document #*/ ! sub document { my ( $this ) = @_; ! $this -> { m_document }; } #/** ! # Returns the result document. # @public - # @return an instance of XML::DOM2::Document #*/ ! sub result { ! my ( $this ) = @_; ! $this -> { m_resultDocument }; } #/** ! # Returns or sets the current reference node in the result document. # @private - # @optional an instance of XML::DOM2::Node - # @return an instance of XML::DOM2::Node #*/ ! sub referenceNode { ! my ( $this, $node ) = @_; ! if ( $node ) { ! $this -> { m_referenceNode } = $node; } ! $this -> { m_referenceNode }; ! } #/** ! # Returns an instance of NetScript::Engine::BasicStatement ! # @return an instance of NetScript::Engine::BasicStatement # @private #*/ ! sub basicStatement { ! my ( $this ) = @_; ! $this -> { m_basicStatement }; } ! #/** ! # Returns the interpreter. ! # @return an instance of NetScript::Interpreter. ! # @private #*/ ! sub interpreter { ! my ( $this ) = @_; ! $this -> { m_interpreter }; } --- 81,327 ---- my $this = {}; ! bless( $this, $class ); # create Object ! $this -> { m_currentSourceNode } = undef; ! $this -> { m_currentTargetNode } = undef; ! ! $this -> { m_basicStatement } = NetScript::Engine::BasicStatement -> new(); + my %markedNodes = (); + $this -> { m_markedNodes } = \%markedNodes; + $this -> { m_interpreter } = $interpreter; return $this; # return Object } + #/** ! # Marks the current node in the source document. ! # Returns an ID which can be used to retrieve ! # the node. ! # @return a scalar holding an ID # @public #*/ ! sub markCurrentSource { ! my ( $this ) = @_; ! $this -> markNode( $this -> currentSource() ); ! } ! #/** ! # Marks the current node in the Target document. ! # Returns an ID which can be used to retrieve ! # the node. ! # @return a scalar holding an ID ! # @public ! #*/ ! sub markCurrentTarget { ! my ( $this ) = @_; ! $this -> markNode( $this -> currentTarget() ); } #/** ! # Marks the given node. ! # @param an instance of <code>XML::DOM2::Node</code> ! # @return an ID which can be used to retrieve the node. ! # @public #*/ ! sub markNode { my ( $this, $node ) = @_; ! my $uid = $this -> interpreter() -> getUID(); ! $this -> { m_markedNodes } -> { $uid } = $node; ! $uid; } #/** ! # Returns a marked node. ! # @param an ID for the previously marked node. ! # @return an instance of <code>XML::DOM2::Node</code> ! # @public #*/ ! sub markedNode { ! my ( $this, $uid ) = @_; ! $this -> { m_markedNodes } -> { $uid }; } #/** ! # Removes a mark from a node. ! # @param an ID for the previously marked node. ! # @public #*/ ! sub clearMark { ! my ($this, $uid) = @_; ! delete ( $this -> { m_markedNodes } -> { $uid } ); } #/** ! # Retrieves or sets the current node in the source document. ! # @optional an instance of <code>XML::DOM2::Node</code> ! # @return an instance of <code>XML::DOM2::Node</code> ! # @public #*/ ! sub currentSource { ! my ( $this, $newNode ) = @_; ! if ( defined( $newNode ) ) { ! $this -> { m_currentSourceNode } = $newNode; ! } ! $this -> { m_currentSourceNode }; ! } ! #/** ! # Retrieves or sets the current node in the target document. ! # @optional an instance of <code>XML::DOM2::Node</code> ! # @return an instance of <code>XML::DOM2::Node</code> ! # @public ! #*/ ! sub currentTarget { ! my ( $this, $newNode ) = @_; ! if ( defined( $newNode ) ) { ! $this -> { m_currentTargetNode } = $newNode; ! } ! $this -> { m_currentTargetNode }; } + #/** ! # Inserts a node into the target document. The given node will be cloned ! # and inserted into the target document. The function returns the ! # clone. Text nodes, Element attributes, Processing Instructions and ! # comments are searched for variables. These will be replaced with their ! # values. ! # @param <code>an instance of XML::DOM2::Node</code> ! # @optional a bool value; true - if the newly inserted node becomes ! # the reference target node; false -else (this flag is only valid if ! # the given node is an <code>XML::DOM2::Element</code>) ! # @public #*/ ! sub insertIntoTarget { ! my ( $this, $node, $isRefNode ) = @_; ! my $currentNode = $this -> currentTarget(); ! my $document = $currentNode -> ownerDocument(); ! $this -> basicStatement() -> init( ! $this -> interpreter(), $node, $document ); ! ! my $clone = $this -> basicStatement() -> evaluate(); ! ! # append clone to document ! $this -> currentTarget() -> appendChild( { ! newChild => $clone ! }); ! ! # set current target node to new node ! if ( $clone -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() && ! $isRefNode ) { ! $this -> currentTarget( $clone ) ; ! } } #/** ! # @return an instance of <code>NetScript::Interpreter</code> # @public #*/ ! sub interpreter { my ( $this ) = @_; ! $this -> { m_interpreter }; } #/** ! # Walks over the given Document and returns a result document. ! # @param an instance of <code>XML::DOM2::Document</code> ! # @return an instance of <code>XML::DOM2::Document</code> # @public #*/ ! sub walkOver { ! my ( $this, $source ) = @_; ! $this -> currentSource( $source ); ! my $di = XML::DOM2::DOMImplementation -> new(); ! # create target document ! my $document = $di -> createDocument( { ! namespaceURI => "dummy", ! qualifiedName => "dummy:dummy" ! } ); ! # remove document element ! $document -> removeChild( { ! oldChild => $document -> documentElement() ! } ); ! ! $this -> currentTarget( $document ); ! ! $this -> goWalk(); ! # Return result document ! $document; } #/** ! # Walks over the document. The walking is depth-first. The walker ! # will create an event for the current source node, then will iterate ! # over the children of the current source node in a depth-first manner. # @private #*/ ! sub goWalk { ! my ( $this ) = @_; ! my $node = $this -> currentSource(); ! ! ! # create start Event ! $this -> createEvent( $node ); ! my $children = $node -> childNodes(); ! my $count = $children -> length() - 1; ! ! # iterate over the children ! for ( 0..$count ) { ! $this -> currentSource( $children -> item ( { ! index => $_ ! })); ! $this -> goWalk(); } ! ! # set old node as currentNode ! $this -> currentSource( $node ); ! ! if ($node -> nodeType == XML::DOM2::Node -> ELEMENT_NODE() ) { ! # create end Event ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $this -> ELEMENT_END_EVENT(), undef, $this ); ! } ! ! } ! #/** ! # Creates an even for the given node. ! # @param an instance of <code>XML::DOM2::Node</code> # @private #*/ ! sub createEvent { ! my ( $this, $node ) = @_; ! my $nodeType = $node -> nodeType(); ! my $eventType; ! ! if ( $nodeType == XML::DOM2::Node -> ELEMENT_NODE() ) { ! $eventType = $this -> ELEMENT_START_EVENT(); ! } ! elsif ( $nodeType == XML::DOM2::Node -> TEXT_NODE() ) { ! $eventType = $this -> TEXT_EVENT(); ! } ! elsif ( $nodeType == XML::DOM2::Node -> PROCESSING_INSTRUCTION_NODE() ) { ! $eventType = $this -> PI_EVENT(); ! } ! elsif ( $nodeType == XML::DOM2::Node -> COMMENT_NODE() ) { ! $eventType = $this -> COMMENT_EVENT(); ! } ! else { ! $eventType = $this -> OTHER_NODE_EVENT(); ! } ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $eventType, undef, $this ); } ! #/** ! # Returns an instance of <code>NetScript::Engine::BasicStatement</code> ! # @public #*/ ! sub basicStatement { ! my ( $this ) = @_; ! $this -> { m_basicStatement }; } Index: Event.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Event.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Event.pm 1 Apr 2002 20:30:56 -0000 1.3 --- Event.pm 9 May 2002 19:11:03 -0000 1.4 *************** *** 24,32 **** # The constructor. Constructs a new event. # @param a hash reference containing the following key-value-pairs ! # EventType - a string defining the type of an event ! # EventMessage - a string holding a message ! # EventUnknown - a scalar/reference which can hold any information ! # that might be of use for the receivers of the event. ! # @return an instance of NetScript::Engine::Event #*/ sub new { --- 24,33 ---- # The constructor. Constructs a new event. # @param a hash reference containing the following key-value-pairs ! # <ul> ! # <li>EventType - a string defining the type of an event</li> ! # <li>EventMessage - a string holding a message</li> ! # <li>EventUnknown - a scalar/reference which can hold any information ! # that might be of use for the receivers of the event.</li></ul> ! # @return an instance of <code>NetScript::Engine::Event</code> #*/ sub new { *************** *** 51,56 **** # Returns the event type. # @return a string holding the event Type. #*/ ! sub getEventType { my ($this) = @_; return $this -> { m_EventType }; --- 52,58 ---- # Returns the event type. # @return a string holding the event Type. + # @public #*/ ! sub eventType { my ($this) = @_; return $this -> { m_EventType }; *************** *** 60,65 **** # Returns the event Message # @return a string holding the event Message #*/ ! sub getEventMessage { my ($this) = @_; return $this -> { m_EventMessage }; --- 62,68 ---- # Returns the event Message # @return a string holding the event Message + # @public #*/ ! sub eventMessage { my ($this) = @_; return $this -> { m_EventMessage }; *************** *** 70,75 **** # EventUnknown during Event construction. # @return a scalar/reference holding the EventUnknown. #*/ ! sub getEventUnknown { my ($this) = @_; return $this -> { m_EventUnknown }; --- 73,79 ---- # EventUnknown during Event construction. # @return a scalar/reference holding the EventUnknown. + # @public #*/ ! sub eventUnknown { my ($this) = @_; return $this -> { m_EventUnknown }; Index: EventRelay.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/EventRelay.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EventRelay.pm 1 Apr 2002 20:30:56 -0000 1.4 --- EventRelay.pm 9 May 2002 19:11:03 -0000 1.5 *************** *** 1,12 **** #-------------------------------------------------------- - # This class represents an event relay. It is used to - # relay events within the Interpreter to their receivers. - # does hold variable settings and arrays. Events are - # sent using a FIFO principle. This means that events which - # are raised first, will be sent first. An event which is - # raised by a client upon reception of another event, will be fired - # after the current event has been delivered to all clients. - # So this implementation guarantees that all events will be - # delivered in the same temporal order as they have been raised. # $Id$ # --- 1,3 ---- *************** *** 18,21 **** --- 9,24 ---- #-------------------------------------------------------- use strict; + + #/** + # This class represents an event relay. It is used to + # relay events within the Interpreter to their receivers. + # does hold variable settings and arrays. Events are + # sent using a FIFO principle. This means that events which + # are raised first, will be sent first. An event which is + # raised by a client upon reception of another event, will be fired + # after the current event has been delivered to all clients. + # So this implementation guarantees that all events will be + # delivered in the same temporal order as they have been raised. + #*/ package NetScript::Engine::EventRelay; use vars qw($VERSION); *************** *** 25,28 **** --- 28,32 ---- #-------------------------------------------------------- use NetScript::Engine::Event; + use NetScript::Engine::EventListener; #-------------------------------------------------------- *************** *** 56,70 **** # Adds an event-listener to the internal list of # listeners. ! # @param an object reference to the listener. ! # @param a hash reference containing event-sub pairs. ! # The keys are strings, describing the events which is listened to, ! # the values are strings which describe the functions to be called ! # if an event of this type is raised. #*/ sub addEventListener { ! my ($this, $object, $functionsRef) = @_; ! my %functions = %{$functionsRef}; ! $functions{ "NetScript::Engine::EventRelay::Listener" } = $object; ! $this -> { m_EventListeners } -> { $object } = \%functions; } --- 60,94 ---- # Adds an event-listener to the internal list of # listeners. ! # @param an instance of <code>NetScript::Engine::EventListener</code> #*/ sub addEventListener { ! my ($this, $listener ) = @_; ! my $arrayRef = $this -> { m_EventListeners } -> ! { $listener -> eventType() }; ! ! # create array if doesn't exist ! unless ( defined( $arrayRef ) ) { ! my @attachedListeners = (); ! $this -> { m_EventListeners } -> ! { $listener -> eventType() } = \@attachedListeners; ! $arrayRef = \@attachedListeners; ! } ! ! my $priority = $listener -> priority(); ! if ( $priority == $listener -> PRIORITY_FIRST() ) { ! unshift( @{ $arrayRef }, $listener ); ! } ! elsif ( $priority == $listener -> PRIORITY_LAST() ) { ! push( @{ $arrayRef }, $listener ); ! } ! else { ! # insert after the last listener with PRIORITY_FIRST ! my $index = 0; ! for ( @{ $arrayRef } ) { ! splice( @{ $arrayRef }, $index, 0, $listener ), last if ! $_ -> priority() != $listener -> PRIORITY_FIRST(); ! $index++; ! } ! } } *************** *** 72,80 **** # Removes a previously added event-listener from the list # of listeners. ! # @param an object reference to the attached listener. #*/ sub removeEventListener { ! my ($this, $object ) = @_; ! delete( $this -> { m_EventListeners } -> { $object } ); } --- 96,113 ---- # Removes a previously added event-listener from the list # of listeners. ! # @param the <code>NetScript::Engine::EventListener</code>-object ! # to remove ! # @note this operation can be expensive #*/ sub removeEventListener { ! my ($this, $listener ) = @_; ! my @attachedListeners = $this -> { m_EventListeners } -> ! { $listener -> eventType() }; ! my $index = 0; ! for ( @attachedListeners ) { ! delete $attachedListeners[$index], last if ! $_ == $listener; ! $index++; ! } } *************** *** 115,136 **** # now we deliver events $this -> { m_deliveringEvents } = 1; ! ! # get event type ! my $eventType = $event -> getEventType(); ! ! # now relay the event ! my @listeners = keys( %{$this -> { m_EventListeners }} ); ! ! for (@listeners) { # iterate over all attached listeners. ! # get object. ! my $object = $this -> { m_EventListeners } -> { $_ } -> { "NetScript::Engine::EventRelay::Listener" }; ! ! # get sub to call. ! my $sub = $this -> { m_EventListeners } -> { $_ } -> { $eventType }; ! if (defined( $sub )) { ! $object -> $sub( $event ); } } # we have delivered the current event. $this -> { m_deliveringEvents } = 0; --- 148,164 ---- # now we deliver events $this -> { m_deliveringEvents } = 1; ! ! my $arrayRef = $this -> { m_EventListeners } -> ! { $event -> eventType() }; ! if ( defined( $arrayRef ) ) { ! # iterate over all listeners for this event ! my @attachedListeners = @{ $arrayRef }; ! for ( @attachedListeners ) { ! # send and if consumed stop processing ! $_ -> fireEvent( $event ) || last; } } + # we have delivered the current event. $this -> { m_deliveringEvents } = 0; |
From: Jan T. <de...@us...> - 2002-05-09 19:10:55
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv25714 Modified Files: wipeout.project Log Message: * re-implemented DOMWalker * re-implemented Event System * added EventListener Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/wipeout.project,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wipeout.project 26 Apr 2002 10:48:57 -0000 1.6 --- wipeout.project 9 May 2002 19:10:52 -0000 1.7 *************** *** 1,281 **** b ! C DmDictionary 0 ddf0 8 ! c 0 e012 9 ! C Category 1 4744 ! c 0 e052 4 ! C DmString 2 e059 2 e3 ! c 2 e058 a defaultExe ! C DmSet 3 e05b 1 ! c 2 4753 2 e3 ! L 4753 ! c 2 e05a b executables ! c 3 e056 3 ! c 2 475a 3 *.C ! L 475a ! c 2 475d 4 *.cc ! L 475d ! c 2 4760 5 *.cpp ! L 4760 ! c 2 e055 a extensions ! c 2 e054 a CPP_source ! c 2 e053 4 name ! c 2 e014 a CPP_source ! c 1 4775 ! c 0 e098 4 ! c 2 e09f 2 e3 ! c 2 e09e a defaultExe ! c 3 e0a1 1 ! c 2 4782 2 e3 ! L 4782 ! c 2 e0a0 b executables ! c 3 e09c 1 ! c 2 4789 3 *.c ! L 4789 ! c 2 e09b a extensions ! c 2 e09a 8 C_source ! c 2 e099 4 name ! c 2 e015 8 C_source ! c 1 479e ! c 0 e0d2 4 ! c 2 e0d9 2 e3 ! c 2 e0d8 a defaultExe ! c 3 e0db 1 ! c 2 47ab 2 e3 ! L 47ab ! c 2 e0da b executables ! c 3 e0d6 1 ! c 2 47b2 3 *.e ! L 47b2 ! c 2 e0d5 a extensions ! c 2 e0d4 6 Eiffel ! c 2 e0d3 4 name ! c 2 e016 6 Eiffel ! c 1 47c7 ! c 0 e10c 4 ! c 2 e113 2 e3 ! c 2 e112 a defaultExe ! c 3 e115 1 ! c 2 47d4 2 e3 ! L 47d4 ! c 2 e114 b executables ! c 3 e110 4 ! c 2 47db 3 *.F ! L 47db ! c 2 47de 3 *.f ! L 47de ! c 2 47e1 5 *.for ! L 47e1 ! c 2 47e4 5 *.fpp ! L 47e4 ! c 2 e10f a extensions ! c 2 e10e 7 Fortran ! c 2 e10d 4 name ! c 2 e017 7 Fortran ! c 1 47f9 ! c 0 e152 4 ! c 2 e159 2 e3 ! c 2 e158 a defaultExe ! c 3 e15b 1 ! c 2 4806 2 e3 ! L 4806 ! c 2 e15a b executables ! c 3 e156 2 ! c 2 480d 3 *.H ! L 480d ! c 2 4810 3 *.h ! L 4810 ! c 2 e155 a extensions ! c 2 e154 6 Header ! c 2 e153 4 name ! c 2 e018 6 Header ! c 1 4825 ! c 0 e190 4 ! c 2 e197 9 surfboard ! c 2 e196 a defaultExe ! c 3 e199 2 ! c 2 4832 2 e3 ! L 4832 ! c 2 4835 9 surfboard ! L 4835 ! c 2 e198 b executables ! c 3 e194 2 ! c 2 483c 5 *.htm ! L 483c ! c 2 483f 6 *.html ! L 483f ! c 2 e193 a extensions ! c 2 e192 4 Html ! c 2 e191 4 name ! c 2 e019 4 Html ! c 1 4854 ! c 0 e1d2 4 ! c 2 e1d9 2 e3 ! c 2 e1d8 a defaultExe ! c 3 e1db 1 ! c 2 4861 2 e3 ! L 4861 ! c 2 e1da b executables ! c 3 e1d6 1 ! c 2 4868 6 *.java ! L 4868 ! c 2 e1d5 a extensions ! c 2 e1d4 4 Java ! c 2 e1d3 4 name ! c 2 e01a 4 Java ! c 1 487d ! c 0 e20c 4 ! c 2 e213 2 e3 ! c 2 e212 a defaultExe ! c 3 e215 1 ! c 2 488a 2 e3 ! L 488a ! c 2 e214 b executables ! c 3 e210 1 ! c 2 4891 5 *.tex ! L 4891 ! c 2 e20f a extensions ! c 2 e20e 5 Latex ! c 2 e20d 4 name ! c 2 e01b 5 Latex ! c 1 48a6 ! c 0 e246 4 ! c 2 e24d 2 e3 ! c 2 e24c a defaultExe ! c 3 e24f 1 ! c 2 48b3 2 e3 ! L 48b3 ! c 2 e24e b executables ! c 3 e24a 0 ! c 2 e249 a extensions ! c 2 e248 5 Other ! c 2 e247 4 name ! c 2 e01c 5 Other ! c 2 e011 a categories ! c 0 e01e 1 ! C ProjectDir 4 48d0 ! c 2 48d1 25 netscript2/src/perl/NetScript/Engine/ 11 81 ! c 2 48d2 0 0 ! c 2 e020 25 netscript2/src/perl/NetScript/Engine/ ! c 2 e01d b directories ! C DmBag 5 ddfc a ! c 2 de32 da b ! C DmDictionary 0 ddfe 3 ! C DmString 1 de10 36 b ! C DmSet 0 4916 1 ! C DmString 1 4944 5 Other ! L 4944 ! c 1 de0f a categories ! c 1 de00 11 BasicStatement.pm ! c 1 ddff 4 name ! C DmInteger 2 de12 1 ! c 1 de11 9 substMode ! c 2 de67 e1 b ! C DmDictionary 0 de33 3 ! C DmString 1 de45 36 b ! C DmSet 0 4955 1 ! C DmString 1 4983 5 Other ! L 4983 ! c 1 de44 a categories ! c 1 de35 11 BlockStatement.pm ! c 1 de34 4 name ! C DmInteger 2 de47 80000001 ! c 1 de46 9 substMode ! c 2 de9c d0 b ! C DmDictionary 0 de68 3 ! C DmString 1 de7a 36 b ! C DmSet 0 4994 1 ! C DmString 1 49c2 5 Other ! L 49c2 ! c 1 de79 a categories ! c 1 de6a 8 Class.pm ! c 1 de69 4 name ! C DmInteger 2 de7c 1 ! c 1 de7b 9 substMode ! c 2 ded1 e0 b ! C DmDictionary 0 de9d 3 ! C DmString 1 deaf 36 b ! C DmSet 0 49d3 1 ! C DmString 1 4a01 5 Other ! L 4a01 ! c 1 deae a categories ! c 1 de9f 10 CopyStatement.pm ! c 1 de9e 4 name ! C DmInteger 2 deb1 80000001 ! c 1 deb0 9 substMode ! c 2 df06 d4 b ! C DmDictionary 0 ded2 3 ! C DmString 1 dee4 36 b ! C DmSet 0 dc6b 1 ! C DmString 1 dde5 5 Other ! L dde5 ! c 1 dee3 a categories ! c 1 ded4 c DOMWalker.pm ! c 1 ded3 4 name ! C DmInteger 2 dee6 1 ! c 1 dee5 9 substMode ! c 2 df3b d0 b ! C DmDictionary 0 df07 3 ! C DmString 1 df19 36 b ! C DmSet 0 4a12 1 ! C DmString 1 4a40 5 Other ! L 4a40 ! c 1 df18 a categories ! c 1 df09 8 Event.pm ! c 1 df08 4 name ! C DmInteger 2 df1b 1 ! c 1 df1a 9 substMode ! c 2 df70 d5 b ! C DmDictionary 0 df3c 3 ! C DmString 1 df4e 36 b ! C DmSet 0 4a51 1 ! C DmString 1 4a7f 5 Other ! L 4a7f ! c 1 df4d a categories ! c 1 df3e d EventRelay.pm ! c 1 df3d 4 name ! C DmInteger 2 df50 1 ! c 1 df4f 9 substMode ! c 2 dfa5 d0 b ! C DmDictionary 0 df71 3 ! C DmString 1 df83 36 b ! C DmSet 0 4a90 1 ! C DmString 1 4abe 5 Other ! L 4abe ! c 1 df82 a categories ! c 1 df73 8 State.pm ! c 1 df72 4 name ! C DmInteger 2 df85 1 ! c 1 df84 9 substMode ! c 2 dfda d4 b ! C DmDictionary 0 dfa6 3 ! C DmString 1 dfb8 36 b ! C DmSet 0 4acf 1 ! C DmString 1 4afd 5 Other ! L 4afd ! c 1 dfb7 a categories ! c 1 dfa8 c Statement.pm ! c 1 dfa7 4 name ! C DmInteger 2 dfba 1 ! c 1 dfb9 9 substMode ! c 2 e00f de b ! C DmDictionary 0 dfdb 3 ! C DmString 1 dfed 36 b ! C DmSet 0 4b0e 1 ! C DmString 1 4b3c 5 Other ! L 4b3c ! c 1 dfec a categories ! c 1 dfdd 15 StatementEvaluator.pm ! c 1 dfdc 4 name ! C DmInteger 2 dfef 1 ! c 1 dfee 9 substMode ! c 2 e010 5 files ! c 2 ddf8 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 ddf7 6 launch ! c 2 ddf4 4 make ! c 2 ddf3 4 make ! c 2 ddf6 0 ! c 2 ddf5 8 makeFile ! c 5 ddf9 0 ! c 2 ddfb 7 modules ! c 2 ddf2 6 Engine ! c 2 ddf1 4 name --- 1,292 ---- b ! C DmDictionary 0 2c5d9 8 ! c 0 2c830 9 ! C Category 1 5147 ! c 0 2c870 4 ! C DmString 2 2c877 2 e3 ! c 2 2c876 a defaultExe ! C DmSet 3 2c879 1 ! c 2 5156 2 e3 ! L 5156 ! c 2 2c878 b executables ! c 3 2c874 3 ! c 2 515d 3 *.C ! L 515d ! c 2 5160 4 *.cc ! L 5160 ! c 2 5163 5 *.cpp ! L 5163 ! c 2 2c873 a extensions ! c 2 2c872 a CPP_source ! c 2 2c871 4 name ! c 2 2c832 a CPP_source ! c 1 5178 ! c 0 2c8b6 4 ! c 2 2c8bd 2 e3 ! c 2 2c8bc a defaultExe ! c 3 2c8bf 1 ! c 2 5185 2 e3 ! L 5185 ! c 2 2c8be b executables ! c 3 2c8ba 1 ! c 2 518c 3 *.c ! L 518c ! c 2 2c8b9 a extensions ! c 2 2c8b8 8 C_source ! c 2 2c8b7 4 name ! c 2 2c833 8 C_source ! c 1 51a1 ! c 0 2c8f0 4 ! c 2 2c8f7 2 e3 ! c 2 2c8f6 a defaultExe ! c 3 2c8f9 1 ! c 2 51ae 2 e3 ! L 51ae ! c 2 2c8f8 b executables ! c 3 2c8f4 1 ! c 2 51b5 3 *.e ! L 51b5 ! c 2 2c8f3 a extensions ! c 2 2c8f2 6 Eiffel ! c 2 2c8f1 4 name ! c 2 2c834 6 Eiffel ! c 1 51ca ! c 0 2c92a 4 ! c 2 2c931 2 e3 ! c 2 2c930 a defaultExe ! c 3 2c933 1 ! c 2 51d7 2 e3 ! L 51d7 ! c 2 2c932 b executables ! c 3 2c92e 4 ! c 2 51de 3 *.F ! L 51de ! c 2 51e1 3 *.f ! L 51e1 ! c 2 51e4 5 *.for ! L 51e4 ! c 2 51e7 5 *.fpp ! L 51e7 ! c 2 2c92d a extensions ! c 2 2c92c 7 Fortran ! c 2 2c92b 4 name ! c 2 2c835 7 Fortran ! c 1 51fc ! c 0 2c970 4 ! c 2 2c977 2 e3 ! c 2 2c976 a defaultExe ! c 3 2c979 1 ! c 2 5209 2 e3 ! L 5209 ! c 2 2c978 b executables ! c 3 2c974 2 ! c 2 5210 3 *.H ! L 5210 ! c 2 5213 3 *.h ! L 5213 ! c 2 2c973 a extensions ! c 2 2c972 6 Header ! c 2 2c971 4 name ! c 2 2c836 6 Header ! c 1 5228 ! c 0 2c9ae 4 ! c 2 2c9b5 9 surfboard ! c 2 2c9b4 a defaultExe ! c 3 2c9b7 2 ! c 2 5235 2 e3 ! L 5235 ! c 2 5238 9 surfboard ! L 5238 ! c 2 2c9b6 b executables ! c 3 2c9b2 2 ! c 2 523f 5 *.htm ! L 523f ! c 2 5242 6 *.html ! L 5242 ! c 2 2c9b1 a extensions ! c 2 2c9b0 4 Html ! c 2 2c9af 4 name ! c 2 2c837 4 Html ! c 1 5257 ! c 0 2c9f0 4 ! c 2 2c9f7 2 e3 ! c 2 2c9f6 a defaultExe ! c 3 2c9f9 1 ! c 2 5264 2 e3 ! L 5264 ! c 2 2c9f8 b executables ! c 3 2c9f4 1 ! c 2 526b 6 *.java ! L 526b ! c 2 2c9f3 a extensions ! c 2 2c9f2 4 Java ! c 2 2c9f1 4 name ! c 2 2c838 4 Java ! c 1 5280 ! c 0 2ca2a 4 ! c 2 2ca31 2 e3 ! c 2 2ca30 a defaultExe ! c 3 2ca33 1 ! c 2 528d 2 e3 ! L 528d ! c 2 2ca32 b executables ! c 3 2ca2e 1 ! c 2 5294 5 *.tex ! L 5294 ! c 2 2ca2d a extensions ! c 2 2ca2c 5 Latex ! c 2 2ca2b 4 name ! c 2 2c839 5 Latex ! c 1 52a9 ! c 0 2ca64 4 ! c 2 2ca6b 2 e3 ! c 2 2ca6a a defaultExe ! c 3 2ca6d 1 ! c 2 52b6 2 e3 ! L 52b6 ! c 2 2ca6c b executables ! c 3 2ca68 0 ! c 2 2ca67 a extensions ! c 2 2ca66 5 Other ! c 2 2ca65 4 name ! c 2 2c83a 5 Other ! c 2 2c82f a categories ! c 0 2c83c 1 ! C ProjectDir 4 52d3 ! c 2 52d4 25 netscript2/src/perl/NetScript/Engine/ 11 81 ! c 2 52d5 0 0 ! c 2 2c83e 25 netscript2/src/perl/NetScript/Engine/ ! c 2 2c83b b directories ! C DmBag 5 2c5e5 b ! c 2 2c61b e1 b ! C DmDictionary 0 2c5e7 3 ! C DmString 1 2c5f9 36 b ! C DmSet 0 531b 1 ! C DmString 1 5349 5 Other ! L 5349 ! c 1 2c5f8 a categories ! c 1 2c5e9 11 BasicStatement.pm ! c 1 2c5e8 4 name ! C DmInteger 2 2c5fb 1 ! c 1 2c5fa 9 substMode ! c 2 2c650 e8 b ! C DmDictionary 0 2c61c 3 ! C DmString 1 2c62e 36 b ! C DmSet 0 535a 1 ! C DmString 1 5388 5 Other ! L 5388 ! c 1 2c62d a categories ! c 1 2c61e 11 BlockStatement.pm ! c 1 2c61d 4 name ! C DmInteger 2 2c630 80000001 ! c 1 2c62f 9 substMode ! c 2 2c685 d7 b ! C DmDictionary 0 2c651 3 ! C DmString 1 2c663 36 b ! C DmSet 0 5399 1 ! C DmString 1 53c7 5 Other ! L 53c7 ! c 1 2c662 a categories ! c 1 2c653 8 Class.pm ! c 1 2c652 4 name ! C DmInteger 2 2c665 1 ! c 1 2c664 9 substMode ! c 2 2c6ba e7 b ! C DmDictionary 0 2c686 3 ! C DmString 1 2c698 36 b ! C DmSet 0 53d8 1 ! C DmString 1 5406 5 Other ! L 5406 ! c 1 2c697 a categories ! c 1 2c688 10 CopyStatement.pm ! c 1 2c687 4 name ! C DmInteger 2 2c69a 80000001 ! c 1 2c699 9 substMode ! c 2 2c6ef db b ! C DmDictionary 0 2c6bb 3 ! C DmString 1 2c6cd 36 b ! C DmSet 0 5417 1 ! C DmString 1 5445 5 Other ! L 5445 ! c 1 2c6cc a categories ! c 1 2c6bd c DOMWalker.pm ! c 1 2c6bc 4 name ! C DmInteger 2 2c6cf 1 ! c 1 2c6ce 9 substMode ! c 2 2c724 d7 b ! C DmDictionary 0 2c6f0 3 ! C DmString 1 2c702 36 b ! C DmSet 0 5456 1 ! C DmString 1 5484 5 Other ! L 5484 ! c 1 2c701 a categories ! c 1 2c6f2 8 Event.pm ! c 1 2c6f1 4 name ! C DmInteger 2 2c704 1 ! c 1 2c703 9 substMode ! c 2 2c759 e3 b ! C DmDictionary 0 2c725 3 ! C DmString 1 2c737 39 b ! C DmSet 0 2c454 1 ! C DmString 1 2c5ce 5 Other ! L 2c5ce ! c 1 2c736 a categories ! c 1 2c727 10 EventListener.pm ! c 1 2c726 4 name ! C DmInteger 2 2c739 1 ! c 1 2c738 9 substMode ! c 2 2c78e dc b ! C DmDictionary 0 2c75a 3 ! C DmString 1 2c76c 36 b ! C DmSet 0 5495 1 ! C DmString 1 54c3 5 Other ! L 54c3 ! c 1 2c76b a categories ! c 1 2c75c d EventRelay.pm ! c 1 2c75b 4 name ! C DmInteger 2 2c76e 1 ! c 1 2c76d 9 substMode ! c 2 2c7c3 d7 b ! C DmDictionary 0 2c78f 3 ! C DmString 1 2c7a1 36 b ! C DmSet 0 54d4 1 ! C DmString 1 5502 5 Other ! L 5502 ! c 1 2c7a0 a categories ! c 1 2c791 8 State.pm ! c 1 2c790 4 name ! C DmInteger 2 2c7a3 1 ! c 1 2c7a2 9 substMode ! c 2 2c7f8 db b ! C DmDictionary 0 2c7c4 3 ! C DmString 1 2c7d6 36 b ! C DmSet 0 5513 1 ! C DmString 1 5541 5 Other ! L 5541 ! c 1 2c7d5 a categories ! c 1 2c7c6 c Statement.pm ! c 1 2c7c5 4 name ! C DmInteger 2 2c7d8 1 ! c 1 2c7d7 9 substMode ! c 2 2c82d e5 b ! C DmDictionary 0 2c7f9 3 ! C DmString 1 2c80b 36 b ! C DmSet 0 5552 1 ! C DmString 1 5580 5 Other ! L 5580 ! c 1 2c80a a categories ! c 1 2c7fb 15 StatementEvaluator.pm ! c 1 2c7fa 4 name ! C DmInteger 2 2c80d 1 ! c 1 2c80c 9 substMode ! c 2 2c82e 5 files ! c 2 2c5e1 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 2c5e0 6 launch ! c 2 2c5dd 4 make ! c 2 2c5dc 4 make ! c 2 2c5df 0 ! c 2 2c5de 8 makeFile ! c 5 2c5e2 0 ! c 2 2c5e4 7 modules ! c 2 2c5db 6 Engine ! c 2 2c5da 4 name |
From: Jan T. <de...@us...> - 2002-05-09 19:09:44
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv25263 Modified Files: CharacterData.pm Node.pm NodeList.pm Log Message: * lots of optimization Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CharacterData.pm 17 Mar 2002 19:26:14 -0000 1.4 --- CharacterData.pm 9 May 2002 19:09:41 -0000 1.5 *************** *** 56,61 **** if ( defined( $paramsRef ) ) { ! my %params = %{$paramsRef}; ! $this -> { m_data } = $params{"data"}; } --- 56,60 ---- if ( defined( $paramsRef ) ) { ! $this -> { m_data } = $paramsRef -> {"data"}; } Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Node.pm 26 Apr 2002 10:50:52 -0000 1.15 --- Node.pm 9 May 2002 19:09:41 -0000 1.16 *************** *** 59,63 **** bless( $this, $class ); # create Object ! $this -> { m_childNodes } = XML::DOM2::NodeList -> new (); $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; --- 59,63 ---- bless( $this, $class ); # create Object ! $this -> { m_childNodes } = undef; # XML::DOM2::NodeList -> new (); #LAZY $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; *************** *** 69,72 **** --- 69,74 ---- $this -> { m_readOnly } = 0; $this -> { m_nodeName } = undef; + $this -> { m_firstChild } = undef; + $this -> { m_lastChild } = undef; return $this; # return Object } *************** *** 96,100 **** sub childNodes { my ( $this ) = @_; ! return $this -> { m_childNodes }; } --- 98,105 ---- sub childNodes { my ( $this ) = @_; ! unless( defined( $this -> { m_childNodes } ) ) { ! $this -> { m_childNodes } = XML::DOM2::NodeList -> new(); ! } ! $this -> { m_childNodes }; } *************** *** 111,120 **** my ( $this ) = @_; ! if ( $this -> childNodes() -> length() > 0 ) { ! return $this -> childNodes() -> item( { index => 0 } ) ; ! } ! else { ! return undef; ! } } --- 116,126 ---- my ( $this ) = @_; ! $this -> { m_firstChild }; ! # if ( $this -> childNodes() -> length() > 0 ) { ! # return $this -> childNodes() -> item( { index => 0 } ) ; ! # } ! # else { ! # return undef; ! # } } *************** *** 129,141 **** sub lastChild { my ( $this ) = @_; ! ! my $len = $this -> childNodes() -> length(); ! ! if ( $len > 0 ) { ! return $this -> childNodes() -> item( { index => $len - 1 } ) ; ! } ! else { ! return undef; ! } } --- 135,148 ---- sub lastChild { my ( $this ) = @_; ! ! $this -> { m_lastChild }; ! # my $len = $this -> childNodes() -> length(); ! # ! # if ( $len > 0 ) { ! # return $this -> childNodes() -> item( { index => $len - 1 } ) ; ! # } ! # else { ! # return undef; ! # } } *************** *** 397,400 **** --- 404,411 ---- # add node to children $this -> childNodes() -> add( { node => $newNode } ); + # new node is last child + $this -> { m_lastChild } = $newNode; + # new node is first child if there was no node before + $this -> { m_firstChild } = $newNode unless( defined($lastChild) ); # set new parent $newNode -> { m_parentNode } = $this; *************** *** 551,555 **** $newNode -> { m_nextSibling } = $refNode; $refNode -> { m_previousSibling } = $newNode; ! $newNode; } --- 562,571 ---- $newNode -> { m_nextSibling } = $refNode; $refNode -> { m_previousSibling } = $newNode; ! ! # if node was inserted before the first child it is now hte first child ! if ( $refNode == $this -> firstChild() ) { ! $this -> { m_firstChild } = $newNode; ! } ! # lastchild is not changed by this sub $newNode; } *************** *** 630,636 **** --- 646,664 ---- } + # if we remove the last child, its predecessor will become + # the last child + if ( $oldChild == $this -> lastChild() ) { + $this -> { m_lastChild } = $oldChild -> previousSibling(); + } + # if we remove the first child, its successor will become the + # first child + if ( $oldChild == $this -> firstChild() ) { + $this -> { m_firstChild } = $oldChild -> nextSibling(); + } + $this -> childNodes() -> remove( { index => $index } ); $oldChild -> { m_parentNode } = undef; + # get siblings right $oldChild -> nextSibling() -> { m_previousSibling } = *************** *** 748,754 **** my $aNode = $params{ aNode }; if ( $aNode == $this ) { return 1; ! } else { my $parent = $this -> parentNode(); --- 776,788 ---- my $aNode = $params{ aNode }; + # if the given node has no children it cannot be the ancestor + # of this node, so we can return false in a quick way + unless ( $aNode -> hasChildNodes() ) { + return 0; + } + if ( $aNode == $this ) { return 1; ! } else { my $parent = $this -> parentNode(); Index: NodeList.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NodeList.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NodeList.pm 26 Apr 2002 10:50:52 -0000 1.10 --- NodeList.pm 9 May 2002 19:09:41 -0000 1.11 *************** *** 44,47 **** --- 44,48 ---- $this -> { m_nodeList } = \@nodeList; + $this -> { m_length } = 0; return $this; # return Object } *************** *** 59,63 **** my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index > $this -> length() ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), --- 60,64 ---- my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), *************** *** 81,85 **** sub length { my ( $this ) = @_; ! scalar @{ $this -> { m_nodeList } }; } --- 82,86 ---- sub length { my ( $this ) = @_; ! $this -> { m_length }; } *************** *** 96,99 **** --- 97,101 ---- my $node = $paramsRef -> { node }; push (@{ $this -> { m_nodeList } }, $node ); + $this -> { m_length }++; } *************** *** 111,115 **** my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index > $this -> length() ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), --- 113,117 ---- my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), *************** *** 124,128 **** my $node = $this -> item({ index => $index }); splice( @{ $this -> { m_nodeList } }, $index, 1 ); ! return $node; } --- 126,131 ---- my $node = $this -> item({ index => $index }); splice( @{ $this -> { m_nodeList } }, $index, 1 ); ! $this -> { m_length }--; ! $node; } *************** *** 142,146 **** my $index = $paramsRef -> { 'index' }; my $node = $paramsRef -> { node }; ! if ( $index < 0 || $index => $this -> length() ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), --- 145,149 ---- my $index = $paramsRef -> { 'index' }; my $node = $paramsRef -> { node }; ! if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = XML::DOM2::DOMException -> new( { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), *************** *** 153,156 **** --- 156,160 ---- } splice( @{ $this -> { m_nodeList } }, $index, 0, $node ); + $this -> { m_length }++; } *************** *** 197,199 **** --- 201,204 ---- my @emptyList = (); $this -> { m_nodeList } = \@emptyList; + $this -> { m_length } = 0; } |
From: Jan T. <de...@us...> - 2002-05-03 14:05:02
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv7501 Modified Files: Interpreter.pm Log Message: * added handler for fatal errors Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Interpreter.pm 29 Nov 2001 22:15:02 -0000 1.3 --- Interpreter.pm 3 May 2002 13:32:00 -0000 1.4 *************** *** 5,14 **** # NetScript 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... #-------------------------------------------------------- ! use strict; package NetScript::Interpreter; use vars qw($VERSION); #-------------------------------------------------------- --- 5,22 ---- # NetScript 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... #-------------------------------------------------------- ! ! #/** ! # This is the Interpreter class. This class is responsible for ! # doing all the work. It initialises the libraries, parses the ! # file and then redirects the work to the libraries which are ! # registered. ! # @author <a href="mailto:ko...@in...">Jan Thomä</a> ! #*/ package NetScript::Interpreter; use vars qw($VERSION); + use strict; #-------------------------------------------------------- *************** *** 17,26 **** use CGI; use XML::Parser; use NetScript::Engine::Event; use NetScript::Engine::EventRelay; use NetScript::Util::XMLParserRelay; - use NetScript::Util::PropertyFileParser; - use NetScript::Util::ConfigFileParser; use NetScript::Util::FileRetriever; #-------------------------------------------------------- --- 25,60 ---- use CGI; use XML::Parser; + use NetScript::Engine::DOMWalker; use NetScript::Engine::Event; use NetScript::Engine::EventRelay; + use NetScript::Engine::StatementEvaluator; use NetScript::Util::XMLParserRelay; use NetScript::Util::FileRetriever; + use NetScript::Util::ConfigurationParser; + use XML::DOM2::DOMParser; + use XML::DOM2::DOMWriter; + use XML::DOM2::XMLDOMWriterStyle; + + # This is for catching errors at compile-time + use CGI::Carp qw(fatalsToBrowser set_message); + BEGIN { + sub handle_errors { + my ( $message ) = @_; + my $parser = NetScript::Util::ConfigurationParser -> new(); + + open( AFILE, "<".$parser -> staticDir()."/pages/errorpage.html" ); + my $msg = ""; + while(<AFILE>) { + $msg .= $_; + } + close( AFILE ); + + $msg =~ s/<message>/$message/xeg; + $msg =~ s/<version>/$VERSION/xeg; + print $msg; + } + + set_message(\&handle_errors); + } #-------------------------------------------------------- *************** *** 47,51 **** # Constant for an Event, that will be raised before parsing of # the input file. ! #+/ sub PARSE_START_EVENT { "NetScript::Interpreter::PARSE_START_EVENT"; } --- 81,85 ---- # Constant for an Event, that will be raised before parsing of # the input file. ! #*/ sub PARSE_START_EVENT { "NetScript::Interpreter::PARSE_START_EVENT"; } *************** *** 53,57 **** # Constant for an Event, that will be raised after parsing of # the input file. ! #+/ sub PARSE_END_EVENT { "NetScript::Interpreter::PARSE_END_EVENT"; } --- 87,91 ---- # Constant for an Event, that will be raised after parsing of # the input file. ! #*/ sub PARSE_END_EVENT { "NetScript::Interpreter::PARSE_END_EVENT"; } *************** *** 59,76 **** # Constant for an Event, that will be raised before interpreter will # terminate. ! #+/ sub INTERPRETER_EXIT_EVENT { "NetScript::Interpreter::INTERPRETER_EXIT_EVENT"; } #/** # Constant for the NetScript namespace URI. ! #+/ sub NETSCRIPT_NAMESPACE_URI { "http://www.insomnia-hq.de/netscript"; } #/** # Constructor of a new Interpreter. ! #+/ sub new { - # These two lines help with inheritance and - # allow this method to be called as object method. my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname --- 93,109 ---- # Constant for an Event, that will be raised before interpreter will # terminate. ! #*/ sub INTERPRETER_EXIT_EVENT { "NetScript::Interpreter::INTERPRETER_EXIT_EVENT"; } #/** # Constant for the NetScript namespace URI. ! #*/ sub NETSCRIPT_NAMESPACE_URI { "http://www.insomnia-hq.de/netscript"; } #/** # Constructor of a new Interpreter. ! # @public ! #*/ sub new { my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname *************** *** 82,89 **** $this -> { m_CGI } = new CGI; # CGI-Member $this -> { m_EventRelay } = NetScript::Engine::EventRelay -> new(); ! $this -> { m_ConfigFile } = "config.xml"; $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); ! $this -> { m_FileRetriever } = NetScript::Util::FileRetriever -> new( $this ); ! $this -> { m_EventRelay } -> addEventListener( $this, { &FATAL_EVENT() => "onFatalEvent" } ); --- 115,124 ---- $this -> { m_CGI } = new CGI; # CGI-Member $this -> { m_EventRelay } = NetScript::Engine::EventRelay -> new(); ! $this -> { m_ConfigFile } = "file:./config.xml"; $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); ! $this -> { m_FileRetriever } = ! NetScript::Util::FileRetriever -> new( $this ); ! $this -> { m_StatementEvaluator } = ! NetScript::Engine::StatementEvaluator -> new( $this ); $this -> { m_EventRelay } -> addEventListener( $this, { &FATAL_EVENT() => "onFatalEvent" } ); *************** *** 110,118 **** my ( $this ) = @_; # read config files ! my $cfp = NetScript::Util::ConfigFileParser -> new (); ! $cfp -> parseString( ! $this -> getFileRetriever() -> retrieveFile( ! $this -> { m_ConfigFile } ) ! ); --- 145,153 ---- my ( $this ) = @_; # read config files ! # my $cfp = NetScript::Util::ConfigFileParser -> new (); ! # $cfp -> parseString( ! # $this -> getFileRetriever() -> retrieveFile( ! # $this -> { m_ConfigFile } ) ! # ); *************** *** 121,124 **** --- 156,177 ---- $this -> getEventRelay() -> createAndRaiseEvent(&PARSE_START_EVENT()); # start input file parsing + my $domparser = XML::DOM2::DOMParser -> new(); + my $dom = $domparser -> parseString( { string => $this -> getFileRetriever() -> retrieveFile( + "file:./test.xml" ) } ); + + # Create a DOMWalker + my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); + + # Walk over the DOM + my $resultDOM = $domwalker -> walkOver( $dom ); + + my $domwriter = XML::DOM2::DOMWriter -> new(); + my $domstyle = XML::DOM2::XMLDOMWriterStyle -> new(); + my $string = $domwriter -> writeDOMToString( { + document => $resultDOM, + style => $domstyle } ); + + # print $this -> getCGI() -> header(); + # print $string; *************** *** 138,141 **** --- 191,196 ---- # @return a string containing the value(s) of the parameter # or undef, if the parameter was not specified. + # @public + #*/ sub getParameter { my ($this, $parameter) = @_; *************** *** 148,151 **** --- 203,207 ---- # which can be used to retrieve files. # @return an instance of NetScript::Util::FileRetriever + # @public #*/ sub getFileRetriever { *************** *** 158,165 **** --- 214,233 ---- # the interpreter events. # @return an instance of NetScript::Engine::EventRelay + # @public #*/ sub getEventRelay { my ($this) = @_; return $this -> { m_EventRelay }; + } + + #/** + # Returns the statement evaluator which is responsible for + # evaluating statements. + # @return an instance of NetScript::Engine::StatementEvaluator + # @public + #*/ + sub getStatementEvaluator { + my ($this) = @_; + return $this -> { m_StatementEvaluator }; } |
From: Jan T. <de...@us...> - 2002-05-03 14:05:01
|
Update of /cvsroot/net-script/netscript2 In directory usw-pr-cvs1:/tmp/cvs-serv13533 Modified Files: LICENSE README Log Message: Index: LICENSE =================================================================== RCS file: /cvsroot/net-script/netscript2/LICENSE,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LICENSE 14 Jun 2001 22:01:56 -0000 1.1 --- LICENSE 3 May 2002 13:37:49 -0000 1.2 *************** *** 4,8 **** | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000 - 2001 by Jan Thomä, insOMnia \---------------------------------------------------------------------/ --- 4,8 ---- | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000-2002 by Jan Thomä, insOMnia \---------------------------------------------------------------------/ Index: README =================================================================== RCS file: /cvsroot/net-script/netscript2/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 29 Nov 2001 22:20:26 -0000 1.3 --- README 3 May 2002 13:37:49 -0000 1.4 *************** *** 4,8 **** | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000 - 2001 by Jan Thomä, insOMnia (ko...@in...) \---------------------------------------------------------------------/ --- 4,8 ---- | are protected under the terms and conditions of the Artistic License. | ! | (C) 2000-2002 by Jan Thomä, insOMnia (ko...@in...) \---------------------------------------------------------------------/ |