[omniORB] How to do TypeCodes in omniORBpy?

Gary D. Duzan gdd0@gte.com
Thu, 12 Apr 2001 11:18:09 -0400


In Message <200104121509.QAA30216@pineapple.uk.research.att.com> ,
   Duncan Grisby <dgrisby@uk.research.att.com> wrote:

=>On Thursday 12 April, Craig Rodrigues wrote:
=>
=>> Section 1.3.8 is a bit vague about TypeCodes
=>> for basic IDL types.
=>> 
=>> Is CORBA.tk_string the typecode for a string?
=>> Or is it CORBA.TCKind.tk_string?
=>
=>CORBA.tk_string is the TypeCode kind for string, not the TypeCode
=>itself. The TypeCode is CORBA.TC_string.

   Ah. Actually, this means the code I'm writing at the moment is
wrong, as I was using TCKinds instead of TypeCodes. Thanks.

					Gary Duzan
					Verizon IT


=>The relevant bit of section 1.3.8 of the Python mapping is the third
=>sentence: "In addition, the type code constants defined in section
=>10.7.2 are available as Python variables in the module CORBA, with the
=>names given in section 10.7.2."  I agree that it doesn't exactly make
=>it clear.
=>
=>> What I want to do is:
=>> 
=>> any1 = CORBA.Any ( type code for string, "someString")
=>> an2 = CORBA.Any ( type code for long, 35)
=>
=>any1 = CORBA.Any (CORBA.TC_string, "someString")
=>any2 = CORBA.Any (CORBA.TC_long, 35)
=>
=>Cheers,
=>
=>Duncan.
=>
=>-- 
=> -- Duncan Grisby  \  Research Engineer  --
=>  -- AT&T Laboratories Cambridge          --
=>   -- http://www.uk.research.att.com/~dpg1 --
=>