wholeTomProcess2.tex 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. \begin{figure}[H]
  2. % Define the layers to draw the diagram
  3. \pgfdeclarelayer{tomgombackground}
  4. \pgfdeclarelayer{tombackground}
  5. \pgfsetlayers{tomgombackground,tombackground,main}
  6. % Define a new shape: page with a folded corner
  7. \makeatletter
  8. \pgfdeclareshape{flippedpage}{
  9. \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
  10. \inheritanchorborder[from=rectangle]
  11. \inheritanchor[from=rectangle]{center}
  12. \inheritanchor[from=rectangle]{north}
  13. \inheritanchor[from=rectangle]{south}
  14. \inheritanchor[from=rectangle]{west}
  15. \inheritanchor[from=rectangle]{east}
  16. % ... and possibly more
  17. \backgroundpath{% this is new
  18. % store lower left in xa/ya and upper right in xb/yb
  19. \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
  20. \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
  21. % compute corner of ``flipped page''
  22. \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
  23. \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
  24. % diagonal path of the corner
  25. \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
  26. \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
  27. \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}}
  28. \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
  29. \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
  30. \pgfpathclose
  31. % add little corner
  32. \pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}}
  33. \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
  34. \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
  35. \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
  36. }
  37. }
  38. % Define block styles
  39. \tikzstyle{compiler}=[draw, fill=blue!20, text width=6em, text centered, minimum height=2.5em, rounded corners]
  40. %\tikzstyle{compiler2}=[diamond, aspect=2, draw, fill=blue!20, text centered, rounded corners=1]
  41. \tikzstyle{compiler2}=[diamond, aspect=2, draw, text centered, rounded
  42. corners=1, text width=5.8em]
  43. %\tikzstyle{code}=[draw,shape=flippedpage,text width=2.7em, text centered, minimum height=3.7em,fill=white]
  44. \tikzstyle{code}=[draw,shape=flippedpage,text width=3em, text centered,
  45. minimum height=4.2em,fill=white]
  46. \tikzstyle{texttitle}=[fill=white, rounded corners, draw=black!50, dashed]
  47. \tikzstyle{background}=[fill=yellow!20, rounded corners, draw=black!50, dashed]
  48. \begin{center}
  49. %\begin{tikzpicture}[>=latex, node distance=3cm, on grid, auto]
  50. \begin{tikzpicture}[>=latex, on grid, auto, node distance=2.5cm]
  51. % Draw diagram elements
  52. \node (tomcomp) [compiler2] {\figcode{\textbf{Compilateur {\tom}}}};
  53. \node (tomcode) [code, below of=tomcomp] {\figcode{Tom \\ + \\ Java}};
  54. \node (mapping) [code, left of=tomcomp,xshift=-1.0cm] {\figcode{Ancrages algébriques}};
  55. \node (gomcomp) [compiler2, above of=mapping] {\figcode{\textbf{{\gom}}}};
  56. \node (gomsig) [code, left of=gomcomp,xshift=-1.0cm] {\figcode{Signature} \\ \figcode{Gom}};
  57. %\node (emfmapping) [code, left of=tomcomp,xshift=-1.0cm] {\figcode{Ancrages algébriques}};
  58. \node (tomemf) [compiler2, below of=mapping] {\figcode{\textbf{{\tomemf}}}};
  59. \node (emfstruct) [code, left of=tomemf,xshift=-1.0cm] {\figcode{Java EMF (MM)}};
  60. \node (javacode) [code, right of=tomcomp,xshift=1.0cm] {\figcode{Code Java}};
  61. \node (datastruct) [code, above of=javacode] {\figcode{Structures \\ de \\ données \\ Java}};
  62. \node (javacomp) [compiler2, right of=javacode,xshift=1.0cm] {\figcode{\textbf{Compilateur {\java}}}};
  63. \node (bytecode) [code, right of=javacomp,xshift=1.0cm] {\figcode{110010}\\\figcode{101110}\\\figcode{010100}};
  64. \path[->] (javacomp) edge (bytecode);
  65. \node (hand) [left of=mapping,xshift=-1.0cm,text width=3em, text centered]
  66. {\figcode{\textbf{Écriture à la main}}};
  67. % Draw arrows between elements
  68. \path[->] (hand) edge (mapping);
  69. \path[->] (gomsig) edge (gomcomp);
  70. \path[->] (gomcomp) edge (mapping);
  71. \path[->] (mapping) edge (tomcomp);
  72. %\path[->] (tomemf) edge (emfmapping);
  73. \path[->] (tomemf) edge (mapping);
  74. %\path[->] (emfmapping) edge (tomcomp);
  75. \path[->] (gomcomp.east) edge (datastruct);
  76. \draw[->] (datastruct) -- ++(3.5,0) -- (javacomp);
  77. \path[->] (emfstruct) edge (tomemf);
  78. \path[->] (tomcode) edge (tomcomp);
  79. \path[->] (tomcomp) edge (javacode);
  80. \path[->] (javacode) edge (javacomp);
  81. \draw[->] (emfstruct) -- ++(0,-1) -- ++(14,0) -- (javacomp);
  82. \end{tikzpicture}
  83. \end{center}
  84. \caption{Diagramme d'activité décrivant le processus de compilation d'un programme {\tom}}
  85. \label{fig:wholeTomProcess2}
  86. \end{figure}