ImageVerifierCode 换一换
格式:DOCX , 页数:12 ,大小:21.58KB ,
资源ID:8326778      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-8326778.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Catia的二次开发Word文档格式.docx)为本站会员(b****6)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

Catia的二次开发Word文档格式.docx

1、 extern IID IID_CAAIAfrGeoCreationWkbFactory; class CAAIAfrGeoCreationWkbFactory : public CATIGenericFactory CATDeclareInterface; public : ;A factory interface is a CAA interface, that is, an abstract class that derives from CATIGenericFactory. As any interface, it has an IID declared as IID_ follow

2、ed by the interface name, and includes theCATDeclareInterface macro that declares that this abstract class is an interface. No additional 3method than those of CATIGenericFactory is necessary. Dont forget the public keyword required by the TIE compiler.(?)3.2.3 源文件(The source file )CAAIAfrGeoCreatio

3、nWkbFactory.cppCAAIAfrGeoCreationWkbFactory.h IID IID_CAAIAfrGeoCreationWkbFactory = 0xb32eed10, 0xd4c1, 0x11d3, 0xb7, 0xf5, 0x00, 0x08, 0xc7, 0x4f, 0xe8, 0xdd ; CATImplementInterface(CAAIAfrGeoCreationWkbFactory, CATIGenericFactory);The CATImplementInterface macro is used in conjunction with CATDec

4、lareInterface in the header file to make an interface from this abstract class and to declare that it OM-derives from CATIGenericfactory.3.2.4 TIE 文件(The TIE tsrc file)TIE_CAAIAfrGeoCreationWkbFactory.tsrc#include CAAIAfrGeoCreationWkbFactory.hThe Multi-Workspace Application Builder (mkmk) will gene

5、rate the TIE for this interface for you, that is, the TIE_CAAIAfrGeoCreationWkbFactory.h file in the ProtectedGenerated directory.3.3 建立 Workbench 的 Factory(Creating the Workbench Factory)3.3.1 注意事项The factory class that creates workbench instances must concatenate the name of the class to instantia

6、te, that is, the workbench description class CAAAfrGeoCreationWkb, with the string Factory. This gives CAAAfrGeoCreationWkbFactory.3.3.2 头文件CAAAfrGeoCreationWkbFactory.hCATWorkshopConfigurationFactory.h CATDeclareConfigurationFactory(CAAAfrGeoCreationWkb);The CATDeclareConfigurationFactory macro arg

7、ument is the name of the workbench description class.43.3.3 源文件CAAAfrGeoCreationWkbFactory.cppCAAAfrGeoCreationWkb.h #include TIE_CAAIAfrGeoCreationWkbFactory.h CATImplementConfigurationFactory(CAAAfrGeoCreationWkb, CAAIAfrGeoCreationWkbFactory);The CATImplementConfigurationFactory arguments are the

8、 name of the workbench description class and the name of the workbench factory interface respectively. TheCATDeclareConfigurationFactory and CATImplementConfigurationFactory macros create theworkbench factory implementation class as a data extension of the CATApplicationFrame component3.3.4 更新字典3.3.

9、4.1 The interface dictionary that is a file whose name is the framework name suffixed by dico, such as CAAApplicationFrame.dico, and that you should create or update in the framework CNext/code/dictionary directory. The interface dictionary contains the following declaration to state that the CATApp

10、licationFrame component implements the CAAIAfrGeoCreationWkbFactory interface, by means of the extension class created by the macros, whose code is located in the libCAAAfrGeoCreationWbench shared library or DLL:(不太明白)CATApplicationFrame CAAIAfrGeoCreationWkbFactory libCAAAfrGeoCreationWbench3.3.4.2

11、 The factory dictionary that is a file whose name is the framework name suffixed by fact, such as CAAApplicationFrame.fact, and that you should create or update in the framework CNext/code/dictionary directory. The factory dictionary contains the following declaration to state that the CAAIAfrGeoCre

12、ationWkbFactory interface is an interface to a factory whose implementation creates a CAAAfrGeoCreationWkb class instance:CAAAfrGeoCreationWkb CAAIAfrGeoCreationWkbFactory3.4 定义与实现 Workbench 类(Creating the Workbench Description Class)3.4.1 说明The CAAAfrGeoCreationWkb class implements the CATICAAAfrGe

13、ometryWksConfiguration interface exposed by the CAAGeometry workshop . It includes the following methods: ?CreateCommands to instantiate the command headers for the commands of the workbench CreateWorkbench to create the containers for the workbench, the menus, and the toolbars, andarrange the comma

14、nds in the menus and toolbarsGetCustomInterfaces which returns the names of the interfaces exposed by the workbench toenable its customization5?GetAddinInterface which returns the name of the interface exposed by the workbench to createadd-ins.3.4.2 头文件CAAAfrGeoCreationWkb.hCATBaseUnknown.h #include

15、 CATListPV.h class CATCmdWorkbench; class CAAAfrGeoCreationWkb : public CATBaseUnknown CATDeclareClass; public: CAAAfrGeoCreationWkb(); virtual CAAAfrGeoCreationWkb(); void CATClassId void private: CAAAfrGeoCreationWkb(const CAAAfrGeoCreationWkb &iObjectToCopy); CreateCommands(); GetAddinInterface()

16、; GetCustomInterfaces(CATListPV * oDefaultIIDList , CATListPV * oCustomIIDList) ;CATCmdWorkbench * CreateWorkbench();The CAAAfrGeoCreationWkb class C+-derives from CATBaseUnknown. The CATDeclareClass macro declares that the class CAAAfrGeoCreationWkb belongs to a component. The class has a construct

17、or, a destructor, the four methods of the CATIWorkbench interface, and a copy constructor. Note that the copy constructor is set as private. This prevents the compiler from creating the copy constructor as public without you know. This copy constructor is not implemented in the source file.3.4.3 源文件

18、CAAAfrGeoCreationWkb.cppCATCommandHeader.h / See Creating the Command Headers MacDeclareHeader(CAAAfrGeoCreationWkbHeader);CATCreateWorkshop.h CATImplementClass(CAAAfrGeoCreationWkb, Implementation, CATBaseUnknown, CATNull);TIE_CATICAAAfrGeometryWksConfiguration.h 6TIE_CATICAAAfrGeometryWksConfigura

19、tion(CAAAfrGeoCreationWkb); CAAAfrGeoCreationWkb:CAAAfrGeoCreationWkb() CAAAfrGeoCreationWkb:CAAAfrGeoCreationWkb() void CAAAfrGeoCreationWkb:CreateCommands() . / See Creating the Command Headers CATCmdWorkbench * CAAAfrGeoCreationWkb:CreateWorkbench() . / See Creating the Workbench and Arranging th

20、e Commands CATClassId CAAAfrGeoCreationWkb:GetAddinInterface() return CAAIAfrGeoCreationWkbAddin; void CAAAfrGeoCreationWkb:GetCustomInterfaces(CATListPV * oDefaultIIDList, CATListPV * oCustomIIDList) 3.4.3.1 TIE_CATICAAAfrGeometryWksConfiguration 宏 The CAAAfrGeoCreationWkb class states that it impl

21、ements the CATICAAAfrGeometryWksConfiguration interface 3.4.3.2 TIE_ CATImplementClass 宏 declaring that the CAAAfrGeoCreationWkb class is a component main class 2, thanks to theImplementation keyword, and that it OM-derives from CATBaseUnknown 2. The fourth parameter mustalways be set to CATNull for

22、 component main classes. 3.4.3.3 创建命令标签(Creating the Command Headers) (见命令标签) 3.4.3.3.1 命令标签 Each command available in your workbench must have a command header. A command header is an instance of a command header class, and different commands can share the same command header class to create their

23、command header. 3.4.3.3.2 创建命令标签类 CAAAfrGeoCreationWkbHeader command header class is careated in CAAAfrGeoCreationWkb.cpp: MacDeclareHeader(CAAAfrGeoCreationWkbHeader);7The MacDeclareHeader macro creates the header file and the source file for the CAAAfrGeoCreationWkbHeader class, and associates wit

24、h this class the resource files CAAAfrGeoCreationWkbHeader.CATNls and CAAAfrGeoCreationWkbHeader.CATRsc. 3.4.3.3.3 定义命令标签 Create the code to instantiate your command headers in the empty CreateCommands method. This method should contain one instantiation statement of the command header class per com

25、mand. Each statement has the following form, for example for the Cuboid command.void CAAAfrGeoCreationWkb:CreateCommands() . new CAAAfrGeoCreationWkbHeader(CAAAfrCuboidHdr, CAADegGeoCommandsCAADegCreateCuboidCmd, (void *) NULL); . 其中:1)CAAAfruboidHdr is the identifier you need to assign to the comma

26、nd header. It will be usedafterwards: (1)To associate the command starters you will define to put the command in a menu and in toolbars with the command header. (2)To build the variables that define the command header resources, such as the name seen by the end user in his/her own language in the me

27、nu, or the icon to display in a toolbar.2)CAADegGeoCommands is the name of the shared library or DLL containing the Cuboid commandscode, without the prefix lib, and without the suffix depending on the operating system.3)CAADegCreateCuboidCmd is the name of the Cuboid command class4)the last argument

28、 is the possible pointer to the object to pass to the command when executing it. It is often a character string that indicates the action to carry out when the same command can perform several actions depending on the active document and data, such as update or update all, or cutcopy. 3.4.3.4 Creati

29、ng the Workbench and Arranging the Commands 3.4.3.4.1 创建 workbench using the NewAccess macro:CATCmdWorkbench * CAAAfrGeoCreationWkb:CreateWorkbench() NewAccess(CATCmdWorkbench,pCAAAfrGeoCreationWkb,CAAAfrGeoCreationWkb); . / See Creating the Containers for the Toolbars and the Menu Bar return pCAAAfrGeoCreationWkb; pCAAAfrGeoCreationWkb is the variable used to handle the wo

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2