Methods introduced by Interface Repository classes
The Interface Repository classes introduce nine new methods, which are briefly
described below. Many of the classes simply override methods to customize
them for the corresponding IDL element; this is particularly true for classes
representing IDL elements that are only contained within another syntactic
element. Full descriptions of each method are found in the SOMobjects
Developer Toolkit: Programmers Reference Manual.
- Contained class methods (all
IR objects are instances of this class and exhibit this behavior):
describe
Returns a structure of type Description
containing all information defined in the IDL specification of the syntactic
element corresponding to the target Contained object. For example,
for a target InterfaceDef object, the describe method returns
information about the IDL interface declaration. The Description structure
contains a "name" field with an identifier that categorizes the description
(such as, "InterfaceDescription") and a "value" field holding an "any" structure
that points to another structure containing the IDL information for that
particular element (in this example, the interface's IDL specifications).
within
Returns a
sequence designating the object(s) of the IR within which the target Contained
object is contained. For example, for a target TypeDef object,
it might be contained within any other IR object(s) except an OperationDef
object.
Container
class methods (some IR objects contain other
objects and exhibit this behavior):
contents
Returns a sequence of pointers to
the object(s) of the IR that the target Container object contains.
(For example, for a target InterfaceDef object, the contents method
returns a pointer to each IR object that corresponds to a part of the IDL
interface declaration.) The method provides options for excluding inherited
objects or for limiting the search to only a specified kind of object (such
as AttributeDefs).
describe_contents
Combines
the describe and contents methods; returns a sequence of ContainerDescription
structures, one for each object contained by the target Container
object. Each structure has a pointer to the related object, as well
as "name" and "value" fields resulting from the describe method.
lookup_name
Returns
a sequence of pointers to objects of a given name contained within a specified
Container object, or within (sub)objects contained in the specified
Container object.
ModuleDef
class methods:
- Override describe and within.