麻烦帮我继续翻译以下文章

来源:百度知道 编辑:UC知道 时间:2024/06/17 11:56:37
18.3 Examples
As with other examples shown in this mapping, the following examples are not meantto mandate a particular implementation. Rather, they show some of the implementations that are possible in order to help clarify the descriptions of the mapping.
18.3.1 Using C++ Inheritance for Interface Implementation
Implementation classes can be derived from a generated base class based on the OMGIDL interface definition. The generated base classes are known as skeleton classes , and the derived classes are known as implementation classes. Each operation of the interface has a corresponding virtual member function declared in the skeleton class The signature of the member function is identical to that of the generated client stubclass. The implementation class provides implementations for these member functions The BOA invokes the methods via calls to the skeleton class’s virtual functions.
The following OMG IDL interface will be used in all the examples in this secti

18.3实例
至于其他的例子显示在此映射,下面的例子并不meantto特定任务的执行。相反,他们表现出一定的实现是可能的,以帮助澄清说明映射。
18.3.1用C + +继承接口实现
实施班级可来自生成基类的基础上OMGIDL接口定义。所产生的基类被称为基干班,和派生类被称为执行课程。每个操作界面有一个相应的虚拟成员函数宣布骨骼类的签字会员功能相同,所产生的客户端stubclass 。执行类提供实现这些职能审计委员会的成员调用方法通过调用骨架类的虚拟功能。
以下03 IDL编译器的接口将被用于所有的例子在本节
/ / IDL编译器
界面阿
(短期第一任择议定书( ) ;
无效的执行部分第2段(长升) ;
) ;
一个IDL编译器生成一个接口A级这个接口的。
这个类包含
在C + +定义的typedefs ,常数,例外,属性和行动在03 IDL编译器接口。它有一个形式类似如下:
/ / C + +语言
A类:公共虚拟的CORBA : :对象
(市民:
虚拟短期第一任择议定书( ) = 0 ;
虚拟无效执行部分第2段(龙升) = 0 ; ...
) ;
有些的ORB实现可能无法使用公共虚拟继承的CORBA : :对象,并可能没有纯粹的虚拟业务,但签字的行动将是一样的。在服务器端,骨干级可以生成。这个类是部分不透明的程序员,但将载有相应的成员函数中的每个操作界面。
/ / C + +语言
一流的_sk_A :市民
(市民:
/ / ...服务器端执行的具体细节
/ /这里...
虚拟短期第一任择议定书( ) = 0 ;
虚拟无效执行部分第2段(龙升) = 0 ; ...
) ;
要实现此接口,程序员必须来自这个骨架级和执行每一个行动中的03类脂蛋白interface.An执行宣言的界面A将采取下列形式:
/ / C + +语言
一流的A_impl :公共_sk_A
(市民:
短期第一任择议定