An InterfaceDef object represents an interface definition, and it can contain constants, typedefs, exceptions, operations, and attributes. InterfaceDef inherits from both Container and Contained.
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 {
attribute InterfaceDefSeq base_interfaces;
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;
};
FullInterfaceDescription describe_interface( );
AttributeDef create_attribute (
in RepositoryId id,
in Identifier name,
in VersionSpec version,
in IDLType result,
in AttributeMode mode);
OperationDef create_operation (
in RepositoryId id,
in Identifier name,
in VersionSpec version,
in IDLType result,
in OperationMode mode,
in ParDescriptionSeq params,
in ExceptionDefSeq exceptions
in ContextIdSeq contexts);
);
attribute InterfaceDefSeq base_interfaces;
The base_interfaces represents the set of interfaces that the InterfaceDef interface inherits from.
This operation creates a new AttributeDef within the target InterfaceDef. The defined_in attribute of the new AttributeDef is set to the target InterfaceDef.
AttributeDef create_attribute ( in RepositoryId id, in Identifier name, in VersionSpec version, in IDLType result, in AttributeMode mode);
idid already exists in the target object's repository.
namename that already exists in this InterfaceDef.
version
typemode This operation creates a new OperationDef within the target InterfaceDef. The defined_in attribute is set to the target InterfaceDef.
OperationDef create_operation ( in RepositoryId id, in Identifier name, in VersionSpec version, in IDLType result, in OperationMode mode, in ParDescriptionSeq params, in ExceptionDefSeq exceptions in ContextIdSeq contexts);
idid already exists in the target object's repository.
namename that already exists in this InterfaceDef.
version
resultmode
paramsParameterDescription structures that describe the parameters for this operation.
exceptionsExceptionDef objects that describe the exceptions that this operation can raise.
contextsContainer::describe( ) is inherited. It returns a structure of type Contained::Description. The <name> member in the structure contains the string "InterfaceDescription".
struct Description {
DefinitionKind <kind>;
any <value>
};
Container::describe( ) is inherited. It returns a structure of type Contained::Description.
The <value> member is a TypeCode called tc_InterfaceDescription.
The value of the any is a structure of type InterfaceDescription:
struct InterfaceDescription {
Identifier name;
RepositoryId id;
RepositoryId defined_in;
VersionSpec version;
RepositoryIdSeq base_interfaces;
};
This returns a description of the interface.
struct FullInterfacedescription {
Identifier <name>;
RepositoryId <id>;
RepositoryId defined_in;
VersionSpec version;
OpDescriptionSeq operations;
AttrDescriptionSeq attributes;
RepositoryIdSeq base_interfaces;
TypeCode type;
};
This function returns a description of the interface including operations, attributes, and base interfaces.
Contained
Container
CORBA::any
This function provides information about the interface, its operations, and its attributes.
boolean is_a(in RepositoryId <interface_id>);
This function returns TRUE if the interface is either identical to or inherits directly or indirectly from the InterfaceDef object whose RepositoryId is passed in the parameter <interface_id>. Otherwise, it returns FALSE.