http://maruf.ca/rade/web/CAA_RADE_IdentityCard.htm
IdentityCard.h 文件等同于“附加包含目錄”,你可以用來設(shè)置一個Visual Studio項目。它是CATIA頭文件所在的目錄的列表浮还,這些目錄定義了頭文件倒堕。
當(dāng)您在CAA項目中使用類時哪自,需要在IdentityCard.h中寫入定義該類的目錄丰包,以使編譯器需要知道在哪里可以找到該頭文件(即使Visual Studio可以找到該文件,mkmk編譯器仍然需要知道它在哪里)壤巷。
IdentityCard.h文件的組織如下:
CAA Wizard Edition Zone
// DO NOT EDIT :: THE CAA2 WIZARDS WILL ADD CODE HERE
AddPrereqComponent("System",Protected);
AddPrereqComponent("CATAnalysisInterfaces",Protected);
AddPrereqComponent("DialogEngine",Protected);
AddPrereqComponent("Mathematics",Protected);
AddPrereqComponent("Dialog",Protected);
// END WIZARD EDITION ZONE
- 此代碼由CAA向?qū)ё詣由梢乇耄粦?yīng)進(jìn)行調(diào)整或更改。
User Input Area
AddPrereqComponent("ApplicationFrame",Public);
AddPrereqComponent("GSMInterfaces",Public);
AddPrereqComponent("SketcherInterfaces",Public);
AddPrereqComponent("MecModInterfaces",Public);
AddPrereqComponent("ObjectSpecsModeler",Public);
AddPrereqComponent("GeometricObjects",Public);
AddPrereqComponent("ObjectModelerBase",Public);
...
...
...
- 將頭文件所在的目錄添加到此列表中
在代碼中使用新的類對象時胧华,都必須確保編譯器知道定義該類的頭文件所在的位置寄症。操作方式如下:
1.通過突出顯示類對象名稱并按ctrl + T,在Visual Studio中打開與某個對象關(guān)聯(lián)的頭文件矩动。
2.通過按ctrl + Shift + x有巧,打開一個Windows資源管理器,該資源管理器在Visual Studio中顯示當(dāng)前打開文件的位置悲没。
3.在顯示的文件夾路徑中篮迎,復(fù)制當(dāng)前查找位置上一級的文件夾名稱
4.將該文件名添加為函數(shù)AddPrereqComponent的第一個參數(shù),添加到IdentityCard.h文件:
AddPrereqComponent(“ Mathematics”示姿,Public);
- 注意:到目前為止甜橱,“Public”和“* Protected”之間的區(qū)別尚不清楚。向?qū)ǔ詣犹砑印?/em>Protected”栈戳,建議在添加鏈接目錄時應(yīng)使用“Public”*岂傲。
- 注意:請記住,修改IdentityCard.h文件后子檀,還修改Imakefile文件譬胎。請參閱 CAA:Imakefile