3-8
SOMobjects Base Toolkit Programmer’s Reference Manual
describe Method
Purpose
Returns a structure containing information defined in the IDL specification that corresponds
to a specified Contained object in the Interface Repository.
IDL Syntax
Description describe ( );
Description
The describe method returns a structure containing information defined in the IDL
specification of a Contained object. The specified object represents a component of an IDL
interface (class) definition maintained within the Interface Repository.
When finished using the information in the returned Description structure, the client code
must release the storage allocated for it. To free the associated storage, use a call similar to
this:
if (desc.value._value)
SOMFree (desc.value._value);
Warning: The describe method returns pointers to elements within objects (for example,
name). Thus, the somFree method should not be used to release any of these objects
while the describe information is still needed.
Parameters
receiver A pointer to the Contained object in the Interface Repository for which a
Description is needed.
ev A pointer to the Environment structure for the caller.
Return Value
The describe method returns a structure of type Description containing information
defined in the IDL specification of the receiving object.
The name field of the Description is the name of the type of description. The name values
are from the following set:
{“ModuleDescription”, “InterfaceDescription”, “AttributeDescription”,
“OperationDescription”, “ParameterDescription”, “TypeDescription”,
“ConstantDescription”, “ExceptionDescription”}
The value field is a structure of type any whose value field is a pointer to a structure of the
type named by the name field of the Description. This structure provides all of the
information contained in the IDL specification of the receiver. For example, if the describe
method is invoked on an object of type AttributeDef, the name field of the returned
Description will contain the identifier “AttributeDescription” and the value field will contain
an any structure whose value field is a pointer to an AttributeDescription structure.
Komentarze do niniejszej Instrukcji