\begin{tikzpicture} \tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=white, drop shadow, text centered, anchor=north, text width=5.5cm] %nodes \node (Vector) [abstract, rectangle split, rectangle split parts=3] { \textbf{Vector} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] typedef value_type; typedef size_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] Vector(size_type); Vector(Vector); void axpy(value_type,Vector); void axpby(value_type,Vector); void copy(Vector); value_type dot(Vector); Vector* duplicate(); void fill(value_type); value_type nrmi(); value_type nrm2(); void scal(vale_type); size_type size(); \end{lstlisting} }; \node (Matrix) [abstract, rectangle split, rectangle split parts=3, below right=0cm and 0.4cm of Vector.north east] { \textbf{Matrix} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] typedef vector_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] void mult(vector_type,vector_type); \end{lstlisting} }; \node (Solver) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Vector] { \textbf{EqSolver} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] typedef vector_type; typedef matrix_type; typedef monitor_type; typedef preconditioner_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] EqSolver(matrix_type ,monitor_type); void solve(vector_type,vector_type); void set_preconditioner(preconditioner_type); \end{lstlisting} }; \node (Preconditioner) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Matrix] { \textbf{Preconditioner} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] typedef vector_type; typedef matrix_type; typedef monitor_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] Preconditioner(matrix_type ,monitor_type); void operator()(vector_type ,vector_type) \end{lstlisting} }; \node (TimeIntegrator) [abstract, rectangle split, rectangle split parts=2, below=0.4cm of Preconditioner] { \textbf{TimeIntegrator} \nodepart{second} %\nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] template void operator()(rhs_type ,vector_type ,value_type ,value_type ,value_type); \end{lstlisting} }; \end{tikzpicture}