gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] navidoc ./TODO-navidoc navidoc/mp/html.py navid...


From: Asko Soukka
Subject: [Gzz-commits] navidoc ./TODO-navidoc navidoc/mp/html.py navid...
Date: Mon, 26 May 2003 05:00:49 -0400

CVSROOT:        /cvsroot/navidoc
Module name:    navidoc
Changes by:     Asko Soukka <address@hidden>    03/05/26 05:00:49

Modified files:
        .              : TODO-navidoc 
        navidoc/mp     : html.py uml.py 

Log message:
        dep syntax changed

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/TODO-navidoc.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/mp/html.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/mp/uml.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: navidoc/TODO-navidoc
diff -u navidoc/TODO-navidoc:1.17 navidoc/TODO-navidoc:1.18
--- navidoc/TODO-navidoc:1.17   Fri May 23 08:31:11 2003
+++ navidoc/TODO-navidoc        Mon May 26 05:00:49 2003
@@ -56,23 +56,6 @@
   - fix umltool graphics to be closer to the UML 3amigos books
   - Fix UML sequence diagram: now you have to put
     seqobjects *after* the sequence...
-  - fix dep directive to be::
-
-       dep BuoyViewNode "calls" BuoyLinkListener
-
-       instead of 
-
-       dep "calls" BuoyViewNode BuoyLinkListener
-     
-       currently.
-     
-       Involves fixing many diagrams!
-       Reason: then can use in class:
-
-       class BuoyViewNode
-         dep "calls" BuoyLinkListener
-
-       because inside class, the class is given as the 1st argument.
 
 Docutils latex writer
 ---------------------
Index: navidoc/navidoc/mp/html.py
diff -u navidoc/navidoc/mp/html.py:1.1 navidoc/navidoc/mp/html.py:1.2
--- navidoc/navidoc/mp/html.py:1.1      Thu May 22 10:17:25 2003
+++ navidoc/navidoc/mp/html.py  Mon May 26 05:00:49 2003
@@ -19,7 +19,7 @@
 # MA  02111-1307  USA
 # 
 
-# $Id: html.py,v 1.1 2003/05/22 14:17:25 humppake Exp $
+# $Id: html.py,v 1.2 2003/05/26 09:00:49 humppake Exp $
 
 #
 # Written by Tuomas Lukka, Asko Soukka
@@ -60,19 +60,24 @@
        s = """
            picture %%.pict;
            %%.pict = classTitle("""+'"'+self.title+'"'+""");
+            picture %%.page;
+            %%.page = nullpicture;
+           addto %%.page doublepath 
((0,5)--(0,38)--(7,45)--(35,45)--(35,5)--cycle) withpen currentpen;
+           addto %%.page doublepath ((0,38)--(7,38)--(7,45)) withpen 
currentpen;
+           addto %%.page doublepath ((12,32)--(30,32)) withpen currentpen;
+           addto %%.page doublepath ((12,27)--(30,27)) withpen currentpen;
+           addto %%.page doublepath ((6,22)--(30,22)) withpen currentpen;
+           addto %%.page doublepath ((6,17)--(30,17)) withpen currentpen;
+           addto %%.page doublepath ((6,12)--(30,12)) withpen currentpen;
+           addto %%.page doublepath ((6,7)--(30,7)) withpen currentpen;
+            addto %%.pict also %%.page shifted (center(%%.pict) + (-17, 5));
+            setbounds %%.pict to bbox %%.pict;
            picmeasurements(%%);
-           """
+            """
        return self.repl(s)
-    def draw_code(self):
+    def draw_code(self):#
        s = """
            drawmeasuredpic(%%);
-           draw (((0,5)--(0,40)--(5,45)--(35,45)--(35,5)--cycle) shifted 
(%%.nw + (%%.ne - %%.nw)/2 -(17,0)));
-           draw (((0,40)--(5,40)--(5,45)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
-           draw (((3,35)--(31,35)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
-           draw (((3,30)--(31,30)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
-           draw (((3,25)--(31,25)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
-           draw (((3,20)--(31,20)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
-           draw (((3,15)--(31,15)) shifted (%%.nw + (%%.ne - %%.nw)/2 
-(17,0)));
            draw bboxmeasuredpic(%%);
-           """ 
+           """ 
        return self.repl(s)
Index: navidoc/navidoc/mp/uml.py
diff -u navidoc/navidoc/mp/uml.py:1.11 navidoc/navidoc/mp/uml.py:1.12
--- navidoc/navidoc/mp/uml.py:1.11      Thu Apr 24 05:04:19 2003
+++ navidoc/navidoc/mp/uml.py   Mon May 26 05:00:49 2003
@@ -19,7 +19,7 @@
 # MA  02111-1307  USA
 # 
 
-# $Id: uml.py,v 1.11 2003/04/24 09:04:19 humppake Exp $
+# $Id: uml.py,v 1.12 2003/05/26 09:00:49 humppake Exp $
 
 #
 # Written by Tuomas Lukka, Asko Soukka
@@ -528,11 +528,19 @@
 class mpdep(SimpleRelation):
     key = 'dep'
     def __init__(self, var, s, list):
-       (m,s) = match_remove('^\s*"(.*?)"\s*', s)
-       self.stereo = m.group(1)
-       SimpleRelation.__init__(self, var, s, list)
+        args = s.split()
+        if len(args) < 3: raise UMLException("Not enough arguments for 'dep' 
%s." % (s))
+        if len(args) > 3: raise UMLException("Too many arguments for 'dep' 
%s." %(s))
+        self.stereo = None
+        for arg in args:
+            if arg.startswith('"'):
+                self.stereo = arg
+                args.remove(arg)
+        if self.stereo == None: raise UMLException("Dependency role not given 
in %s." %(s))
+        print self.stereo, ' '.join(args)
+       SimpleRelation.__init__(self, var, ' '.join(args), list)
     def draw_code(self):
-       return self.pathCode() + self.repl(' dep(%%.p, "%stereo%"); ')
+       return self.pathCode() + self.repl(' dep(%%.p, %stereo%); ')
 
 class mpvobsubmatch(SimpleRelation):
     key = 'vobsubmatch'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]