10.4.3 Contained Interface

The Contained interface (shown below) is inherited by all Interface Repository interfaces that are contained by other Interface Repository objects. All objects within the Interface Repository, except the root object (Repository) and definitions of anonymous (ArrayDef, StringDef, and SequenceDef), and primitive types are contained by other objects.

module CORBA {
   typedef string VersionSpec;

   interface Contained : IRObject {
       readonly attribute RepositoryId        id;
       readonly attribute Identifier          name;
       readonly attribute VersionSpec         version;
       readonly attribute Container           defined_in;
       readonly attribute ScopedName          absolute_name;
       readonly attribute Repository          containing_repository;
       struct Description {
          DefinitionKind              kind;
          any                         value;
         };
       Description describe ();
       };
};

An object that is contained by another object has an id attribute that identifies it globally, and a name attribute that identifies it uniquely within the enclosing Container object. It also has a version attribute that distinguishes it from other versioned objects with the same name. The Oracle Tuxedo CORBA Interface Repository does not support simultaneous containment or multiple versions of the same named object.

Contained objects also have a defined_in attribute that identifies the Container within which they are defined. Objects can be contained either because they are defined within the containing object (for example, an interface is defined within a module) or because they are inherited by the containing object (for example, an operation may be contained by an interface because the interface inherits the operation from another interface). If an object is contained through inheritance, the defined_in attribute identifies the InterfaceDef or ValueDef from which the object is inherited.

The absolute_name attribute is an absolute ScopedName that identifies a Contained object uniquely within its enclosing Repository. If this object’s defined_in attribute references a Repository, the absolute_name is formed by concatenating the string “::” and this object’s name attribute. Otherwise, the absolute_name is formed by concatenating the absolute_name attribute of the object referenced by this object’s defined_in attribute, the string “::”, and this object’s name attribute.

The containing_repository attribute identifies the Repository that is eventually reached by recursively following the object’s defined_in attribute.

The within operation returns the list of objects that contain the object. If the object is an interface or module, it can be contained only by the object that defines it. Other objects can be contained by the objects that define them and by the objects that inherit them.

The describe operation returns a structure containing information about the interface. The description structure associated with each interface is provided below with the interface’s definition. The kind of definition described by the structure returned is provided with the returned structure. For example, if the describe operation is invoked on an attribute object, the kind field contains dk_Attribute and the value field contains an any, which contains the AttributeDescription structure.