summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-07 22:51:06 +0000
committerKarl Berry <karl@freefriends.org>2010-04-07 22:51:06 +0000
commitf1ae0e2b17bb1ea576dcb3049e625db8eabbcd12 (patch)
tree922404d4700e62f616acbceb3bdbb5785ea86197 /Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex
parent389a14839d88ee774793a1eb4921c43933869738 (diff)
new latex package pgf-umlsd 0.5 (6apr10)
git-svn-id: svn://tug.org/texlive/trunk@17744 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex101
1 files changed, 101 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex b/Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex
new file mode 100644
index 00000000000..6c807d65e40
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgf-umlsd/pgf-umlsd-demo.tex
@@ -0,0 +1,101 @@
+% Demonstration of pgf-umlsd.sty, a convenient set of macros for drawing
+% UML sequence diagrams. Written by Xu Yuan <xuyuan.cn@gmail.com> from
+% Southeast University, China.
+% This file is part of pgf-umlsd
+% you may get it at
+% http://code.google.com/p/pgf-umlsd/
+
+\documentclass{article}
+
+\usepackage{tikz}
+\usetikzlibrary{arrows,shadows} % for pgf-umlsd
+\usepackage[underline=true,rounded corners=false]{pgf-umlsd}
+
+\begin{document}
+
+\begin{figure}
+ \centering
+ \begin{sequencediagram}
+ \newthread{ss}{:SimulationServer}
+ \newinst{ctr}{:SimControlNode}
+ \newinst{ps}{:PhysicsServer}
+ \newinst[1]{sense}{:SenseServer}
+
+ \begin{call}{ss}{Initialize()}{sense}{}
+ \end{call}
+ \begin{sdblock}{Run Loop}{The main loop}
+ \begin{call}{ss}{StartCycle()}{ctr}{}
+ \begin{call}{ctr}{ActAgent()}{sense}{}
+ \end{call}
+ \end{call}
+ \begin{call}{ss}{Update()}{ps}{}
+ \begin{messcall}{ps}{PrePhysicsUpdate()}{sense}{state}
+ \end{messcall}
+ \begin{sdblock}{Physics Loop}{}
+ \begin{callself}{ps}{PhysicsUpdate()}{}
+ \end{callself}
+ \end{sdblock}
+ \begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
+ \end{call}
+ \end{call}
+ \begin{call}{ss}{EndCycle()}{ctr}{}
+ \begin{call}{ctr}{SenseAgent()}{sense}{}
+ \end{call}
+ \end{call}
+ \end{sdblock}
+ \end{sequencediagram}
+ \caption{UML sequence diagram demo. The used style-file is
+ \texttt{pgf-umlsd.sty}, you may get it at
+ http://code.google.com/p/pgf-umlsd/}
+\end{figure}
+
+\begin{figure}
+ \centering
+ \begin{sequencediagram}
+ \tikzstyle{inststyle}+=[bottom color=yellow] % custom the style
+ \newthread[blue]{ss}{:SimulationServer}
+ \newinst{ps}{:PhysicsServer}
+ \newinst[2]{sense}{:SenseServer}
+ \newthread[red]{ctr}{:SimControlNode}
+
+ \begin{sdblock}[green!20]{Run Loop}{The main loop}
+ \mess{ctr}{StartCycle}{ss}
+ \begin{call}{ss}{Update()}{ps}{}
+ \prelevel
+ \begin{callself}{ctr}{SenseAgent()}{}
+ \begin{call}[3]{ctr}{Read}{sense}{}
+ \end{call}
+ \end{callself}
+ \prelevel\prelevel\prelevel\prelevel
+ \setthreadbias{west}
+ \begin{call}{ps}{PrePhysicsUpdate()}{sense}{}
+ \end{call}
+ \setthreadbias{center}
+ \begin{callself}{ps}{Update()}{}
+ \begin{callself}{ps}{\small CollisionDetection()}{}
+ \end{callself}
+ \begin{callself}{ps}{Dynamics()}{}
+ \end{callself}
+ \end{callself}
+ \begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
+ \end{call}
+ \end{call}
+ \mess{ss}{EndCycle}{ctr}
+ \begin{callself}{ctr}{ActAgent()}{}
+ \begin{call}{ctr}{Write}{sense}{}
+ \end{call}
+ \end{callself}
+ \end{sdblock}
+
+ \end{sequencediagram}
+ \caption{Example of a sequence with parallel activities and the
+ customed style. The used style-file is \texttt{pgf-umlsd.sty}, you
+ may get it at http://code.google.com/p/pgf-umlsd/}
+\end{figure}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: Tex-PDF
+%%% TeX-master: t
+%%% End: