版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
组建应用接口快速应用开发环境二 结构的建创建工作空间 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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 第二章 集中趋势的统计描述 课件
- 县食品安全快速检测工作实施方案
- 施工技术服务合同协议书
- Metobromuron-Standard-生命科学试剂-MCE
- 物资采购及验收管理制度
- 浙教版2021-2022学年度七年级数学上册模拟测试卷 (728)【含简略答案】
- 浙教版2021-2022学年度七年级数学上册模拟测试卷 (696)【含简略答案】
- 教师招考课程设计
- 路基支挡工程课程设计
- 教室教育类课程设计
- 四川分布式光伏项目投资计划书_参考范文
- 事态升级管理流程-vda6.3
- 多维阅读第14级 Orphan Elephants 小象孤儿
- 经修订的国际救生设备规则(LSA)
- 居民死亡医学证明(推断)书
- 位移观测记录表
- 工艺纪律检查管理办法及考核细则
- 成都关于成立芯片公司组建方案(模板参考)
- 常德市自来水公司供水稽查管理制度
- 采购项目验收管理办法(共10页)
- 新余市职业教育现代学徒制试点工作方案
评论
0/150
提交评论