NonStop Serverware

InterfaceDef

Previous Topic | Next Topic | Contents | Index
Getting Started | Administration Guide | Programmer's Guide

Subtopics

InterfaceDef Syntax
InterfaceDef::base_interfaces
InterfaceDef::create_attribute( )
InterfaceDef::create_operation( )
InterfaceDef::describe( )
InterfaceDef::describe_interface( )
InterfaceDef::is_a( )

An InterfaceDef object represents an interface definition, and it can contain constants, typedefs, exceptions, operations, and attributes. InterfaceDef inherits from both Container and Contained.

InterfaceDef Syntax

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);
);

See Also

Contained
Container

InterfaceDef::base_interfaces

Syntax

attribute InterfaceDefSeq base_interfaces;

Description

The base_interfaces represents the set of interfaces that the InterfaceDef interface inherits from.

InterfaceDef::create_attribute( )

This operation creates a new AttributeDef within the target InterfaceDef. The defined_in attribute of the new AttributeDef is set to the target InterfaceDef.

Syntax

AttributeDef create_attribute (
	  in RepositoryId id,
	  in Identifier name,
	  in VersionSpec version,
	  in IDLType result,
	  in AttributeMode mode);

Parameters

id
The Repository ID of the new object. An error is returned if an Interface Repository object with the same id already exists in the target object's repository.

name
The name for the new attribute. It is an error to specify a name that already exists in this InterfaceDef.

version
A version for the attribute.

type
The IDL type for this attribute.
mode
Specifies whether the attribute is readonly or read/write.

InterfaceDef::create_operation( )

This operation creates a new OperationDef within the target InterfaceDef. The defined_in attribute is set to the target InterfaceDef.

Syntax

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);

Parameters

id
The Repository ID of the new object. An error is returned if an Interface Repository object with the same id already exists in the target object's repository.

name
The name for the new operation. It is an error to specify a name that already exists in this InterfaceDef.

version
A version for the operation.

result
The return type for this operation.
mode
Specifies whether the operation is normal or oneway.

params
A sequence of ParameterDescription structures that describe the parameters for this operation.

exceptions
A sequence of ExceptionDef objects that describe the exceptions that this operation can raise.
contexts
Specifies a sequence of context identifiers for this operation.

InterfaceDef::describe( )

Container::describe( ) is inherited. It returns a structure of type Contained::Description. The <name> member in the structure contains the string "InterfaceDescription".

Syntax

struct Description {
    DefinitionKind <kind>;
	any <value>
};

Description

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;
    };

InterfaceDef::describe_interface( )

This returns a description of the interface.

Syntax

struct FullInterfacedescription {
    Identifier <name>;
	RepositoryId <id>;
	RepositoryId defined_in;
	VersionSpec version;
	OpDescriptionSeq operations;
    AttrDescriptionSeq attributes;
	RepositoryIdSeq base_interfaces;
	TypeCode type;
};

Description

This function returns a description of the interface including operations, attributes, and base interfaces.

See Also

Contained
Container
CORBA::any

InterfaceDef::is_a( )

This function provides information about the interface, its operations, and its attributes.

Syntax

boolean is_a(in RepositoryId <interface_id>);

Description

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.


Previous Topic | Next Topic | Contents | Top
Getting Started Guide | Administration Guide | Programmer's Guide
Bibliography | Glossary | Index
© Tandem, a division of Compaq. All rights reserved. Legal notices.