A Contained
interface defines objects in the Interface Repository that can be contained within other objects. It is the base interface for the following interfaces:
ModuleDef
InterfaceDef
ConstantDef
TypeDef
ExceptionDef
AttributeDef
OperationDef
StructDef
EnumDef
UnionDef
AliasDef
module CORBA { typedef string VersionSpec; interface Contained : IRObject { attribute RepositoryId <id>; attribute Identifier <name>; 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 ( ); void move ( in Container <new_container>, in Identifier <new_name>, in VersionSpec <new_version>); }; };
This gives the absolute scoped name of an object.
readonly attribute ScopedName absolute_name;
This states the respository within which the object is contained.
readonly attribute Repository containing_repository;
This is the unique identifier of the Interface Repository object in which the object is defined.
attribute Container defined_in;
The describe( )
operation returns a structure of type Contained::Description
.
Description describe( );
An example of the structure returned follows:
struct Description { DefinitionKind kind any value; }
This form of description is a wrapper for another structure in the value
field. Depending on the type of the contained object, the value
field contains the name of the corresponding description:
ConstantDescription
ExceptionDescription
AttributeDescription
OperationDescription
ModuleDescription
InterfaceDescription
TypeDescription
TypeDescription
is used for objects of type StructDef
, UnionDef
, EnumDef
, and AliasDef
. The kind
field contains the same value as the def_kind
attribute that Contained
inherits from IRObject
.
An identifier that uniquely identifies a module, interface, constant, typedef, exception, attribute, or operation in the Repository.
attribute RepositoryId id;
Use this to remove this object from its container and add it to the container specified by new_container
. The new container must be in the same repository and be capable of containing that they of object. The new container cannot contain an object of the same name (unless multiple versions are supported.
void move(in Container new_container, in Identifier new_name, in VersionSpec new_version);
The name attribute of the object being moved is changed to that specified in the new_name
parameter. The version
attribute is changed to the one specified in the new_version
parameter.
Every object in the Interface Repository is identified by a name unique within the scope.
attribute Identifier name;
This returns the version number of this object.
attribute VersionSpec version;