[omniORB] DynValueCommon and sharing semantics 
    Duncan Grisby 
    duncan at grisby.org
       
    Wed Aug  2 15:59:25 BST 2006
    
    
  
On Wednesday 2 August, JiangWei wrote:
> My server want to handle some unkonwn valuetype (definition at client
> side after server running ) .
> I have to implement it with DSI and DynAny because
> no facotries for them. But DynAny can't keep sharing semantics.
How would you expect DynAny to expose the fact that two values are
shared?  There's nothing in the DynAny interfaces that would permit you
to do that.
You can compare the values stored in two Anys without having to have
valuefactories for them. i.e.
  CORBA::Any a1, a2;
  // Populate Anys, e.g. from get_members() on a DynStruct
  CORBA::ValueBase *v1, *v2;
  a1 >>= CORBA::Any::to_value(v1);
  a2 >>= CORBA::Any::to_value(v2);
  if (v1 == v2)
    // it's the same value
This is all clearly required by the CORBA spec, and completely supported
in omniORB.
Cheers,
Duncan.
-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --
    
    
More information about the omniORB-list
mailing list