summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-uml/diagState.tex
blob: a315288e0ca165d2edefed03af51b65933741423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
% \documentclass[11pt,a4paper,twoside]{article}
%   \usepackage[T1]{fontenc}
%   \usepackage[applemac]{inputenc}
%   % \usepackage[latin1]{inputenc}
%   \usepackage{pst-uml}
% \begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% définition des objets
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\StateGlobal}{%
  \umlState{état global de l'objet \texttt{Graphe}}{\umlEmptyBox{13cm}{16cm}}%
}
\newcommand{\StateNRSA}{%
  \umlState{non routé \\ sans arêtes}{\space}%
}
\newcommand{\StateNRI}{%
  \umlState{non routé \\ incomplet}{\space}%
}
\newcommand{\StateNRC}{%
  \umlState{non routé \\ complet}{\space}%
}
\newcommand{\StateROU}{%
  \umlState{routé \\ \mbox{}}{\space}%
}
\newcommand{\StateVisu}{%
  \umlState{Visualisable \\ \mbox{}}{do/superviser()}%
}
\newcommand{\StateAnu}{%
  \umlState{GrapheAnnulable}{%
    \hspace*{2.25cm}
    \rmfamily% car normalement un corps d'état est en ttfamily
    \begin{psmatrix}[colsep=1,rowsep=1.5,mnode=r]
                                       \\[-1.4cm]
       [name=StateInAnu] \umlStateIn   \\[-0.5cm]
       [name=StateNRSA]   \StateNRSA     \\[0cm]
       [name=StateNRI]  \StateNRI    \\[1cm]
       [name=StateNRC]   \StateNRC     \\[0.5cm]
       [name=StateROU]   \StateROU   
          &   \umlPutStateOut{0,0}{StateOutAnu}  \\[-1.5cm]
          {} % boite vide NECESSAIRE sur la dernière ligne si vide !
    \end{psmatrix}%
    \hspace*{1.5cm}
    %
    % Connection propre à chaque node
    % 
    {\ttfamily\small
      % 
      % \nput{75}{StateInAnu}{EntréeAnnulable}
      % \nput{-75}{StateOutAnu}{SortieAnnulable}
      % 
      \ncEXS[offsetA=0.25,offsetB=0.5]{StateNRSA}{StateNRSA}%
      \ncput*[npos=1.7]{ajouterSommet}
      \ncWXS[offsetA=-0.25,offsetB=-0.5]{StateNRSA}{StateNRSA}%
      \ncput*[npos=1.7]{retirerSommet}
      %
      \ncEXS[offsetA=0.25,offsetB=0.5]{StateNRI}{StateNRI}%
      \ncput*[npos=1.7]{ajouterArête}
      \ncWXS[offsetA=-0.25,offsetB=-0.5]{StateNRI}{StateNRI}%
      \ncput*[npos=1.7]{retirerArête}
      \ncEXN[offsetA=-0.0,offsetB=-0.5]{StateNRI}{StateNRI}%
      \ncput*[npos=1.7]{ajouterSommet}
      \ncWXN[offsetA=0.0,offsetB=0.5]{StateNRI}{StateNRI}%
      \ncput*[npos=1.7]{retirerSommet}
      %
      \ncEXS[offsetA=0.25,offsetB=0.5]{StateNRC}{StateNRC}%
      \ncput*[npos=1.7]{ajouterRoute}
      \ncWXS[offsetA=-0.25,offsetB=-0.5]{StateNRC}{StateNRC}%
      \ncput*[npos=1.7]{retirerRoute}
      % 
      \ncWXS[offsetA=-0.25,offsetB=-0.5]{StateROU}{StateROU}%
      \ncput*[npos=1.7]{réoptimiser}
      % 
      % Connections INTERNODE interne au macro-état
      %
      \ncline{->}{StateInAnu}{StateNRSA}%
         \naput[npos=0.3]{}%
      %
      \ncline{->}{StateNRSA}{StateNRI}%
         \naput[npos=0.3]{ajouterArête}%
      %
      \ncline{->}{StateNRI}{StateNRC}%
         % \naput[npos=0.3]{graphComplet}%
         \naput{graphComplet}%
      %
      \ncline{->}{StateNRC}{StateROU}%
         \ncput*[npos=0.3]{\umlStack{[ClientPrioritaireSatisfait] DemandeFin}}
      %
      \ncline{->}{StateROU}{StateOutAnu}%
      %
    }%
  }%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Placement des objets
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
  % \scalebox{0.5}{%}  Fonctionne egalement
  % \resizebox{0.9\linewidth}{!}{%}
  \resizebox{!}{13cm}{%
    \begin{pspicture}(-5,-9.5)(9.5,8)%\psgrid
      %
      \psset{%
         linearc=0.3,%
         % arm=1.2,%
         armA=1.2,%
         armB=0.8,%
         arrows=->,%
         arrowscale=2,%
         ncurv=2,% instead of 0.67
      }%
      \rput(2.4,-0.75){\rnode{StateGlobal}{\StateGlobal}}%
      %
      \umlPutStateIn{6,5}{StateIn}%
      %
      \rput(0,-1){\rnode{StateAnu}{\StateAnu}}%
      %
      \rput(6,-3){\rnode{StateVisu}{\StateVisu}}%
      %
      \rput(6,0){\rnode{StateOut}{\umlStateOut}}%
      %
      % LES CONNECTIONS INTERNODE
      %
      {\ttfamily\small
        %
        \ncEXN[offsetA=-0.25,offsetB=-0.5,armA=0.5]{StateVisu}{StateVisu}%
          \ncput*[npos=1.7]{zoomer}
        % 
        \ncSW[offsetB=-5]{->}{StateIn}{StateAnu}%
          \naput[npos=1.3]{NewGraphAsked}
        %
        \ncEN{->}{StateOutAnu}{StateVisu}%
          \nbput[npos=0.9]{/Sauvegarder}
        \ncline{->}{StateVisu}{StateOut}%
        %
        \ncES[offsetA=3]{->}{StateAnu}{StateOut}%
          % \naput[npos=0.6]{Annuler}
		  % on ajoute un espace en début de chaque ligne " Annuler"..
          \naput[npos=0.99]{\umlStack[umlAlign=l]%
                  {\ Annuler\\\ /DemanderConfirmation}}
      }
    \end{pspicture}%
  }%end resizeORscalebox
\end{center}


% \end{document}