コード例 #1
0
ファイル: CORBA.py プロジェクト: gmwu/corba_examples
    def member_visibility(self, index): return self._t.member_visibility(index)
    def type_modifier(self):            return self._t.type_modifier()
    def concrete_base_type(self):       return self._t.concrete_base_type()


omniORB._CORBA_dict = globals()

import tcInternal
_d_TypeCode = tcInternal.tv_TypeCode


# TypeCodes of basic types. The CORBA mapping says the TypeCode
# constants should start TC, but omniORBpy previously used _tc, so we
# support both:

TC_null     = _tc_null     = tcInternal.createTypeCode(tcInternal.tv_null)
TC_void     = _tc_void     = tcInternal.createTypeCode(tcInternal.tv_void)
TC_short    = _tc_short    = tcInternal.createTypeCode(tcInternal.tv_short)
TC_long     = _tc_long     = tcInternal.createTypeCode(tcInternal.tv_long)
TC_ushort   = _tc_ushort   = tcInternal.createTypeCode(tcInternal.tv_ushort)
TC_ulong    = _tc_ulong    = tcInternal.createTypeCode(tcInternal.tv_ulong)
TC_float    = _tc_float    = tcInternal.createTypeCode(tcInternal.tv_float)
TC_double   = _tc_double   = tcInternal.createTypeCode(tcInternal.tv_double)
TC_boolean  = _tc_boolean  = tcInternal.createTypeCode(tcInternal.tv_boolean)
TC_char     = _tc_char     = tcInternal.createTypeCode(tcInternal.tv_char)
TC_octet    = _tc_octet    = tcInternal.createTypeCode(tcInternal.tv_octet)
TC_any      = _tc_any      = tcInternal.createTypeCode(tcInternal.tv_any)
TC_TypeCode = _tc_TypeCode = tcInternal.createTypeCode(tcInternal.tv_TypeCode)
TC_Principal= _tc_Principal= tcInternal.createTypeCode(tcInternal.tv_Principal)
TC_string   = _tc_string   =tcInternal.createTypeCode((tcInternal.tv_string,0))
TC_longlong = _tc_longlong = tcInternal.createTypeCode(tcInternal.tv_longlong)
コード例 #2
0
ファイル: any.py プロジェクト: Distrotech/omniORB
        elif 0 <= data <= 4294967295L:
            return CORBA.TC_ulong, data
        elif -9223372036854775808L <= data <= 9223372036854775807L:
            return CORBA.TC_longlong, data
        elif 0 <= data <= 18446744073709551615L:
            return CORBA.TC_ulonglong, data
        else:
            raise CORBA.BAD_PARAM(omniORB.BAD_PARAM_PythonValueOutOfRange,
                                  CORBA.COMPLETED_NO)

    elif isinstance(data, FloatType):
        return CORBA.TC_double, data

    elif isinstance(data, ListType):
        if data == []:
            tc = tcInternal.createTypeCode((tcInternal.tv_sequence,
                                            tcInternal.tv_any, 0))
            return tc, data

        d0 = data[0]

        if isinstance(d0, StringType):
            for d in data:
                if not isinstance(d, StringType):
                    break
            else:
                # List of strings
                tc = tcInternal.createTypeCode((tcInternal.tv_sequence,
                                                CORBA.TC_string._d, 0))
                return tc, data

        elif isinstance(d0, UnicodeType):
コード例 #3
0
ファイル: CORBA.py プロジェクト: SD2019-2/rodrigozago
        return self._t.type_modifier()

    def concrete_base_type(self):
        return self._t.concrete_base_type()


omniORB._CORBA_dict = globals()

import tcInternal
_d_TypeCode = tcInternal.tv_TypeCode

# TypeCodes of basic types. The CORBA mapping says the TypeCode
# constants should start TC, but omniORBpy previously used _tc, so we
# support both:

TC_null = _tc_null = tcInternal.createTypeCode(tcInternal.tv_null)
TC_void = _tc_void = tcInternal.createTypeCode(tcInternal.tv_void)
TC_short = _tc_short = tcInternal.createTypeCode(tcInternal.tv_short)
TC_long = _tc_long = tcInternal.createTypeCode(tcInternal.tv_long)
TC_ushort = _tc_ushort = tcInternal.createTypeCode(tcInternal.tv_ushort)
TC_ulong = _tc_ulong = tcInternal.createTypeCode(tcInternal.tv_ulong)
TC_float = _tc_float = tcInternal.createTypeCode(tcInternal.tv_float)
TC_double = _tc_double = tcInternal.createTypeCode(tcInternal.tv_double)
TC_boolean = _tc_boolean = tcInternal.createTypeCode(tcInternal.tv_boolean)
TC_char = _tc_char = tcInternal.createTypeCode(tcInternal.tv_char)
TC_octet = _tc_octet = tcInternal.createTypeCode(tcInternal.tv_octet)
TC_any = _tc_any = tcInternal.createTypeCode(tcInternal.tv_any)
TC_TypeCode = _tc_TypeCode = tcInternal.createTypeCode(tcInternal.tv_TypeCode)
TC_Principal = _tc_Principal = tcInternal.createTypeCode(
    tcInternal.tv_Principal)
TC_string = _tc_string = tcInternal.createTypeCode((tcInternal.tv_string, 0))
コード例 #4
0
ファイル: any.py プロジェクト: SD2019-2/rodrigozago
        elif 0 <= data <= 4294967295L:
            return CORBA.TC_ulong, data
        elif -9223372036854775808L <= data <= 9223372036854775807L:
            return CORBA.TC_longlong, data
        elif 0 <= data <= 18446744073709551615L:
            return CORBA.TC_ulonglong, data
        else:
            raise CORBA.BAD_PARAM(omniORB.BAD_PARAM_PythonValueOutOfRange,
                                  CORBA.COMPLETED_NO)

    elif isinstance(data, float):
        return CORBA.TC_double, data

    elif isinstance(data, list):
        if data == []:
            tc = tcInternal.createTypeCode((tcInternal.tv_sequence,
                                            tcInternal.tv_any, 0))
            return tc, data

        d0 = data[0]

        if isinstance(d0, str):
            for d in data:
                if not isinstance(d, str):
                    break
            else:
                # List of strings
                tc = tcInternal.createTypeCode((tcInternal.tv_sequence,
                                                CORBA.TC_string._d, 0))
                return tc, data

        elif isinstance(d0, unicode):