Amit Kumar
2009-11-13 11:12:38 UTC
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
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