[omniORB] Need to know the type of object reference using an object Id

Duncan Grisby duncan at grisby.org
Sat Nov 14 22:18:19 GMT 2009


On Fri, 2009-11-13 at 10:43 +0530, Amit Kumar wrote:

> If we have an object Id, we can use “ Object   id_to_reference(in
> ObjectId oid) ”  method to get the Object. After that we need to
> _narrow() to the specific type of object reference. 

Where did you get the object id from?  Why do you not know what type of
object it corresponds to?

> My problem: I have two interfaces A and B. My need is that before
> executing the _narrow() operation, I should get the type of the object
> reference so that I can narrow to the appropriate interface type.
> E.g. 

Just try to narrow it to one of the interfaces. If that returns nil, it
wasn't that interface, so try the other one.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list