Catia CAA二次开发命名规则---
1.主要规则
CAT 代表 CATIA 作为前缀(prefix)
Frame名字用三个缩写字母表示即表示成别名(alias)例如Dlg代表Dialog
全部用英文
2.目录实体的命名
Code Framework <prefix><FWName>
Test Framework <prefix><FWName>.tst
CAA Frameworks CAA<FrameworkName>.edu
CAA<FrameworkName>Doc.edu
CAA<FrameworkName>.tst
Code Module <prefix><FWAlias><ModuleName>.m
Code Module in test FW <prefix><FWAlias><Tst><ModuleName>.m
Code Module in education FW CAA<FWAlias><Edu><ModuleName>.m
Code main module <prefix><FWName>.m
Doc Module in education FW CAA<FWAlias>TechArticles.doc
CAA<FWAlias>UseCases.doc
CAA<FWAlias>QuickRefs.doc
CAA<FWAlias>Base.doc
3.文件实体命名
Simple Classes Class: <prefix><FWAlias><ClassName>
File: <prefix><FWAlias><ClassName>.h
File: <prefix><FWAlias><ClassName>.cpp
Extension Classes Class: <prefix>E<FWAlias><ClassName>
File: <prefix>E<FWAlias><ClassName>.h
File: <prefix>E<FWAlias><ClassName>.cpp
Interfaces Interface:<prefix>I<FWAlias><InterfaceName>
File: <prefix>I<FWAlias><InterfaceName>.h
File:<prefix>I<FWAlias><InterfaceName>.cpp
Automation Interfaces Interface: <prefix>IA<FWAlias><InterfaceName>
File: <prefix>IA<FWAlias><InterfaceName>.idl
File: <prefix>IA<FWAlias><InterfaceName>.h
File: <prefix>IA<FWAlias><InterfaceName>.cpp
Interface Dictionaries File: <prefix><FWName>.dico for CAA customers
File: <prefix><FWName>.dic for DS
Factory Dictionaries File: <prefix><FWName>.fact
Global Functions and Variables Function/variable: <prefix><FWAlias><FunctionName>
File: <prefix><FWAlias><FunctionName>.h
File: <prefix><FWAlias><FunctionName>.cpp
Enumerated Types Type: <prefix><FWAlias><EnumName>
Value: <prefix><FWAlias><EnumItemName>
File: <prefix><FWAlias><EnumName>.h
Macros Macro: <prefix><FWAlias><MacroName>
File: <prefix><FWAlias><MacroName>.h
Typedef Same as substituted name
NLS resources File: <prefix><FWAlias>Name.CATNls
Resource catalogs File: <prefix><FWAlias>Name.CATRsc
Feature catalogs File:
<prefix><FWAlias><CatalogName>.CATFct
for CAA customers
File: <prefix><FWAlias><CatalogName>.feat for DS
4.用户界面实体
Command Header <prefix><FWAlias><Name>Hdr
Workshop <prefix><FWAlias><Name>Wks
Workbench <prefix><FWAlias><Name>Wkb
Toolbar <prefix><FWAlias><Name>Tlb
Command Starter <prefix><FWAlias><Name>Str
Separator <prefix><FWAlias><Name>Sep
Icon Box <prefix><FWAlias><Name>Icb
MenuBar <prefix><FWAlias><Name>Mbr
Menu <prefix><FWAlias><Name>Mnu
SubMenu <prefix><FWAlias><Name>Snu
5.其他实体
Features and Late Types <prefix><FWAlias><FeatureName>
<prefix><FWAlias><LateTypeName>
Applicative Containers <prefix><FWAlias>AppCont<ContainerName>
Data Members _<DataName>
Method or Function Arguments The i prefix for input parameters
The o prefix for output parameters
The io prefix for input/output parameters
6.名字的变化
变量名字要以小写开头 int counter
函数名字要以大写开头 void CountItems()
数据成员要以下划线开头 并且不能是public int _length
7.指针
Prefix
Means
Example
p
pointer
CATBaseUnknown *pTarget;
pp
pointer to pointer
void **ppTarget;
pi
pointer to interface
CATISpecObject *piTargetFeature;
sp
smart pointer || handler
CATISpecObject_var spTargetFeature;
a
array
char *aPath;
CATISpecObject **ioppTargetFeature输入输出和指针放在一起
8.接口指针的命名
格式:pi<InterfaceName>On<RootName>
指针名字通过去掉类名的前缀得到 例如:piInitOnDoc 中的lnit是从类CATIInit 来的
跟名字是用的三个字母的缩写 如上用Doc代替document
页:
[1]