OperationDef
describes an IDL operation. It inherits from Contained
. Note that the parameters and exceptions of the operation are not directly available as attributes but they are available through the inherited operation Contained::describe()
.One use of
OperationDef
is to construct an NVList
for a specific operation. See CORBA::ORB::create_operation_list()
for details.
// IDL enum OperationMode { NORMAL, ONEWAY }; interface OperationDef : Contained { typedef Identifier ContextIdentifier; typedef sequence <ContextIdentifier> ContextIdSeq; attribute TypeCode result; attribute OperationDef::OperationMode mode; attribute IdentifierSeq contexts; };
Contained
attribute ContextIdentifierSeq contexts;
describe()
is inherited from Contained
. It returns a structure of type Contained::Description
:
// IDL struct Description { Identifier name; any value };The
name
member of this structure contains the string "OperationDescription".The
TypeCode
of the value
member is:
_tc_OperationDescriptionThe
value
of the any
is a structure of type:
// IDL struct OperationDescription { Identifier name; RepositoryId id; RepositoryId defined_in; TypeCode result; OperationDef::OperationMode mode; sequence<OperationDef::ContextIdentifier> contexts; sequence<ParameterDescription> parameters; sequence<ExceptionDesciption> exceptions; };
Contained::describe()
attribute OperationMode mode;
NORMAL
) or oneway (ONEWAY
).
attribute TypeCode result;
TypeCode
of the operation's return value.