10.4.20 InterfaceDef
次に示すInterfaceDefオブジェクトは、インタフェース定義を表します。定数、typedef、例外、操作、および属性を包含することができます。
module CORBA {
interface InterfaceDef;
typedef sequence <InterfaceDef> InterfaceDefSeq;
typedef sequence <RepositoryId> RepositoryIdSeq;
typedef sequence <OperationDescription> OpDescriptionSeq;
typedef sequence <AttributeDescription> AttrDescriptionSeq;
interface InterfaceDef : Container, Contained, IDLType {
readonly attribute InterfaceDefSeq base_interfaces;
readonly attribute boolean is_abstract;
boolean is_a (in RepositoryId interface_id);
struct FullInterfaceDescription {
Identifier name;
RepositoryId id;
RepositoryId defined_in;
VersionSpec version;
OpDescriptionSeq operations;
AttrDescriptionSeq attributes;
RepositoryIdSeq base_interfaces;
TypeCode type;
boolean is_abstract;
};
FullInterfaceDescription describe_interface();
};
struct InterfaceDescription {
Identifier name;
RepositoryId id;
RepositoryId defined_in;
VersionSpec version;
RepositoryIdSeq base_interfaces;
boolean is_abstract;
};
};base_interfaces属性は、このインタフェースの継承元であるすべてのインタフェースをリストします。
インタフェースが抽象インタフェース型である場合、is_abstract属性はTRUEです。
is_a操作は、呼出し先のインタフェースが、interface_idパラメータによって識別されたインタフェースと同一であるか、このインタフェースから直接的または間接的に継承したものである場合は、TRUEを返します。それ以外の場合には、FALSEを返します。
describe_interface操作は、インタフェースを記述するFullInterfaceDescriptionを返します。これには、操作や属性も含まれています。FullInterfaceDescription構造体の操作および属性の各フィールドには、記述されているインタフェースの継承グラフの推移閉包におけるすべての操作と属性が含まれます。
継承されるInterfaceDefのdescribe操作は、InterfaceDescriptionを返します。
継承されるcontents操作は、このInterfaceDefで定義される定数、typedef、および例外のリストと、このInterfaceDefで定義または継承される属性および操作のリストを返します。exclude_inheritedパラメータがTRUEに設定されていれば、このインタフェース内で定義された属性と操作のみが返されます。exclude_inheritedパラメータがFALSEに設定されていれば、すべての属性と操作が返されます。
親トピック: インタフェース・リポジトリのインタフェース