看完of的幫助檔案,會非常懷念fluent的幫助檔案或是matlab的幫助檔案
比如我要解決一個matlab問題,基本上看幫助檔案一分鐘就知道我要如何取用我想要的東西,of幫助檔案不光做不到,還給你炫技

真的,這東西誰看誰不懵啊
這些框圖怎么來的呢,是doxygen自動生成的,
那doxygen是怎樣生成的呢?
以下面作為例子說下怎樣生成的這個框圖呢
點擊查看代碼
/*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments */
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;
};
根據關鍵字識別生成的框圖如下所示:

其中灰色底的方框是inherited,是派生類
其中黑邊方框是有文字備案的結構體或者類
其中灰色邊框是沒有文字備案的結構體或類(很少的)
紅色邊框的是因頁面大小未能完全展示的結構體或類
深藍色箭頭為public繼承
深綠色箭頭為protected繼承
紅色箭頭為private繼承
紫色虛線箭頭意思是這個類在其他地方也有被利用
黃色虛線箭頭意思是模板類之間有關系
好,自此已經非常明確了,磨刀程序完成,那么接下來就是事半功倍
這時of扔給我們一張圖,就可以一眼看穿出其中的邏輯關系
咱們以fvMesh為例,

全是深藍色箭頭哈,那非常明確,全是公有制繼承
其中灰色框是fvMesh,那他就是派生類的主體
當然也有其他類是他的公有派生類,右側七個類不一一贅述
我們也能看到fvMesh繼承的類中polyMesh是紅色,為什么不是黑色呢,
很簡單,有關他的類繼承關系太復雜寫不下了,干脆截斷不寫了
我們再回到最開始的框圖,fvMesh內有關查詢網格中心位置的函式C()
其實這個框圖并沒有說什么,主要說的是哪些函式或類用到這個中心位置查詢函式了,具體還是要看原始碼
那咋整,能不能用
能用
告訴你去那些用的地方看看怎么用
,去抄一下,
但就是不直接了當告訴你怎么實作,
,,,
確實不討好任何人
把案例寫在源檔案里是openfoam唯一的溫柔
以上如有問題,請聯系我進行更正,謝謝
后續還會繼續更新
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/544393.html
標籤:C++
上一篇:C++學習-const
下一篇:指標進階2 - 函式
