Previous Table of Contents Next


10.5.34 NativeDef


   A NativeDef object represents a native definition.

   module CORBA { interface NativeDef : TypedefDef {}; };

   The inherited type attribute is a tk_native TypeCode describing the native type.

   10.6 Component Interface Repository Interfaces

   The IRObjects that represent IDL concepts that are specific to the Components extension are described in this section. These IRObjects can be contained only in a ComponentIR::Repository described in this section.

   10.6.1 ComponentIR::Container

   The base interface ComponentIR::Container is used to form a containment hierarchy in the Component Interface Repository.

   module CORBA { module ComponentIR {

   interface Container {

   ComponentDef create_component ( in RepositoryId id, in Identifier name, in VersionSpec version, in ComponentDef base_component, in InterfaceDefSeq supports_interfaces

   );

   HomeDef create_home ( in RepositoryId id, in Identifier name, in VersionSpec version, in HomeDef base_home, in ComponentDef managed_component, in InterfaceDefSeq supports_interfaces, in ValueDef primary_key

   );

   EventDef create_event ( in RepositoryId id, in Identifier name, in VersionSpec version, in boolean is_custom, in boolean is_abstract, in ValueDef base_value, in boolean is_truncatable, in ValueDefSeq abstract_base_values, in InterfaceDefSeq supported_interfaces, in ExtInitializerSeq initializers

   );};};};

   10.6.1.1 Write Interface

   The three create_<type> operations defined in the ComponentIR::Container interface create new empty IR objects defining component, home, and event types. The defined_in attribute of a definition created with any of these operations is initialized to identify the ComponentIR::Container on which the operation is invoked, and the containing_repository attribute is initialized to its ComponentIR::Repository.

   These create_<type> operations all take id and name parameters that are used to initialize the identity of the created definition.

   The create_component operation returns a new empty ComponentDef with the specified base_component, and the specified supports_interfaces. AttributeDefs can be added using ComponentDef::create_attribute. ComponentDef::create_provides, ComponentDef::create_uses, ComponentDef::create_emits, ComponentDef::create_publishes, and ComponentDef::create_consumes can be used to add ProvidesDefs, UsesDefs, EmitsDefs, PublishesDefs and ConsumesDefs respectively. Definitions can also be added using the Contained::move operation.

   The create_home operation returns a new HomeDef with the specified base_home, managed_component, supported_interfaces, and primary_key. Type, exception, and constant definitions can be added using Container::create_<type> operations on the new HomeDefs. OperationDefs can be added using HomeDef::create_operation and AttributeDefs can be added using HomeDef::create_attribute. FinderDefs and FactoryDefs can be added using HomeDef::create_finder and HomeDef::create_factory respectively. Definitions can also be added using the Contained::move operation.

   The create_event operation returns a new empty EventDef with the specified base interfaces and events (base_value, supported_interfaces, and abstract_base_values) as well as the other information describing the new events characteristics (is_custom, is_abstract, is_truncatable, and initializers). The initializers argument is of type ExtInitializerSeq allowing one to specify user exceptions for initializers. Type, exception, and constant definitions can be added using Container::create_<type> operations on the new EventDef. OperationDefs can be added using ExtValueDef::create_operation and ExtAttributeDefs can be added using ExtValueDef::create_ext_attribute. Definitions can also be added using the Contained::move operation.

   10.6.2 ComponentIR::Repository

   ComponentIR::Repository is an interface that provides global access to the Interface Repository that supports access to information related to CORBA Components. The ComponentIR::Repository object can contain components, home, and event definitions in addition to everything else that a Repository type can contain. As it inherits from Container and ComponentIR::Container, it can be used to look up any definition (whether globally defined or defined within a module or interface) either by name or by id.

   Since ComponentIR::Repository derives from CORBA::Repository and hence from Container and not from Contained, it does not have a RepositoryId associated with it. By default it is deemed to have the RepositoryId "" (the empty string) for purposes of assigning a value to the defined_in field of the description structure of ModuleDef, InterfaceDef, ValueDef, ValueBoxDef, ComponentDef, HomeDef, EventDef, TypedefDef, ExceptionDef, and ConstantDef that are contained immediately in the ComponentIR::Repository object. Since ComponentIR::Repository derives from ComponentIR::Container, it can contain ComponentDefs, HomeDefs as well as EventDefs.

   module CORBA {module ComponentIR {

   interface Repository : CORBA::Repository, Container {}; }; };

   10.6.2.1 Read Interface

   ComponentIR::Repository has the same read operations as Repository.

   10.6.2.2 Write Interface

   Write operations inherited from ComponentIR::Container behave the same way as in ComponentIR::Container.

   The rest of the write operations are inherited from CORBA::Repository and behave the same way as in CORBA::Repository.

   10.6.3 ComponentIR::ProvidesDef

   A ComponentIR::ProvidesDef object represents an interface that is provided by a component.

   module CORBA {module ComponentIR {

   interface ProvidesDef : Contained { attribute InterfaceDef interface_type; };

   struct ProvidesDescription { Identifier name; RepositoryId id; RepositoryId defined_in; VersionSpec version; RepositoryId interface_type;

   };};};

   10.6.3.1 Read Interface

   The attribute interface_type returns the object identifying the interface that is provided by the component.

   The inherited operation describe returns a ProvidesDescription.

   10.6.3.2 Write Interface

   Setting the attribute interface_type changes the object identifying the interface that is provided by the component.

   The rest of the write operations are inherited from CORBA::Contained and behave the same way as in CORBA::Contained.

   10.6.4 ComponentIR::UsesDef

   A ComponentIR::UsesDef object represents an interface that is used by a component.

   module CORBA {module ComponentIR {

   interface UsesDef : Contained { attribute InterfaceDef interface_type; attribute boolean is_multiple;

   };

   struct UsesDescription { Identifier name; RepositoryId id; RepositoryId defined_in; VersionSpec version; RepositoryId interface_type; boolean is_multiple;

   };

   };};

   10.6.4.1 Read Interface

   The attribute interface_type returns the object identifying the interface that is used by the component.

   The attribute is_multiple is TRUE if the interface is used multiple times.

   The inherited operation describe returns a UsesDescription.

   10.6.4.2 Write Interface

   Setting the attribute interface_type changes the object identifying the interface that is used by the component. Setting the attribute is_multiple changes the multiplicity of the used interface.

   The rest of the write operations are inherited from CORBA::Contained and behave the same way as in CORBA::Contained.

   10.6.5 ComponentIR::EventDef

   A ComponentIR::EventDef object represents an eventtype definition. It can contain constants, typedefs, exceptions, operations, and attributes with exceptions. Eventtype definitions that contain initializers with user exceptions can also be represented in ComponentIR::EventDef objects.

   module CORBA {module ComponentIR {

   interface EventDef : ExtValueDef {}; };

   The read and write interfaces for ComponentIR::EventDef have the same semantics as the read and write interfaces for ExtValueDef.

   10.6.6 ComponentIR::EventPortDef

   A ComponentIR::EventPortDef object represents an event port definition. It refers to an EventDef object which contains the actual information about the event. This interface is never instantiated as itself. It is instantiated only as one of its derived types (i.e., EmitsDef, PublishesDef, or ConsumesDef).

   module CORBA { module ComponentIR {

   interface EventPortDef : Contained {

   // read/write interface

   attribute EventDef event;

   // read interface

   boolean is_a (in RepositoryId event_id); };

   struct EventPortDescription {

Identifier name;
RepositoryId id;
RepositoryId defined_in;
VersionSpec version;
RepositoryId event;
};
};
};
10.6.6.1 Read Interface

   The event attribute returns the object containing the definition of the event for this event port.

   The is_a operation returns TRUE if the event value associated with this EventPortDef is identical to or inherits from the event value associated with the EventPortDef identified by the event_id.

   The inherited describe operation returns an EventPortDescription.

   10.6.6.2 Write Interface

   Setting the attribute event changes the object containing the definition of the event for this event port.

   The rest of the write operations are inherited from CORBA::Contained and behave the same way as in CORBA::Contained.

   10.6.7 ComponentIR::EmitsDef

   A ComponentIR::EmitsDef object represents the port definition of an event that is emitted by a component.

   module CORBA {module ComponentIR {

   interface EmitsDef : EventPortDef {}; }; };

   10.6.7.1 Read Interface

   The read interface for EmitsDef has the same semantics as the read interface for EventPortDef.

   10.6.7.2 Write Interface

   The write interface for EmitsDef has the same semantics as the write interface for EventPortDef.

   10.6.8 ComponentIR::PublishesDef

   A ComponentIR::PublishesDef object represents the port definition of an event that is published by a component.

   module CORBA {module ComponentIR {

   interface PublishesDef : EventPortDef {}; }; };

   10.6.8.1 Read Interface

   The read interface for PublishesDef has the same semantics as the read interface for EventPortDef.

   10.6.8.2 Write Interface

   The write interface for PublishesDef has the same semantics as the write interface for EventPortDef.

   10.6.9 ComponentIR::ConsumesDef

   A ComponentIR::ConsumesDef object represents the port definition of an event that is consumed by a component.

   module CORBA {module ComponentIR {

   interface ConsumesDef : EventPortDef {}; }; };

   10.6.9.1 Read Interface

   The read interface for ConsumesDef has the same semantics as the read interface for EventPortDef.

   10.6.9.2 Write Interface

   The write interface for ConsumesDef has the same semantics as the write interface for EventPortDef.

   10.6.10 ComponentIR::ComponentDef

   A ComponentIR::ComponentDef object represents the definition of a component. It contains provides, uses, emits, publishes, consumes, and attributes.

   module CORBA {module ComponentIR {

   interface ComponentDef : ExtInterfaceDef { // read/write interface attribute ComponentDef base_component; attribute InterfaceDefSeq supported_interfaces;

   // write interface

   ProvidesDef create_provides ( in RepositoryId id, in Identifier name, in VersionSpec version, in InterfaceDef interface_type

   );

   UsesDef create_uses ( in RepositoryId id, in Identifier name, in VersionSpec version, in InterfaceDef interface_type, in boolean is_multiple );

   EmitsDef create_emits (in RepositoryId id,in Identifier name,in VersionSpec version,in EventDef event

   );

   PublishesDef create_publishes (in RepositoryId id,in Identifier name,in VersionSpec version,in EventDef event

   );

   ConsumesDef create_consumes (in RepositoryId id,in Identifier name,in VersionSpec version,in EventDef event

   ); };

   typedef sequence<ProvidesDescription>

   ProvidesDescriptionSeq; typedef sequence<UsesDescription> UsesDescriptionSeq; typedef sequence<EventPortDescription>

   EventPortDescriptionSeq;

   struct ComponentDescription { Identifier name; RepositoryId id; RepositoryId defined_in; VersionSpec version; RepositoryId base_component; RepositoryIdSeq supported_interfaces; ProvidesDescriptionSeq provided_interfaces; UsesDescriptionSeq used_interfaces; EventPortDescriptionSeq emits_events; EventPortDescriptionSeq publishes_events; EventPortDescriptionSeq consumes_events; ExtAttrDescriptionSeq attributes; TypeCode type;

   };

   };};

   10.6.10.1 Read Interface

   The base_component attribute returns the component that this component derives from.

   The supported_interfaces attribute lists the interfaces which this component type supports.

   The inherited is_a operation returns TRUE if the component on which it is invoked either is identical to or inherits from the component identified by its id parameter. Otherwise it returns FALSE.

   The inherited describe operation for a ComponentDef returns a ComponentDescription.

   The inherited contents operation returns the list of attributes, provides, uses, emits, publishes, and consumes either defined or inherited in this ComponentDef. If the exclude_inherited parameter is set to TRUE, only attributes, provides, uses, emits, publishes, and consumes defined within this object are returned. If the exclude_inherited parameter is set to FALSE, all attributes, provides, uses, emits, publishes, and consumes are returned.

   10.6.10.2 Write Interface

   Setting the base_component attribute causes a BAD_PARAM exception with minor code 5 to be raised if the name attribute of any object contained by this ComponentDef conflicts with the name attribute of any object contained by the specified base ComponentDef.

   Setting the supported_interfaces attribute changes the interfaces which this component type supports.

   The create_<type> operations defined in the ComponentIR::ComponentDef interface create new corresponding empty IR objects. The defined_in attribute is initialized to identify the containing ComponentDef, and the containing_repository attribute is initialized to its ComponentIR::Repository.

   These create_<type> operations all take id and name parameters that are used to initialize the identity of the created definition. A BAD_PARAM exception is raised with minor code 2 if an object with the specified id already exists in the ComponentIR::Repository. A BAD_PARAM exception with minor code 3 is raised if the specified name already exists within this ComponentDef and multiple versions are not supported.

   The inherited create_ext_attribute operation returns a new ExtAttributeDef contained in the ComponentDef on which it is invoked. The id, name, version, type_def, mode, get_exceptions and set_exceptions attributes are set as specified. The type attribute is also set.

   The inherited create_operation, and all other create_* operations inherited from Container and Contained return BAD_PARAM exception with minor code 4.

   The create_provides operation returns a new ProvidesDef contained in the ComponentDef on which it is invoked. The id, name, version and interface_type attributes are set as specified.

   The create_uses operation returns a new UsesDef contained in the ComponentDef on which it is invoked. The id, name, version, interface_type and is_multiple attributes are set as specified.

   The create_emits, create_publishes and create_consumes operations respectively return new EmitsDef, PublishesDef and ConsumesDef contained in the ComponentDef on which it is invoked. The id, name, version, and event attributes are set as specified.

   A ComponentDef used as a Container may not contain any TypedefDef (including definitions derived from TypedefDef), ConstantDef, or ExceptionDef definitions.

   A ComponentDef used as an InterfaceDef may only contain ExtAttributeDef definitions.

   10.6.11 ComponentIR::FactoryDef

   A ComponentIR::FactoryDef object represents the definition of a factory operation in a home.

   module CORBA {module ComponentIR {

   interface FactoryDef : OperationDef { // only PARAM_IN parameters }; }; };

   10.6.11.1 Read Interface

   The result attribute is a TypeCode describing the type of the value returned by the operation, which is always tk_component for FactoryDef. The result_def attribute identifies the definition of the returned type, which is always a ComponentDef in case of FactoryDef.

   The params attribute describes the parameters of the operation. It is a sequence of ParameterDescription structures. The order of the ParameterDescriptions in the sequence is significant. The name member of each structure provides the parameter name. The type member is a TypeCode describing the type of the parameter. The type_def member identifies the definition of the type of the parameter. The mode member indicates whether the parameter is an in, out, or inout parameter. For FactoryDef the value of mode for all parameters is PARAM_IN.

   The operation’s mode is always normal for FactoryDef.

   The kind attribute is always OP_IDL for FactoryDef.

   The contexts attribute specifies the list of context identifiers that apply to the operation, and is an empty list for FactoryDef.

   The exceptions attribute specifies the list of exception types that can be raised by the operation.

   The inherited describe operation for a FactoryDef object returns an OperationDescription.

   10.6.11.2 Write Interface

   Setting the result_def attribute has no effect.

   The mode and contexts attributes cannot be changed.

   10.6.12 ComponentIR::FinderDef

   A ComponentIR::FinderDef object represents the definition of a finder operation in a home.

   module CORBA {module ComponentIR {

   interface FinderDef : OperationDef { // only PARAM_IN parameters }; }; };

   10.6.12.1 Read Interface

   The result attribute is a TypeCode describing the type of the value returned by the operation, which is always tk_component for FinderDef. The result_def attribute identifies the definition of the returned type, which is always a ComponentDef in case of a FinderDef.

   The params attribute describes the parameters of the operation. It is a sequence of ParameterDescription structures. The order of the ParameterDescriptions in the sequence is significant. The name member of each structure provides the parameter name. The type member is a TypeCode describing the type of the parameter. The type_def member identifies the definition of the type of the parameter. The mode member indicates whether the parameter is an in, out, or inout parameter. For FinderDef the value of mode for all parameters is PARAM_IN.

   The operation’s mode is always normal for FinderDef.

   The kind attribute is always OP_IDL for FinderDef.

   The contexts attribute specifies the list of context identifiers that apply to the operation, and is an empty list for FinderDef.

   The exceptions attribute specifies the list of exception types that can be raised by the operation.

   The inherited describe operation for an FinderDef object returns an OperationDescription.

   10.6.12.2 Write Interface

   Setting the result_def attribute has no effect.

   The mode and contexts attributes cannot be changed.

   10.6.13 ComponentIR::HomeDef

   A ComponentIR::HomeDef object represents the definition of a home. It contains attributes, operations, factories, and finders.

   module CORBA {module ComponentIR {

   interface HomeDef : ExtInterfaceDef {

   // read/write interfaceattribute HomeDef base_home;attribute InterfaceDefSeq supported_interfaces;attribute ComponentDef managed_component;attribute ValueDef primary_key;

   // write interface

   FactoryDef create_factory ( in RepositoryId id, in Identifier name, in VersionSpec version, in ParDescriptionSeq params, in ExceptionDefSeq exceptions

   );

   FinderDef create_finder ( in RepositoryId id, in Identifier name, in VersionSpec version, in ParDescriptionSeq params, in ExceptionDefSeq exceptions

   );};

   struct HomeDescription { Identifier name; RepositoryId id; RepositoryId defined_in;

   VersionSpec version;RepositoryId base_home;RepositoryId managed_component;ValueDescription primary_key;OpDescriptionSeq factories;OpDescriptionSeq finders;OpDescriptionSeq operations;ExtAttrDescriptionSeq attributes;TypeCode type;

   };};};

   10.6.13.1 Read Interface

   The base_home attribute returns the home that this home definition derives from.

   The supported_interfaces attribute lists the interfaces which this home type supports.

   The managed_component attribute returns the component that this home manages.

   The primary_key attribute returns the primary key that is associated with this home.

   The inherited is_a operation returns TRUE if the home on which it is invoked either is identical to or inherits from the home identified by its id parameter. Otherwise it returns FALSE.

   The inherited describe operation for a HomeDef returns a HomeDescription.

   The inherited contents operation returns the list of constants, typedefs, exceptions, attributes, operations, finders and factories defined or inherited in this HomeDef. If the exclude_inherited parameter is set to TRUE, only objects defined within this home are returned. If the exclude_inherited parameter is set to FALSE, all objects are returned.

   10.6.13.2 Write Interface

   Setting the base_home attribute causes a BAD_PARAM exception with minor code 5 to be raised if the name attribute of any object contained by this HomeDef conflicts with the name attribute of any object contained by the specified base HomeDef.

   The create_<type> operations defined in the HomeDef interface create new corresponding empty IR objects. The defined_in attribute is initialized to identify the containing HomeDef, and the containing_repository attribute is initialized to its ComponentIR::Repository.

   These create_<type> operations all take id and name parameters that are used to initialize the identity of the created definition. A BAD_PARAM exception is raised with minor code 2 if an object with the specified id already exists in the