Get the IDL type for a particular element within a CORBA
object's IDL interface.
Usage
idlElementType(server, element)
Arguments
server
|
A CORBA object - either (nested) name or IOR -
or the (fully qualified) name of an IDL interface
|
element
|
the name of the element of interest
within the IDL interface - an attribute or operation.
|
Description
This indicates whether the IDL interface
of the CORBA object or identified specifically by name
is an operation, an attribute or something else
including non-existant. This can be usedDetails
If a CORBA object is specified, either by name
or explicitly by an IOR, the interface it implements
is queried. If no such object is found, we assume
the identifier is the name of the IDL interface.
At this point, we query the Interface Repository
for the IDL interface corresponding to this name
and lookup the element within it. Its type is available
to the C++ code from the object returned
to us by the repository.Value
If the element in the interface is an operation, the value
2 is returned. If it is an attribute, the value 1
is returned. Otherwise, -1 is returned.Note
This is used in S when we try to handle the syntactically
convenient
server$name
and we do not know whether this will be followed
by a () or not. Hence, if name
refers to an attribute, we want to evaluate it and
retrieve the attribute's value.
Otherwise, we create a reference to the function
so that when it is invoked, it turns into an
appropriate call to .Corba.Author(s)
Duncan Temple LangReferences
http://www.omegahat.orgSee Also
idlInterface,
idlType,
.CorbaExamples
# Ask about the element "sleep" in the
# interface directly.
idlElementType("RSExamples::Sleep","sleep")
# Now try it on a server object that implements this.
#
idlElementType("Sleeper","sleep")