- 1、本文档共111页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于COM接口编程基础(I) Lesson overview COM: 组件对象模型Component Object Model 使用COM类Working with COM classes 接口Interfaces 多态Polymorphism 接口查询QueryInterface 测试一个对象的引用Testing an object reference Is it nothing? What type of object is it? Introducing COM COM is a standard for creating classes Classes can be reused between applications Independent of programming language All ArcObjects are COM classes Technologies based on COM Object Linking and Embedding (OLE) OLE DB ActiveX is any technology built on COM DCOM and COM+ COM classes have interfaces 对象拥有一个或多个接口 接口是定义了一组方法和属性的逻辑关系 与对象的通信是通过接口来进行的 Working with ArcObjects COM classes Instantiate COM classes with an interface Dim variable As some interface Interfaces group properties and methods More on interfaces … 一个组合音响的例子 一个对象可以播放收音机、磁带、CD 必须使用适当的接口 如果选择了播放磁带的接口,则不能收听收音机 多态 许多不同的类可以支持相同的接口 拥有相同的所有的方法和属性 可以有不同的执行方式和拥有不同的属性值 ArcObjects 多态 许多ArcGIS的类都表现出多态的特性 General interfaces for all subtypes ILayer: All layer types (raster, tin, feature, etc.) IGxFile: All ArcCatalog file types (shapefile, map, table, etc.) IActiveView: Map (data view) and PageLayout (layout view) Several others … Using methods and properties Dim the variable pointing to an interface Instantiate the object (Set) Call methods, set properties Only use methods and properties for the declared interface Getting other interfaces QueryInterface (QI) Access other methods and properties Testing an object reference Is an object Nothing? COM class code Interface module 定义方法和属性 Class module 实现方法和属性 Client module 实例化类 使用方法和属性 Using library names Many libraries may share interface or class names 可以明白地引用对象库 Create a new point and line from the esriCore library Dim pPoint As esriCore.IPoint Dim pLine As esriCore.ILine Set pPoint = New Point Set pLine = New Line Using the ESRI Object Browser Lists classes, interfaces, properties, and methods C:\ArcGIS\arcexe83\ArcObjects Developer Kit\Utilities Exercise 6 overview Design an interface Create a COM cl
您可能关注的文档
- AMSABV机种LED辉度不良改善重点详解.ppt
- AM扩底桩专项施工方案重点详解.doc
- AM调制解调电路的设计与仿真重点详解.doc
- AN5516-01设备以太网OAM模块详细设计重点详解.doc
- Analgesics镇痛药全英文重点详解.ppt
- ANCA相关小血管炎的研究和治疗进展重点详解.ppt
- ANCA相关小血管炎诊断和治疗进展北京大学第一医赵明辉重点详解.ppt
- ANCA相关小血管炎诊断和治疗进展重点详解.ppt
- andriod使用socket连接数据库重点详解.doc
- Android(ch02)重点详解.doc
- 初中七上习题答案及听力脚本.pptx
- 游戏开发系列课程介绍中精灵动画.pdf
- 文本案例了dy cd16v2z-2gp2z 2gpec5 wistron纬创orta sa 1212.pdf
- 天邦情况及业务体介绍.pdf
- 人教版四级英语上册课件授课u5pa2.pptx
- ver内容发布历史记录realtek fi sdk for android m h.pdf
- 周辩论性今天概述考试详细信息什么week 10 argumentative essayjh10争议.pptx
- 练闯考七级下册语文人教习题课件检测题二单元测试卷.pdf
- 九级上册课内文言文复习词五首.pptx
- 单元世界上高山脉2du7 section period 1U7部分期间.pdf
最近下载
- 长沙市长郡中学2022-2023学年高一下学期期末考试物理试卷(含答案).docx VIP
- 2024年湖南省高中学业水平合格性考试英语试卷真题(含答案详解).docx VIP
- 道依茨 TCD4.1 6.1操作手册.pdf
- 湖南省长沙市长郡中学2022-2023学年高一下学期第一次适应性检测数学试卷含答案.docx VIP
- 中国联通CDMA网络租赁费收益计划募集说明书.pdf
- 人教版四年级上册数学《公顷和平方千米整理和复习》(课件).pptx
- 湖南省长沙市长郡中学2022-2023学年高一下学期第一次月考物理试卷含答案.pdf VIP
- 信贷基础知识培训课件.ppt VIP
- 2025年湖南省长沙市长郡教育集团中考数学模拟试卷(四).pdf VIP
- 2025《建筑施工行业公司事故隐患内部报告奖励管理制度》新修订版.docx
文档评论(0)