\begin{tikzpicture} \tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=white, drop shadow, text centered, anchor=north, text width=6cm] %nodes \node (Vector) [abstract, rectangle split, rectangle split parts=3] { \textbf{Vector} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] typedef value_type; typedef size_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] 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] typedef vector_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] void mult(vector_type); \end{lstlisting} }; \node (Solver) [abstract, rectangle split, rectangle split parts=3, below=of Vector] { \textbf{EqSolver} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] typedef vector_type; typedef matrix_type; typedef monitor_type; typedef preconditioner_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] 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=of Matrix] { \textbf{Preconditioner} \nodepart{second} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] typedef vector_type; typedef matrix_type; typedef monitor_type; \end{lstlisting} \nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] Preconditioner(matrix_type ,monitor_type); void operator()(vector_type,vector_type) \end{lstlisting} }; \node (TimeIntegrator) [abstract, rectangle split, rectangle split parts=2, below=of Preconditioner] { \textbf{TimeIntegrator} \nodepart{second} %\nodepart{third} \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] template void operator()(rhs_type ,vector_type ,value_type ,value_type ,value_type); \end{lstlisting} }; \end{tikzpicture}