[Top] [Prev] [Next] [Bottom]

Mapping of Pseudo Objects to Smalltalk

21


CORBA defines a small set of standard interfaces which define types and operations for manipulating object references, for accessing the Interface Repository, and for Dynamic Invocation of operations. Other interfaces are defined in pseudo OMG IDL (PIDL) to represent in a more abstract manner programmer access to ORB services which are provided locally. These PIDL interfaces sometimes resort to non-OMG IDL constructs, such as pointers, which have no meaning to the Smalltalk programmer. This chapter specifies the minimal requirements for the Smalltalk mapping for PIDL interfaces. The operations are specified below as protocol descriptions.

Parameters with the name aCORBAObject are expected to be Smalltalk objects which can be mapped to an OMG IDL interface or data type.

Unless otherwise specified, all messages are defined to return undefined objects.

21.1 CORBA::Request

The CORBA::Request interface is mapped to the CORBARequest protocol, which must include the following instance methods:

addArg: aCORBANamedValue
Corresponds to the add_arg operation.

invoke
Corresponds to the invoke operation with the invoke_flags set to 0.

invokeOneway
Corresponds to the invoke operation with the invoke_flags set to CORBA::INV_NO_RESPONSE.

send
Corresponds to the send operation with the invoke_flags set to 0.

sendOneway
Corresponds to the send operation with the invoke_flags set to CORBA::INV_NO_RESPONSE.

pollResponse
Corresponds to the get_response operation, with the response_flags set to CORBA::RESP_NO_WAIT. Answers true if the response is complete, false otherwise.

getResponse
Corresponds to the get_response operation, with the response_flags set to 0.

21.2 CORBA::Context

The CORBA::Context interface is mapped to the CORBAContext protocol, which must include the following instance methods:

setOneValue: anAssociation
Corresponds to the set_one_value operation.

setValues: aCollection
Corresponds to the set_values operation. The parameter passed in should be a collection of Associations.

getValues: aString
Corresponds to the get_values operation without a scope name and op_flags = CXT_RESTRICT_SCOPE. Answers a collection of Associations.

getValues: aString propName: aString
Corresponds to the get_values operation with op_flags set to CXT_RESTRICT_SCOPE. Answers a collection of Associations.

getValuesInTree: aString propName: aString
Corresponds to the get_values operation with op_flags set to 0. Answers a collection of Associations.

deleteValues: aString
Corresponds to the delete_values operation.

createChild: aString
Corresponds to the create_child operation. Answers a Smalltalk object conforming to the CORBAContext protocol.

delete
Corresponds to the delete operation with flags set to 0.

deleteTree
Corresponds to the delete operation with flags set to CTX_DELETE_DESCENDENTS.

21.3 CORBA::Object

The CORBA::Object interface is mapped to the CORBAObject protocol, which must include the following instance methods:

getImplementation
Corresponds to the get_implementation operation. Answers a Smalltalk object conforming to the CORBAImplementationDef protocol.

getInterface
Corresponds to the get_interface operation. Answers a Smalltalk object conforming to the CORBAInterfaceDef protocol.

isNil
Corresponds to the is_nil operation. Answers true or false indicating whether or not the object reference represents an object.

createRequest: aCORBAContext

o peration: aCORBAIdentifier

argList: aCORBANVListOrNil

result: aCORBAParameter

request: aCORBAParameter

reqFlags: flags


Corresponds to the create_request operation.

duplicate
Corresponds to the duplicate operation. Answers a Smalltalk object representing an object reference, conforming to the interface of the CORBA object.

release1
Corresponds to the release operation.

21.4 CORBA::ORB

The CORBA::ORB interface is mapped to the CORBAORB protocol, which must include the following instance methods:

objectToString: aCORBAObject
Corresponds to the object_to_string operation. Answers an instance of the String class.

stringToObject: aString
Corresponds to the string_to_object operation. Answers an object reference, which will be an instance of a class which corresponds to the InterfaceDef of the CORBA object.

createOperationList: aCORBAOperationDef
Corresponds to the create_operation_list operation. Answers an instance of OrderedCollection of Smalltalk objects conforming to the CORBANamedValue protocol.

getDefaultContext
Corresponds to the get_default_context operation. Answers a Smalltalk object conforming to the CORBAContext protocol.

sendMultipleRequests: aCollection
Corresponds to the send_multiple_requests operation with the invoke_flags set to 0.The parameter passed in should be a collection of Smalltalk objects conforming to the CORBARequest protocol.

sendMultipleRequestsOneway: aCollection
Corresponds to the send_multiple_requests operation with the invoke_flags set to CORBA::INV_NO_RESPONSE.The parameter passed in should be a collection of Smalltalk objects conforming to the CORBARequest protocol.

pollNextResponse
Corresponds to the get_next_response operation, with the response_flags set to CORBA::RESP_NO_WAIT. Answers true if there are completed requests pending, false otherwise.

getNextResponse
Corresponds to the get_next_response operation, with the response_flags set to 0.

21.5 CORBA::NamedValue

PIDL for C defines CORBA::NamedValue as a struct while C++-PIDL specifies it as an interface. CORBA::NamedValue in this mapping is specified as an interface that conforms to the CORBANamedValue protocol. This protocol must include the following instance methods:

name
Answers the name associated with the instance.

name: aString
Resets the name associated with instance to aString.

value
Answers the value associated with the instance.

value: aCORBAObject
Resets the value associated with instance to aCORBAObject.

flags
Answers the flags associated with the instance.

flags: argModeFlags
Resets the flags associated with instance to argModeFlags.

To create an object that supports the CORBANamedValue protocol, the instance method asCORBANamedValue: aName flags: argModeFlags can be invoked by any Smalltalk object. This method will return a Smalltalk object conforming to the CORBANamedValue protocol, whose attributes associated with the instance will be set appropriately.

21.6 CORBA::NVList

The CORBA::NVList interface is mapped to the equivalent of the OMG IDL definition

typedef sequence<NamedValue> NVList;

Thus, Smalltalk objects representing the NVList type should be instances of the OrderedCollection class, whose elements are Smalltalk objects conforming to the CORBANamedValue protocol.



[Top] [Prev] [Next] [Bottom]

1 The semantics of this operation will have no meaning for those implementations that rely exclusively on the Smalltalk memory manager.

pubs@omg.org
Copyright © 1995, Object Management Group. All rights reserved.