wholeTomProcess.tex 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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.3cm]
  51. % Draw diagram elements
  52. \node (tomcomp) [compiler2] {\figcode{\textbf{Compilateur {\tom}}}};
  53. \node (tomcode) [code, left of=tomcomp,xshift=-1.0cm] {\figcode{Tom \\ + \\ Java}};
  54. \node (mapping) [code, above of=tomcomp] {\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 (datastruct) [code, right of=gomcomp,xshift=1.0cm] {\figcode{Structures \\ de \\ données \\ Java}};
  58. \node (emfmapping) [code, below of=tomcomp] {\figcode{Ancrages algébriques}};
  59. \node (emf) [compiler2, below of=emfmapping] {\figcode{\textbf{{\emf}}}};
  60. %%%I should probably make a new shape
  61. \node (ecore) [left of=emf,xshift=-1.5cm,text width=3em, text centered] {\figcode{MM .ecore}};
  62. \node (mm1)[rectangle, minimum width=0.5cm, minimum height=0.5cm,draw,left of=ecore,yshift=0.8cm,xshift=2.2cm]{};
  63. \node (mm2)[rectangle, minimum width=0.5cm, minimum height=0.5cm,draw,below of=mm1,yshift=1.4cm,xshift=-0.6cm]{};
  64. \node (mm3)[rectangle, minimum width=0.5cm, minimum height=0.5cm,draw,right of=mm1,yshift=-0.3cm,xshift=-1.5cm]{};
  65. \path[draw] (mm1) -- (mm2);
  66. \path[draw] (mm1) -- (mm3);
  67. %%%%
  68. %\node (tomemf) [compiler2, below of=emfmapping] {\figcode{\textbf{{\tomemf}}}};
  69. \node (tomemf) [compiler2, right of=emfmapping, xshift=1.0cm] {\figcode{\textbf{{\tomemf}}}};
  70. %\node (emfstruct) [code, left of=tomemf,xshift=-1.0cm] {\figcode{Java EMF (MM)}};
  71. \node (emfstruct) [code, below of=tomemf] {\figcode{Java EMF (MM)}};
  72. \node (javacode) [code, right of=tomcomp,xshift=1.0cm] {\figcode{Code Java}};
  73. \node (javacomp) [compiler2, right of=javacode,xshift=0.5cm] {\figcode{\textbf{Compilateur {\java}}}};
  74. \node (bytecode) [code, right of=javacomp,xshift=0.5cm] {\figcode{110010}\\\figcode{101110}\\\figcode{010100}};
  75. \path[->] (javacomp) edge (bytecode);
  76. % Draw arrows between elements
  77. \path[->] (gomsig) edge (gomcomp);
  78. \path[->] (gomcomp) edge (mapping);
  79. \path[->] (mapping) edge (tomcomp);
  80. \path[->] (tomemf) edge (emfmapping);
  81. \path[->] (emfmapping) edge (tomcomp);
  82. \path[->] (gomcomp.east) edge (datastruct);
  83. %\path [draw, ->] (datastruct.east) -- ++(3,0) -- node [below] {} (javacomp);
  84. \draw[->] (datastruct) -- ++(2.8,0) -- (javacomp);
  85. \path[->] (emfstruct) edge (tomemf);
  86. \path[->] (tomcode) edge (tomcomp);
  87. \path[->] (tomcomp) edge (javacode);
  88. \path[->] (javacode) edge (javacomp);
  89. \path[->] (emf) edge (emfstruct);
  90. \path[->] (ecore) edge (emf);
  91. %\draw[->] (emfstruct) -- ++(0,-1) -- ++(10.5,0) -- (javacomp);
  92. \draw[->] (emfstruct) -- ++(2.8,0) -- (javacomp);
  93. \end{tikzpicture}
  94. % \end{center}
  95. % \caption{Diagramme d'activité décrivant le processus de compilation d'un programme {\tom}}
  96. %\label{fig:wholeTomProcess}
  97. %\end{figure}