Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

void SysView_PascalTableObj::MoveToCol ( SysView_ITOVarType  iType,
const void *  pVal,
const SAPDB_Int  iLength 
) [virtual]

This function has many overloads and moves a variable of any kind to a table column.

Returns:
none

Implements SysView_ITableObj.

Definition at line 176 of file SysView_PascalTableObj.cpp.

References C_IS_UNDEF, C_ZERO_AS_UNDEF, MoveInt8(), and SysView_Trace.

{
    SAPDBTRACE_METHOD_DEBUG ("SysView_PascalTableObj::MoveToCol", SysView_Trace, 5);

    SAPDB_Int2 int2Temp;

    // HP and Linux64 need definition of User before the switch, all other in case only
    tsp00_KnlIdentifier User; 

    // cast const away because of all the following casts...
    void *cpVal = const_cast<void*>(pVal);

    switch (iType)
    {

    case ITOVT_NULL:
        a40move (m_Context, m_Show, NULL, 0);
        break;

    case ITOVT_INT2:
        int2Temp = *(static_cast<SAPDB_Int2 *>(cpVal));
        a40move_i4 (m_Context, m_Show, static_cast<SAPDB_Int4>(int2Temp), !C_IS_UNDEF, 0, !C_ZERO_AS_UNDEF );
        break;
    case ITOVT_INT4:
        a40move_i4 (m_Context, m_Show, *(static_cast<SAPDB_Int4 *>(cpVal)), !C_IS_UNDEF, 0, !C_ZERO_AS_UNDEF );
        break;
    
    case ITOVT_UINT4:
        a40move_ui4 (m_Context, m_Show, *(reinterpret_cast<SAPDB_UInt4 *>(cpVal)), !C_IS_UNDEF, 0, !C_ZERO_AS_UNDEF );
        break;

    case ITOVT_INT8:
    case ITOVT_UINT8:
        MoveInt8 (*(reinterpret_cast<SAPDB_Int8 *>(cpVal)));
        break;

    case ITOVT_CHARPTR:
        a40move_const (m_Context, m_Show, reinterpret_cast<SAPDB_Char *>(cpVal), iLength );
        break;

    case ITOVT_UTF8PTR:
        MoveUTF8Ptr (reinterpret_cast<SAPDB_UTF8 *>(cpVal), iLength );
        break;

    case ITOVT_TRANSNO:
        MoveTransNo (*(reinterpret_cast<tgg91_TransNo *>(cpVal)));
        break;

    case ITOVT_LOCKREQMODE:
        a42lock_req_mode (m_Context, m_Show, *(reinterpret_cast<tgg00_LockReqMode_Enum *>(cpVal)));
        break;

    case ITOVT_LOCKREQSTATE:
        a42lock_req_state (m_Context, m_Show, *(reinterpret_cast<tgg00_LockReqState *>(cpVal)));
        break;

    case ITOVT_SURROGATE:
        a40move (m_Context, m_Show, *(reinterpret_cast<tgg00_Surrogate *>(cpVal)), SURROGATE_MXGG00);
        break;

    case ITOVT_LONGCOLREF:
        a40long_descriptor(m_Context, m_Show, *(reinterpret_cast<tgg00_Surrogate *>(cpVal)), iLength);
        break;

    case ITOVT_KNLIDENTIFIER:
        a40move (m_Context, m_Show, reinterpret_cast<tsp00_KnlIdentifier *>(cpVal), sizeof(*(reinterpret_cast<tsp00_KnlIdentifier *>(cpVal))));
        break;

    case ITOVT_TRANSLOCKMODE:
        MoveTransLockMode (*(reinterpret_cast<tkb05_TransLockMode_Enum *>(cpVal)));
        break;

    case ITOVT_PARSEID:
        MoveParseID (*(reinterpret_cast<tak_parsid *>(cpVal)));
        break;

    case ITOVT_SQLMODE:
        MoveSQLMode (*(reinterpret_cast<tsp00_SqlMode_Enum *>(cpVal)));
        break;

    case ITOVT_DATETIMEFORMAT:
        MoveDateTimeFormat (*(reinterpret_cast<tgg00_DateTimeFormat_Enum *>(cpVal)));
        break;

    case ITOVT_BOOL:
        MoveBool (*(reinterpret_cast<SAPDB_Bool *>(cpVal)));
        break;

    case ITOVT_YESNO:
        MoveYesNo (*(reinterpret_cast<SAPDB_Bool *>(cpVal)));
        break;

    case ITOVT_ONOFF:
        MoveOnOff (*(reinterpret_cast<SAPDB_Bool *>(cpVal)));
        break;

    case ITOVT_CODETYPE:
        MoveCodeType (*(reinterpret_cast<tsp00_CodeType *>(cpVal)));
        break;

    case ITOVT_USER:
        a06determine_username (m_Context, *(reinterpret_cast<tgg00_Surrogate*>(cpVal)), User);
        a40move (m_Context, m_Show, &User, sizeof(User));
        break;

    default:
        a07_b_put_error (m_Context, e_move_error, static_cast<SAPDB_Int>(iType));
        break;
    }
}


Generated by  Doxygen 1.6.0   Back to index