Previous Table of Contents Next


10.4.4 Structure and Navigation of the Interface Repository


   The definitions in the Interface Repository are structured as a set of interface repository objects. These objects are structured the same way definitions are structured—some objects (definitions) “contain? other objects.

   The containment relationships for the interface repository objects types in the Interface Repository are shown in Figure 10-2

Repository or ComponentIR::Repository Each interface repository is represented
by a global root repository object.
ConstantDef The Repository IR object represents the constants,
TypedefDef typedefs, exceptions, interfaces, valuetypes,
ExceptionDef value boxes and modules that are defined outside
[Ext]InterfaceDef the scope of a module.
[Ext]ValueDef

   EventDef - only in ComponentIR::Repository ValueBoxDef ModuleDef

   ComponentDef - only in ComponentIR::Repository HomeDef - only in ComponentIR::Repository

   ConstantDef The Module IR object represents the constants, TypedefDef typedefs, exceptions, interfaces, valuetypes, ExceptionDef value boxes, eventtypes, components, homes and other ValueBoxDef modules defined within the scope of the module.

   ModuleDef [Ext][Abstract | local]InterfaceDef

   An Interface IR object represents constants, ConstantDef typedefs, exceptions, attributes, and operations TypedefDef defined within or inherited by the interface.

   ExceptionDef [Ext]AttributeDef OperationDef Operation IR objects reference

   exception objects.

   [Ext]ValueDef | EventDef - only in ComponentIR::Repository

   A Valuetype IR object represents constants, ConstantDef typedefs, exceptions, attributes, and operations

   TypedefDef

   ExceptionDef defined within or inherited by the interface.

   [Ext]AttributeDef OperationDef Operation IR objects reference ValueMemberDef ExceptionDef exception objects.

   ComponentDef - only in ComponentIR::Repository ProvidesDef A ComponentDef IR object represents the provides, uses, UsesDef emits, publishes, consumes and attributes EmitsDef contained in the component. PublishesDef Emits, publishes and consumes refers to event objects. ConsumesDef Provides and uses refers to interface objects. [Ext]AttributeDef AttributeDef IR objects reference exception objects

   HomeDef - only in ComponentIR::Repository

   A HomeDef IR object represents factory and finder FactoryDef defined within or inherited by home. FinderDef Factory and finder refer to exception objects.

   Figure 10-2 Interface Repository Object ContainmentThere are three ways to locate an interface in the Interface Repository, by:

   There are four ways to locate a component in the Interface Repository, by:

   There are three ways to locate a home in the Interface Repository, by:

   Note – It should be noted that given a ComponentDef IR object, it is not possible to obtain the HomeDef IR object for the home that manages this component, since there could be multiple such homes, and the actual relation of a specific component to a specific home is available only at runtime. To get to the HomeDef object corresponding to the home of a given component, one needs to do a CCMObject::get_home, and then do a CCMHome::get_home_def on the home thus obtained.

   Obtaining an InterfaceDef object directly is useful when an object is encountered whose type was not known at compile time. By using the get_interface operation on the object reference, it is possible to retrieve the Interface Repository information about the object. That information could then be used to perform operations on the object. Similarly, by using the CCMObject::get_component_def operation, it is possible to retrieve the Component Repository information about a component.

   Navigating the module name space is useful when information about a particular named interface is desired. Starting at the root module of the repository, it is possible to obtain entries by name.

   Locating the InterfaceDef object by ID is useful when looking for an entry in one repository that corresponds to another. A repository identifier must be globally unique. By using the same identifier in two repositories, it is possible to obtain the interface identifier for an interface in one repository, and then obtain information about that interface from another repository that may be closer or contain additional information about the interface.

   Analogous operations are provided for manipulating value and event types.

   The ComponentIR module contains the IR Objects that were added to reflect new IDL constructs that were added to support Components. These are built upon the IR interfaces defined in CORBA module including ExtInterfaceDef, ExtValueDef, and ExtAttributeDef and thus are backward compatible extensions of the 2.5 and earlier versions of the IR.