




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
组建应用接口快速应用开发环境二 结构的建创建工作空间 DeveloperStudioopen "File"andselect"OpenCAAV5Workspace",thefollowingwindowappearsinwhichyoucanselecttoopenyourworkspacewiththe"mkmk"EithermodewillgiveyouaccesstotheCodeGeneratorfeatures.Onceyouhavefilledintheworkspaceinformation,clickon"OK".Alogwindowappearswhileyourenvironmentisupdatedandtheworkspaceopened.WhenthiswindowhasdisappearedDeveloperStudioloadstheprojectfilesitstoredinyourworkspaceandyouarereadytowork.ThecommandsavailableintheCodeGeneratorareasetofwizardswhereinyouspecifyaseriesofparametersanditwillgeneratecodeforyou.Beforecreatingthecode,areportwindowappearssothatyoumayverifythatthecodegeneratedisasyouexpectit.Youmayfindthatsomeofteratedsourcefilescontaincommentedoutstatementssuchas"DONOTEDIT::THECAA2WIZARDSWILLINSERTCODEHERE".Donotmodifywhatyoufindbetweenthesecommentedlinesorthewizardswillnolongerbeabletoinsertcodeinthesourcefile.(CAAV5 DeveloperStudio,open "Project"andselect"NewFramework…"ThewizardwillthencreatethefollowingdirectoryEducationtypeframeworksaresuffixed".edu"andTestframeworksaresuffixed".tst".Thewizardappendsthesesuffixestothenameoftheframework.定义接口空间(InterfaceAninterfaceframeworkisaframeworkthatcontains(mainly)interfacesinbothC++orIDLlanguage.Thestructureofthisinterfaceisveryspecific.V5namingconventionsrequiresthattheseinterfacesbedistinguishablethroughan"Interfaces"suffix.Thereforeifyoutypein"Bird"intheframeworkname,thegeneratedframeworkwillbecalled"BirdInterfaces".Thegeneratedstructureisthefollowing:Afterthefilestructurehasbeencreated,theC++InteractiveDashboardupdatesyourDeveloperStudioprojecttotakeintoaccountthenewfilesanddirectories.IntheJavaInteractiveDashboard,youwillseethenewframeworkintheworkspacetreeview.Notethattheframeworkissetasthecurrentlyactiveproject.定义模块 DeveloperStudio,open "Project"andselect"NewModule…"Whenyouclickon"OK"areportwindowisdisplayedtoshowyouthefilesanddirectoriesthatwillbecreated.Ifyouaccept,thefollowingfilestructurewillbecreated:NotethatthenewlycreatedmoduleissetasthecurrentlyactiveCodeGeneratorwizardsenableyoutocreatespecificV5objectsthatimplementcustomaryV5patterns.Thesecurrentlyinclude:Objectmodelerinterfaces(bothC++andObjectmodeler V5 DeveloperStudio,sourcecodeisgeneratedinthecurrentlyactivemodule.Iftheactiveprojectisnotamodule,thefollowingwarningboxwillaskyoutoselectanactivemodule.In Studio,thisisdonebyactivatingthe onthedesiredproject("SetasWhenyougeneratesourcecodeusingtheCodeGenerator,yourworkspaceisupdatedtotakeintoaccountthefilesnewlycreated.InDeveloperStudioonly,thisoftenresultsinthefollowingThisisanexpectedbehaviouranditissafetoreloadyourCAAV5C++ DeveloperStudio,open "Insert"andselect"CAAV5Class...".Itis mendedtousethiscommandratherthanusingMsDev'sownclasscreatorbecauseittakesintoaccounttheCAAV5FileTree,aswellasthestandardmacrosincludedintheCAAclasses.Thewizardwillcreateaheaderandasourcefilecomprisingastandardconstructoranddestructor,aswellasanequaloperatorandacopyconstructor.Thefollowingfilesarecreated.元件接口类(ObjectModelerInterfacescanbedefinedinC++orinIDL(interfacedefinition DeveloperStudio,open andselect"Interface...".V5namingconventionsrequirethatyourinterfacehavea3letterprefix,followedbytheletter'I'inuppercase,followedbyanythingelse,asinIDLIDLinterfacescanonlybegeneratedinsideanInterfaceframework.TheIDLradiobuttonwillbegreyedoutinanyothertypeofframework.V5namingconventionsrequirethatautomationinterfacehavea3letterprefix,followedbythelettersIAinuppercase,followedbyanythingelse.TheautomationaliaswillbegeneratedbyextractingtheXXXIAprefixfromtheinterfacename.Whenyouclickon"OK"areportwindowisdisplayedtoshowthefilesthatwillbecreated.Ifyouaccept,thefollowingfileswillbecreated(oraffected):元件实现类(ObjectModelerComponentimplementationsarewritteninC++.Theycannotbeincludedininterfaceframeworks...InDeveloperStudio, "Insert"andselect"Component..."EventhoughyoumaycreateanimplementationfromeitheraC++oranIDLinterface,thewizardwillnotfunctiononanpiledIDLIfyoudirectlytypeinthenameoftheinterfaceyouwishtoimplement,thecommandwillpromptyoutospecifytheheaderfilethatcontainsthedefinitionoftheinterface.Youmayalsoaskthewizardtolistalloftheavailableinterfacesinyourworkspace,orinyourprerequisiteworkspaces(thismaytakesometimeasitparsesalltheinterfacesintheworkspace).Whenyouclickon"OK"areportwindowisdisplayedtoshowyouthefilesthatwillbecreated.Ifyouaccept,thefollowingfileswillbeThepreviouscommandalsoallowsyoutoaddnewextensionstoalreadyexistingimplementations.Youdothisbycheckingtheitem"Extends"andbyspecifyingwhichobjectyouareextending.Teratedobjectsforextensionsarethesameasfor利用元件实现类构造工具(ImplementationWhenyoudevelopanewimplementationorextension,youmayderivefromanotherC++classthatalreadyimplementssomeofthefunctionsoftheinterfaceyouareimplementing.Assuch,youhaveachoicebetweenoverloadingthosefunctionalitesornotredefiningthemandusingthemastheyhavebeendefinedinthebaseclass.Bydefault,theimplementationbuilderwillmakeyouwriteallthemethodsoftheinterface.Byusingthewizard,youcanchoosebetweenredefiningthosemethodsornot.(Ofcourse,ifthebaseclassimplementsnomethodfromtheinterface,usingthewizardwillnotbeofanyuse).ThewizardpushbuttonisavailableassoonasyoutypeinaclassdifferentfromCATBaseUnknownorCATIABaseObject.Thewizardwillthenscanthebaseclasstofindifitimplementsanymethodsoftheinterfaceandwilldisplaytheminalist命令类Youmaycreateseveraldifferenttypesofnewcommandsthatyoucanaddinyourworkshops: DeveloperStudio, "Insert"and Whenspecifyingthenameofaworkshop(orworkbench),thewizardwilllocatethecodeforthatworkshopandgenerateacommandheaderforyou.Ifnocommandheaderisfound,anewtypeofheaderwillbegenerated.Eventhoughyouhaveselectedthe"Includeincheck,youwillstillneedtousethe"Customize"functionalityofCATIAtoaccessthecommandfromyourpalette.3.5框类(DialogYoumaycreateinteractivelyanewdialogelementbasedontheDialogframework: DeveloperStudio, "Insert"and"CATIANotethatifyouwanttocreateadialog-basedcommand,youshouldusethe"Command..."itemofthe"CATIAResource" ofthe Whenyouselectthiscommand,ane geisinsertedinyourMsDevenvironmentwithanewandemptydialogRefertoDialogbuilderfeatures"forfull 测试实例(V5Test-Youmaycreateinteractivelyanewtestcasescriptinsideatest-dedicatedframeworkbyusing: DeveloperStudio, "Insert"andWhenyouselectthiscommand,anewtestcasescriptiscreatedinyourframework.Thistestcasecanberunusingthe"ReplayTest-Cases"commandfoundinthe"Build".ThecomponentbuildercurrentlyonlyallowsyoutogenerateonetypeofV5pattern:Workshops(orworkbenches) DeveloperStudio, "Insert"and"CATIAResource/CATIAYou selectthetypeofcomponentyouwishtoThewizardleadsyouthroughaseriesofpanelswhereinyouarepromptedforthecaracteristicsoftheobjectyouwishtocreate.Afterfillingineachpanel,youcanmoveontothenextpanelusingthewizardnavigationbar.Whenallthestepshavebeencompleted,youclickon"Finish"togeneratethecomponent.ThesearethestepstocreateaV5框详见《框的开发方法五、支撑框架设置Asalmostallcomponents(frameworks)arebuiltuponotherscomponents,itisnecessaryToincludeatcompiletimethecorrespondingheaderToreferenceatlinktimethecorrespondinglibraries.Howeverthesourcefilesofagivencomponentmayincludealotofheaderfilesand,withouttheIdentityCardfile,wemustbrowseallthefilestoknowthenamesofincludedheaderfilesandthenfindthenamesofthecorrespondingcomponents.TheIdentityCardfilesynthesizesthoserelationshipsbetweenframeworksinordertogetquicklytheprerequisiteframeworks.Warning:TheIdentityCardfileofanyframeworkmustatleastcontainastatementtosettheSystemframeworkasaprerequisiteframeworkuptoitsprotectedpart,asfollows:ponent("System","Protected");Youmustbeawarethatoneuserhasoftennotallframeworksinhis/herownworkspace,andthatmostoftheprerequisiteframeworkshe/sheneedsarelocatedinothersworkspaces.ThankstotheIdentityCardfile(s),toolslikemkmkgainaneasywaytodetermineandthenaccesstoprerequisiteframeworks.ThefigurebelowgivesasummaryoftheuseofIdentityCardfiles.Anapplicationismadeofcomponents:BuiltornotuponotherUsingtheCAAarchitectureeachcomponentisknownasaframeworkpossiblyhavingprerequisiteframeworksPrerequisiteframeworksofagivenframeworkarespecifiedinitsIdentityCardfile.NotealsoEveryframeworkhasanIdentityCardfilewhichcanbeemptyifitdoesnotneedothercomponenttoimplementitsservices.Thisisnotshowninthefigure.OnlyframeworksthataredirectlyusedarespecifiedinanIdentityCardfile.Rememberthenotionsofpublicandprivatepartsofacomponent:youdon'tknowhowaframeworkisimplemented,soyoushouldn'tknowitsownprerequisites.EveryframeworkmusthaveanIdentityCardfile,ThisfileisstoredindirectoryIdentityCard,rightundertheframeworkrootdirect
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 车辆风险押金合同协议
- 还贷免责协议书模板
- 建筑设计与施工合同及协议
- 历史文化保护与传承的试题研究
- 《当代生产管理策略》课件
- 猪肉购销合同
- 民政合作协议书
- 语培课程合同协议书模板
- 返建房房屋合同补充协议
- 车场使用协议书范本
- 建设工程前期工作咨询费收费计算表
- 中国糖尿病肾脏病防治指南(2021年版)
- 八年级物理下册《实验题》专项练习题及答案(人教版)
- 中学生诗词知识大赛备考题库(500题)
- 《动画素描》第一章 动画素描概述
- 无轨胶轮车运行标准作业流程
- 2023年山东大学考博英语完型填空和阅读试题
- 俄罗斯地缘政治学
- GB/T 12513-2006镶玻璃构件耐火试验方法
- 2023年云南省昆明市中考英语模试卷(含答案解析)
- 公路工程施工现场安全检查手册
评论
0/150
提交评论