Container::lookup_name

Overview The lookup_name operation is used to locate an object by name within a particular object or within the objects contained by that object.
Original interface CORBA module: Container Interface
Exceptions CORBA::SystemException


Intended Usage

The lookup_name operation is used to locate an object by name within a particular object or within the objects contained by that object. The parameters to the lookup_name operation specify the name for the search, the number of levels to search, the type of objects to be examined in the search, and whether containment by inheritance should be included.

Syntax

  ContainedSeq lookup_name (in Identifier search_name,
                            in long levels_to_search,
                            in DefinitionKind limit_type,
                            in boolean exclude_inherited);

Input parameters

exclude_inherited

An object can be contained within another object because it is defined within the containing object (for example, an interface is contained within a module). It may also be defined as contained because it is inherited by the containing object (for example, an operation may be contained by an interface because the interface inherits the operation from another interface).

When exclude_inherited is TRUE, inherited objects, if present, are not returned. If exclude_inherited is FALSE, all contained objects (whether contained due to inheritance or because they were defined within the object) are returned.

limit_type
The limit_type parameter indicates which type of object should be examined while performing the name search. The accepted values for limit_type are: CORBA::dk_all, CORBA::dk_Attribute, CORBA::dk_Constant, CORBA::dk_Exception, CORBA::dk_Interface, CORBA::dk_Module, CORBA::dk_Operation, CORBA::dk_Typedef, CORBA::dk_Alias, CORBA::dk_Struct, CORBA::dk_Union, and CORBA::dk_Enum. If the limit_type is CORBA::dk_all, objects of all interface types are returned (for example, attributes, operations, and exceptions are all returned). If limit_type is set to a specific interface, only objects of that interface are returned.
search_name
The search_name specifies the name for which the search is to be made.
levels_to_search
The levels_to_search parameter controls the the depth of the search. When levels_to_search is set to -1 the current object is searched as well as all contained objects. Setting levels_to_search to 1 will limit the search to the current object only.

Return values

ContainedSeq *
The returned value is a pointer to a ContainedSeq that is the list of Contained objects retrieved from the Interface Repository based upon the input criteria. The memory associated with the ContainedSeq is owned by the caller. The caller can invoke delete on the ContainedSeq * to delete the memory when no longer needed.

Example

  // C++
     // assume 'repository_ptr' is already initialized
     CORBA::Repository * repository_ptr;
 
     // search for a specific interface name
     CORBA::ContainedSeq * cont_seq;
     cont_seq = repository_ptr-> lookup_name ("Interface1", -1, 
        CORBA::dk_Interface, 0);
 
     

Related reference
CORBA module



Searchable topic ID:   rcor_modc12
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modc12.html

Library | Support | Terms of Use | Feedback