我有一个程序,它被分成两个主文件夹中的一些文件,源码和包括,标题。H文件包括文件夹,.cpp和.cu另一个是文件。这是整个例程的一个小图
注释#1这并不是我想要实现的,但它可能是一个起点。
笔记2 这里您可以找到例程这个词的含义,但在这里我指的是分成多个文件的复杂应用程序。
有没有表示程序所组成文件树的标准方法?我的意思是文件树,以及文件夹树。我正在寻找一些解决方案,甚至添加一些用一些箭头来表示文件内的关系。我想使用蒂克兹如果可能的话。
现在,这是我的可怜的、远未优化的 tikz 图像,我意识到:
\documentclass[]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{calc}
\tikzset{
%Define standard arrow tip
>=stealth',
pil/.style={
->,
thick,
shorten <=2pt,
shorten >=2pt,},
gpufile/.style={
rectangle,
rounded corners,
draw=red, very thick,
minimum height=2em,
minimum width=8em,
text centered
},
cpufile/.style={
rectangle,
rounded corners,
draw=black, thick,
minimum height=2em,
text centered
},
header/.style={
rectangle,
draw=gray, thin,
minimum height=2em,
minimum width=5em,
text centered
},
folder/.style={
rectangle,
draw=yellow, thin,
minimum height=3em,
minimum width=5em,
text centered
}
}
\begin{document}
\begin{tikzpicture}[node distance=1.5cm, auto,]
\tikzstyle{every path}=[-latex,thick]
\node[
folder,
xshift=-2cm] (src) {src};
\node[
cpufile,
right of=src,
xshift=40pt] (main) {\texttt{main.cpp}};
\node[
gpufile,
right of=main,
xshift=40pt,
yshift=0pt] (trbdf2) {\texttt{tr-bdf2.cu}}
;
\node[
gpufile,
right of=trbdf2,
xshift=40pt,
yshift=0cm
] (jacobian) {\texttt{jacobian.cu}};
\node[
gpufile,
right of=jacobian,
xshift=60pt
] (inversion) {\texttt{matrix\_inversion.cu}};
\node[
gpufile,
right of=inversion,
xshift=60pt] (tr) {\texttt{newton\char`_tr.cu}};
\node[
gpufile,
right of=tr,
xshift=60pt] (bdf2) {\texttt{newton\char`_bdf2.cu}};
\node[
folder,
below of=src,
yshift=-1cm] (include) {include};
\node[
header,
right of=include,
xshift=40pt] (libs) {\texttt{libs.h}};
\node[
header,
right of=libs,
xshift=40pt] (constants) {\texttt{constants.h}};
\node[
header,
right of=constants,
xshift=40pt] (fdefs) {\texttt{functions\char`_defs.h}};
\node[
header,
right of=fdefs,
xshift=40pt] (defs) {\texttt{defs.h}};
\node[
header,
right of=defs,
xshift=40pt] (linsolver) {\texttt{linear\char`_solver.h}};
;
\end{tikzpicture}
\end{document}
我需要强调.cu项目中的文件,它们的含义与经典的.cpp文件。