OpenFOAM-源码文档中的图例说明

对于OpenFOAM-v1812与OpenFOAM-6该页面是相同的。


Graph Legend 图例

该页面介绍如何解释由doxygen生成的关系图。

考虑下面的例子:

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
/*! Invisible class because of truncation 
由于截断而不可见的类 */
class Invisible { };
/*! Truncated class, inheritance relation is hidden
截断类,继承关系不可见 */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments
该类没有doxygen注释文档 */
class Undocumented { };
/*! Class that is inherited using public inheritance
使用公有继承的类 */
class PublicBase : public Truncated { };
/*! A template class
模板类 */
template<class T> class Templ { };
/*! Class that is inherited using protected inheritance
使用保护继承的类 */
class ProtectedBase { };
/*! Class that is inherited using private inheritance
使用私有继承的类 */
class PrivateBase { };
/*! Class that is used by the Inherited class
由继承类使用的类 */
class Used { };
/*! Super class that inherits a number of other classes
继承许多其他类的超类 */
class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

以上关系在图中表示为:

上图中的方框有如下含义:

  • 填充有灰色的方框表示该图所要表示结构体或类。
  • 黑色边框表示有对应文档的结构体或类。
  • 灰色边框表示没有文档的结构体或类。
  • 红色边框表示有文档的结构或类,但没有显示其所有继承/包含关系。 如果关系图超出了指定的边界,超出的部分就会被截断。

上图中的箭头有如下含义:

  • 深蓝色的箭头用来可视化两个类之间的公有继承关系。
  • 深绿色的箭头用来表示保护继承。
  • 深红色的箭头用来表示私有继承。
  • 如果一个类包含在另一个类中或被另一个类使用,则使用紫色虚线箭头。 箭头旁标记了相关变量,通过该变量可以访问指向的结构体或类。
  • 黄色虚线箭头用来表示模板实例与其实例化所用的模板类之间的关系。 箭头旁标记了实例的模板参数。