[omniORB] TCKind and TypeCodes

Joshua Reynolds joshuar@isogen.com
Thu, 12 Jul 2001 13:34:49 -0500


Yes we are working in Pythonland.  What I am trying to do is figure out 
the best way to store the contents of Anys in a persistent dictionary.
I am planning on using a combination of the actual value (or servant if 
it is an object reference) and the repository ID if there is one.  If 
there isn't one I still need some sort of consistent "type" that I can 
hash along with the value. I was planning on using a stringified version 
of the typecode.kind() if there was no repId.

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.

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

Ciao,
Joshua

Friday, July 6, 2001, alle 06:01 , Duncan Grisby ha scritto:

> On Wednesday 11 July, Joshua Reynolds wrote:
>
>> Is there any built in functionality to get from the enumerated TCKind
>> (i.e CORBA.tk_string) to TypeCode objects  themselves(i.e
>> CORBA.TC_string)?
>
> I assume from the syntax that you're talking about Python. There isn't
> any way to get from a TypeCode kind to an actual TypeCode. For all but
> the simplest TypeCodes (not even string), there isn't a simple mapping
> of kinds to TypeCodes.
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby  \  Research Engineer  --
>   -- AT&T Laboratories Cambridge          --
>    -- http://www.uk.research.att.com/~dpg1 --
>

Joshua Reynolds | Untitled

1016 La Posada Dr. | Suite 240 | Austin TX  78752
     T 512.380.0347 |  F 512.380.0429 | joshuar@isogen.com

w w w . d a t a c h a n n e l . c o m