Ti*k*Z hat eine Library eigens fürs Verschachteln: fit. Und die zweigeschossigen Nodes kann man mit der shapes.multipart Library erzeugen. Das hat den Vorteil, dann man die Exception_handler Nodes rechts von den Obergeschossen platzieren kann und dass man die Pfeile auch von/an den Ober- bzw. Untergeschossen starten bzw. enden lassen kann.
[![alt text][1]][1]
text][1]][2]
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{positioning,shapes.multipart,shapes,fit,decorations.pathreplacing}
% \makeatletter % from https://tex.stackexchange.com/a/88336/121799
% \newcommand{\GetCurrentNodeName}{\tikz@fig@name}
% \makeatother
\begin{document}
\tikzset{basic/.style={
draw,
rectangle split,
rectangle split parts=2,
rectangle split draw splits=true,
text width=5cm,
align=center,
draw,
},
murmel/.style={draw,text width=5cm,align=center}
}
\begin{tikzpicture}[font=\sffamily\small]
% pointer nodes
\node[basic, rectangle split parts=2] (pointer1) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer1,basic, rectangle split parts=2] (pointer2) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer2,basic, rectangle split parts=2] (pointer3) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer3,basic, rectangle split parts=2] (pointer4) {6xFFFFFF
\nodepart{two}
Default exception handler};
% Pfeile zwischen den nodeparts
\draw[-latex] ([yshift=-1mm]pointer1.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer2.one east);
\draw[-latex] ([yshift=-1mm]pointer2.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer3.one east);
\draw[-latex] ([yshift=-1mm]pointer3.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer4.one east);
% Schachtel
\node[draw,fit=(pointer1) (pointer4),label=above:stack,inner sep=4mm,yshift=2mm,
xshift=1mm] (Schachtel){};
%
\foreach \X in {1,...,4}
{
\ifnum\X=4
\xdef\mytext{MSVCRTexhandler}
\else
\xdef\mytext{Exception\underline{~~}handler\X ()}
\fi
\node[right=2cm of pointer\X.one east,murmel] (murmel\X) {\mytext};
\draw[blue,-latex] (pointer\X.two east) to[out=0,in=180] (murmel\X);
% Klammer wie in cis' Antwort
\draw[decorate,decoration={brace,mirror,amplitude=3pt},xshift=-1mm]
([xshift=-1mm]pointer\X.north -| Schachtel.west) -- ([xshift=-1mm]pointer\X.south -|
Schachtel.west) node[midway,rotate=90,yshift=2mm,font=\tiny\sffamily]{$2\times4$ bytes};
}
\end{tikzpicture}
\end{document}
**ADDENDUM**: Ja, es gibt in der Tat Probleme, wenn man obigen Code in beamer verwenden will. Ich konnte das Problem lösen, indem ich in der Schleife am Ende `\xdef` durch `\def` ersetzt habe. Aber warum beamer `\xdef` nicht mag, weiss ich nicht wirklich.
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.multipart,shapes,fit,decorations.pathreplacing}
% \makeatletter % from https://tex.stackexchange.com/a/88336/121799
% \newcommand{\GetCurrentNodeName}{\tikz@fig@name}
% \makeatother
\begin{document}
\tikzset{arghh/.style={
draw,
rectangle split,
rectangle split parts=2,
rectangle split draw splits=true,
text width=5cm,
align=center,
draw,
},
murmel/.style={draw,text width=5cm,align=center}
}
\begin{frame}
\frametitle{Nodes verschachteln}
\begin{overlayarea}{\textwidth}{8cm}
\begin{tikzpicture}[font=\sffamily\small,scale=0.9,transform shape]
% pointer nodes
\node[arghh, rectangle split parts=2] (pointer1) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer1,arghh, rectangle split parts=2] (pointer2) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer2,arghh, rectangle split parts=2] (pointer3) {Pointer to next SEH record
\nodepart{two}
Pointer to exception handler};
\node[below=1cm of pointer3,arghh, rectangle split parts=2] (pointer4) {6xFFFFFF
\nodepart{two}
Default exception handler};
% Pfeile zwischen den nodeparts
\draw[-latex] ([yshift=-1mm]pointer1.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer2.one east);
\draw[-latex] ([yshift=-1mm]pointer2.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer3.one east);
\draw[-latex] ([yshift=-1mm]pointer3.one east) -- ++(2mm,0) |- ([yshift=1mm]pointer4.one east);
% Schachtel
\node[draw,fit=(pointer1) (pointer4),label=above:stack,inner sep=6mm,yshift=1mm,
xshift=1.5mm] (Schachtel){};
% %
\foreach \X in {1,...,4}
{
\ifnum\X=4
\def\mytext{MSVCRTexhandler}
\else
\def\mytext{Exception\underline{~~}handler\X ()}
\fi
\node[right=1.4cm of pointer\X.one east,murmel] (murmel\X) {\mytext};
\draw[blue,-latex] (pointer\X.two east) to[out=0,in=180] (murmel\X);
% Klammer wie in cis' Antwort
\draw[decorate,decoration={brace,mirror,amplitude=3pt},xshift=-1mm]
([xshift=-1mm]pointer\X.north -| Schachtel.west) -- ([xshift=-1mm]pointer\X.south -|
Schachtel.west) node[midway,rotate=90,yshift=2mm,font=\tiny\sffamily]{$2\times4$ bytes};
}
\end{tikzpicture}
\end{overlayarea}
\end{frame}
\end{document}
[![alt text][3]][3]
[1]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-20_at_9.52.49_AM.pnghttps://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-20_at_9.52.49_AM.png
[2]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-20_at_9.52.49_AM.png
[3]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-22_at_10.42.12_AM.png