10.4.19 OperationDef
次に示すOperationDefは、インタフェースの操作を定義するのに必要な情報を表します。
module CORBA {
enum OperationMode {OP_NORMAL, OP_ONEWAY};
enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
struct ParameterDescription {
Identifier name;
TypeCode type;
IDLType type_def;
ParameterMode mode;
};
typedef sequence <ParameterDescription> ParDescriptionSeq;
typedef Identifier ContextIdentifier;
typedef sequence <ContextIdentifier> ContextIdSeq;
typedef sequence <ExceptionDef> ExceptionDefSeq;
typedef sequence <ExceptionDescription> ExcDescriptionSeq;
interface OperationDef : Contained {
readonly attribute TypeCode result;
readonly attribute IDLType result_def;
readonly attribute ParDescriptionSeq params;
readonly attribute OperationMode mode;
readonly attribute ContextIdSeq contexts;
readonly attribute ExceptionDefSeq exceptions;
};
struct OperationDescription {
Identifier name;
RepositoryId id;
RepositoryId defined_in;
VersionSpec version;
TypeCode result;
OperationMode mode;
ContextIdSeq contexts;
ParDescriptionSeq parameters;
ExcDescriptionSeq exceptions;
};
};-
result - 操作の戻り値の型を記述するTypeCodeです。
-
result_def - 戻り値の型の定義を識別します。
-
params - 操作のパラメータを記述します。ParameterDescription構造体のシーケンスです。シーケンス中のParameterDescriptionsの順序は重要です。各構造体の
nameメンバーは、パラメータ名を指定します。typeメンバーは、パラメータの型を記述するTypeCodeです。type_defメンバーは、パラメータの型の定義を識別します。modeメンバーは、パラメータがinパラメータ、outパラメータ、またはinoutパラメータのうちどれであるのかを示します。 -
mode - 操作の
modeは、一方向(つまり、出力が返されない)か、または通常です。 -
contexts - 操作に適用されるコンテキスト識別子のリストを指定します。
-
exceptions - 操作によって生じる可能性のある例外の型のリストを指定します。
継承されるOperationDefオブジェクトのdescribe操作は、OperationDescriptionを返します。
継承されるdescribe_contents操作は、この操作について定義されている各パラメータの記述をはじめとする、この操作の完全な記述を提供します。
親トピック: インタフェース・リポジトリのインタフェース