[omniORB] TCKind and TypeCodes

Duncan Grisby dgrisby@uk.research.att.com
Mon, 09 Jul 2001 15:25:45 +0100


On Thursday 12 July, Joshua Reynolds wrote:

> The use case for this is I have two things I want as keys in the dict.  
> one is a sequence of octet with the value that maps to the string "foo".
> the other is TC_string with value "foo"
> I need to be able to differentiate these two as keys and be able to map 
> them back to the appropriate TypeCodes.  I don't think using the 
> TypeCodes themselves will work since they will be persisted.

I think you should get away with persisting TypeCodes, as long as you
don't have recursive types in your IDL. If you have recursive types, I
suspect the pickling will try to write an infinite amount of type
descriptor...

> Why doesn't  CORBA.tk_string map to CORBA.TC_string?

Because CORBA has bounded strings. Given two typedefs:

  typedef string foo;
  typedef string<10> bar;

the TypeCodes of the two are different.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --