[omniORB] Need to know the type of object reference using an object
Id
Amit Kumar
amitk at tarangtech.com
Fri Nov 13 10:43:23 GMT 2009
Hello Friends,
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.
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.
CORBA::Object_var obj = poa->id_to_reference(oid);
if ( reference type == type A)
A:: _narrow(Obj.in());
else if ( reference type == type B)
B::_narrow (Obj.in());
This is the nature of my problem. Can anybody suggest to solve my problem of
knowing the object type at run time while having only object Id known?
Regards & Thanks,
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091113/793a977d/attachment.htm
More information about the omniORB-list
mailing list