Repository
is a public interface that provides global access to the Interface Repository, which is used to contain the definitions of objects that are available to clients. The Repository
object can contain constants, typedefs, exceptions, interfaces, and modules. It inherits from Container
; therefore, you can use its methods for storing and retrieving definitions (whether globally defined or defined in a module or interface).
module CORBA { interface Repository : Container { Contained lookup_id (in RepositoryId <search_id>); PrimitiveDef get_primitive (in PrimitiveKind <kind>); StringDef create_string (in unsigned long <bound>); SequenceDef create_sequence ( in unsigned long <bound>, in IDLType <element_type>); ArrayDef create_array ( in unsigned long length, in IDLType <element_type>); }; };
This returns a new array object defining an anonymous type. The array object is used in the definition of one other object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained
object.
ArrayDef create_array (in unsigned long <length>, in IDLType <element_type>);
<length>
<element_type>
This returns a sequence object defining an anonymous type. The sequence object must be used in the definition of another object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained
object.
SequenceDef create_sequence (in unsigned long <bound>, in IDLType <element_type>);
<bound>
<element_type>
This returns a string object defining an anonymous type. The string object must be used in the definition of another object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained
object.
StringDef create_string (in unsigned long <bound>);
<bound>
This returns a reference to a PrimitiveDef
of the specified PrimitiveKind
. All PrimitiveDefs
are owned by the repository, one primitive object per primitive type (for example, short
, long
, unsigned short
, unsigned long
, etc.
PrimitiveDef get_primitive (in PrimitiveKind kind);
This operation is inherited from the Container
interface. It returns a sequence of Container::Description
structures. The structure is defined as follows:
struct Description { Contained <contained_object> DefinitionKind <kind>; any <value>; };
where:
<contained_object>
Contained
of the top-level object. The describe( )
function can be called on an object reference of type Contained
to get further information on a top-level object in the repository.<kind>
<value>
any
that can contain one of the following structs
:ModuleDescription
ConstantDescription
TypeDescription
ExceptionDescription
AttributeDescription
ParameterDescription
OperationDescription
InterfaceDescription
sequence<Description> describe_contents ( in InterfaceName restrict_type, in boolean exclude_inherited, in long max_returned_objs);
Container::describe_contents( )
This operation returns an object contained within the repository given its RepositoryId
.
Contained lookup_id (in RepositoryId <search_id>);