1 / 111
文档名称:

AOVBA开发教程(II)COMOMD等.ppt

格式:ppt   页数:111
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

AOVBA开发教程(II)COMOMD等.ppt

上传人:中国课件站 2011/9/6 文件大小:0 KB

下载得到文件列表

AOVBA开发教程(II)COMOMD等.ppt

文档介绍

文档介绍:接口编程基础(I)
Lesson overview
COM: ponent Object Model
类Working classes
接口Interfaces
多态Polymorphism
接口查询QueryInterface
测试一个对象的引用Testing an object reference
Is it nothing?
What type of object is it?
2
COM is a standard for creating classes
Classes can be reused between applications
Independent of programming language
All ArcObjects classes
Technologies based
Object Linking and Embedding (OLE)
OLE DB
ActiveX is any technology built
DCOM +
3
COM classes have interfaces
对象拥有一个或多个接口
接口是定义了一组方法和属性的逻辑关系
与对象的通信是通过接口来进行的
RaceCar
Accelerate
Brake
Fuel
停靠站
圈速度
IRace
IDrive
垃圾车
加速
刹车
燃料
拾起
倾倒
IGarbage
IDrive
4
classes with an interface
Dim <variable> As <some interface>
Interfaces group properties and methods
Dim pGarbage As IDrive
Set pGarbage = New GarbageTruck
= "Full"

Working with classes
GarbageTruck
Accelerate
Brake
Fuel
PickUp
Dump
IGarbage
IDrive
5
More on interfaces …
一个组合音响的例子
一个对象可以播放收音机、磁带、CD
必须使用适当的接口
如果选择了播放磁带的接口,则不能收听收音机
IRadio
ITape
ICD
Dim pBBox As ITape
Set pBBox = New BoomBox
= True
6
IDrive
燃料
加速
刹车
多态
许多不同的类可以支持相同的接口
拥有相同的所有的方法和属性
可以有不同的执行方式和拥有不同的属性值
7
ArcObjects 多态
许多ArcGIS的类都表现出多态的特性
General interfaces for all subtypes
ILayer: All layer types (raster, tin, feature, etc.)
IGxFile: All atalog file types (shapefile, map, table, etc.)
IActiveView: Map (data view) and PageLayout (layout view)
Several others …
8
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
'Create a new RaceCar with IDrive
Dim pCar As IDrive
Set pCar = New RaceCar

= "Full"

RaceCar
Accelerate
Brake
Fuel
PitStop
LapTime
IRace
IDrive
9
Getting other interfaces
QueryInterface (QI)
Access other methods and properties
Q I
RaceCar
Accelerate
Brake
Fuel
PitStop
LapTime
IRace
IDrive
'Create a new

最近更新

2025年昌吉职业技术学院单招职业技能考试模拟.. 40页

2025年曲靖职业技术学院单招职业倾向性测试模.. 41页

2025年杭州医学院单招职业适应性考试模拟测试.. 39页

2025年柳州铁道职业技术学院单招职业适应性测.. 40页

2025年梧州职业学院单招职业倾向性测试题库带.. 40页

2025年武汉海事职业学院单招综合素质考试题库.. 40页

2025年江苏信息职业技术学院单招职业适应性测.. 39页

2025年江苏安全技术职业学院单招职业技能测试.. 41页

2025年江苏省徐州市单招职业适应性测试模拟测.. 40页

2025年江苏食品药品职业技术学院单招职业倾向.. 39页

2025年江西外语外贸职业学院单招职业适应性考.. 41页

2025年江西科技学院单招职业倾向性测试题库最.. 39页

2025年江阳城建职业学院单招综合素质考试题库.. 41页

2025年河北对外经贸职业学院单招职业倾向性考.. 39页

2025年河北省张家口市单招职业倾向性考试模拟.. 40页

2025年河北艺术职业学院单招职业倾向性测试题.. 40页

2026年上饶卫生健康职业学院单招职业技能考试.. 42页

2025年河南省省直辖行政单位单招职业适应性考.. 42页

2026年保定电力职业技术学院单招综合素质考试.. 42页

2025年洛阳科技职业学院单招职业适应性测试模.. 40页

2025年浙江东方职业技术学院单招职业技能考试.. 40页

2025年浙江工业职业技术学院单招职业倾向性测.. 39页

2026年医学临床单招试题必考题 41页

2025年浙江汽车职业技术学院单招职业适应性考.. 39页

2025年浙江省绍兴市单招职业适应性测试模拟测.. 39页

2025年浙江育英职业技术学院单招职业技能测试.. 41页

2025年浙江越秀外国语学院单招职业倾向性测试.. 40页

2026年单招试题开封必考题 41页

2025年海南职业技术学院单招职业技能测试模拟.. 41页

2025年淮南联合大学单招综合素质考试题库带答.. 39页