![]() |
Overview Converts a string (produced by CORBA::ORB::object_to_string) into an object reference. Original class CORBA::ORB Exceptions If the input string is not valid, or refers to a local object that is no longer valid (insofar as the ORB can determine), a CORBA::SystemException is thrown.
Intended Usage
The CORBA::ORB::string_to_object method is intended to be used by client or server applications to convert a string form of an object reference (originally generated using CORBA::ORB::object_to_string) back into an object reference. If the input string refers to a local object residing in a server process (a process that has called CORBA::BOA::impl_is_ready), then the result is the same local object originally passed to CORBA::ORB::object_to_string. If the input string refers to a local object residing in a non-server process, then the result is the same local object originally passed to CORBA::ORB::object_to_string provided that both calls were made from the same process instance. If the input string refers to an object in another process, then CORBA::ORB::string_to_object always constructs a new proxy object. The validity of the object/server to which the proxy refers is not checked until the application invokes an application operation on the proxy.
IDL Syntax
CORBA::Object_ptr string_to_object (const char* str);
Input parameters
- str
- A string form of an object reference. This string must have been originally generated using CORBA::ORB::object_to_string (although not necessarily by the process). The caller retains ownership of this string.
Return values
- CORBA::Object_ptr
- The object reference encoded by the input string. The caller assumes ownership of this object reference and should subsequently release it using CORBA::release.
Example
See example in ORB::object_to_string.