下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
组建应用接口快速应用开发环境二 结构的建创建工作空间 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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 光伏电站安全管理课件教学
- 昆明三基考试题库及答案
- 光伏培训课件
- 光伏作业安全培训
- 富士康考试试题及答案
- 2024部编版八年级历史上册备课讲义-第2课 第二次鸦片战争
- 10月企业培训师试题库(含参考答案)
- 202新译林版七年级英语上册单词表默写表(含音标)
- 小学五年级语文上册记叙文学习线索贯穿方法示例课件
- 深度解析(2026)《GBT 34015.3-2021车用动力电池回收利用 梯次利用 第3部分:梯次利用要求》
- 人教版二年级数学下册 5 混合运算 第2课时 没有括号的两级混合运算(教学课件)
- 马工程《经济法学》教学
- 2023-2024学年四川省宜宾市高一上册期末1月月考地理模拟试题(附答案)
- 福建省泉州市2022-2023学年高一上学期期末教学质量监测化学试题(含答案)
- 一级建造师机电工程管理与实务
- 英语book report简单范文(通用4篇)
- 船舶建造 监理
- 化学品安全技术说明书MSDS(洗车水)知识讲解
- 红楼梦英文版(杨宪益译)
- GB/T 38658-20203.6 kV~40.5 kV交流金属封闭开关设备和控制设备型式试验有效性的延伸导则
- 美英报刊阅读教程课件
评论
0/150
提交评论