找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 16571|回复: 1
打印 上一主题 下一主题

CAA CATIA::What Are Components and Interfaces?

[复制链接]
跳转到指定楼层
1
发表于 2005-1-14 15:29:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
What Are Components and Interfaces?
A component is a reusable object provided in a binary form that can be instantiated and used by client applications to stand for a real object, such as a mathematical surface or a solid feature, or a software object, such as dialog box or an end user command, or finally a set of services, such as a model checker or a stress analyzer. A CAA component is modeled using a class or several classes linked together to provide the component type and the component behaviors.
  
An interface represents either the type or the behavior, or a part of the behavior, of the implementing component. To allow for this, the interface is made of a set of operations that the implementing component is supposed to perform. When you get an interface pointer to a given component, you get in fact a handle to the component that enables you to request this component to behave accordingly, that is, to perform some of these operations. You can also ask the component to return another handle, that is, a pointer to another interface it implements, and you can thus skip from one handle to another, depending on what you want the component to do.
  
An interface is also a contract between the interface designer, the component developer, and you, as a client application programmer. This contract includes the interface name and specifications, such as the interface mission, the operations, their signatures and purposes, and the compliance of the component to these specifications. This should not change with the time. Only additions to the specifications are allowed.
  
The main advantage of interfaces is to enable client applications to use components using a standard and lasting protocol, hiding the implementation details and allowing the components to change with no impact on the client applications. In addition, this standard protocol hides the actual component location and makes the client application independent from the way the component is actually created and accessed, in the same process or in another process, on the same machine or on another machine.
  
The handle to the component is a pointer to an interface that the component implements, that is, for which the component provides the code of the methods performing the operations.
  
The interfaces are shown on the following figure as plug-in jacks used by clients to plug to the component as if it were an electronic component, following the UML notation and the way used by Microsoft to graphically represent interfaces in different publications.
  
As an example, imagine you are writing a client application which deals with points in a 2D space. We can assume that the what we expect from a 2D point is summarized in the following figure of a point component you will use by means of the interfaces it implements.
  
This point component has a type interface and three behavioral interfaces:  
  
it is a point thanks to the CATIPoint interface that provides methods to get and set its coordinates  
it behaves as a movable object by means of the CATIMove interface with which you translate or rotate it  
it behaves as a graphic object due to the CATIAttributes interface to manage its color, associated symbol, and pickability  
it behaves as a displayable object through the CATIDraw interface to draw it on the screen.  
Note that the last three interfaces could be shared by other geometric components, such as the 2D line or the 2D circle, and would be of course implemented differently for these components.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
 楼主| 发表于 2005-1-14 15:32:26 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-12-2 13:37 , Processed in 0.215945 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表