10.4.4 Container Interface
The base interface Container is used to form a containment hierarchy in the Interface Repository. A Container can contain any number of objects derived from the Contained interface. All Containers, except for Repository, are also derived from Contained.
module CORBA {
typedef sequence <Contained> ContainedSeq;
interface Container : IRObject {
Contained lookup (in ScopedName search_name);
ContainedSeq contents (
in DefinitionKind limit_type,
in boolean exclude_inherited
);
ContainedSeq lookup_name (
in Identifier search_name,
in long levels_to_search,
in DefinitionKind limit_type,
in boolean exclude_inherited
);
struct Description {
Contained contained_object;
DefinitionKind kind;
any value;
};
typedef sequence<Description> DescriptionSeq;
DescriptionSeq describe_contents (
in DefinitionKind limit_type,
in boolean exclude_inherited,
in long max_returned_objs
);
};
};
The lookup
operation locates a definition relative
to this container, given a scoped name using the OMG IDL rules for
name scoping. An absolute scoped name (beginning double colons
(::)) locates the definition relative to the enclosing Repository.
If no object is found, a nil object reference is returned.
The contents
operation returns the list of objects
directly contained by or inherited into the object. The operation
is used to navigate through the hierarchy of objects. Starting with
the Repository object, a client uses this operation to list all of
the objects contained by the Repository, all of the objects
contained by the modules within the Repository, all of the
interfaces and value types within a specific module, and so on.
-
limit_type
- If
limit_type
is set todk_all
, objects of all types are returned. For example, if this is an InterfaceDef, the attribute, operation, and exception objects are all returned. Iflimit_type
is set to a specific interface, only objects of that type are returned. For example, only attribute objects are returned iflimit_type
is set todk_Attribute
. -
exclude_inherited
- If set to
TRUE
, inherited objects (if there are any) are not returned. If set toFALSE
, all contained objects (whether contained due to inheritance or because they were defined within the object) are returned. -
search_name
- Specifies which name is to be searched for.
-
levels_to_search
- Controls whether the lookup is constrained to the object the
operation is invoked on, or whether the lookup should search
through objects contained by the object as well. Setting
levels_to_search
to -1 searches the current object and all contained objects. Settinglevels_to_search
to 1 searches only the current object. Use of values oflevels_to_search
of 0 or of negative numbers other than -1 is undefined. -
max_returned_objs
- Limits the number of objects that can be returned in an invocation of the call to the number provided. Setting the parameter to -1 indicates return all contained objects.
Parent topic: Interface Repository Interfaces