xuyuan / pgf-umlcd

this project is transfered to https://github.com/pgf-tikz/pgf-umlcd
https://github.com/pgf-tikz/pgf-umlcd
Other
55 stars 17 forks source link

Class that implements more than 1 inferface #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
Define a (abstract)class that implements more than one interface.

Example:
\begin{tikzpicture}

\begin{interface}[]{i1}{0,7}
\end{interface}

\begin{interface}[]{i2}{9,7}
\end{interface}

\begin{class}[]{c1}{0,12}
    \implement{i2}
    \implement{i2}
\end{class}

\end{tikzpicture}

What is the expected output? What do you see instead?
I get the error msg:
! Package PGF Math Error: Unknown function `i2' (in 'i2').

What version of the product are you using? On what operating system?
pgf-umlcd-0.2.1

Original issue reported on code.google.com by carlse...@googlemail.com on 19 Feb 2012 at 3:40

GoogleCodeExporter commented 9 years ago
Got the same issue with multiple inheritance (however, the macro to implement 
inheritance and interface implementation is the same). 
Using the macro content directly works however. The problem seems to be in the 
`\umlcdClassAbstractClass` set. In your example, using 
    \for \c in {i1,i2}{\draw [umlcd style implement line] (\c) -- (c1);}
should work (this is basically what the macro do).
Don't understand why `\umlcdClassAbstractClass` does not work in the 
`\foreach`, since it indeed contains `i1,i2` (but I'm not a TikZ expert). 
Hope the bug will be fixed

Original comment by ylois...@gmail.com on 12 Nov 2012 at 3:52

GoogleCodeExporter commented 9 years ago
I just ran into this bug myself. In the foreach loop used to iterate through 
\umlcdClassAbstractClass there are brackets around \umlcdClassAbstractClass 
that shouldn't be there. (as \umlcdClassAbstractClass is alread a list...)

Original comment by patrick....@gmail.com on 27 Nov 2012 at 10:37

GoogleCodeExporter commented 9 years ago
Multiple inheritance (a class that inherits multiple classes) results in the 
same error.

Can multiple inheritance and multiple interfaces support be fixed?

Original comment by akhay...@gmail.com on 28 Aug 2014 at 12:24

xuyuan commented 9 years ago

fixed https://github.com/xuyuan/pgf-umlcd/commit/64a7220d7a4757af0fae345e21650206be2b2226