Public Member Functions | Protected Member Functions | Private Attributes

i_UIMessageServer_i Class Reference
[Command line interface]

#include <i_uims_impl.h>

Inheritance diagram for i_UIMessageServer_i:
Inheritance graph
[legend]
Collaboration diagram for i_UIMessageServer_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 i_UIMessageServer_i (bool quietMode, bool a_detail)
void DisplayResult (const i_UIResult_t &a_res)
void DisplayError (const char *a_error)
void DisplayWarning (const char *a_error)
void DisplayMessage (const char *a_message)
void PrintHeader ()
void NoPrintHeader ()
void SetDetail ()
void Remove ()
void DisplayDetail (const i_UIResult_t &a_res)
void DisplayTable (const i_UIResult_t &a_res)

Protected Member Functions

virtual ~i_UIMessageServer_i ()

Private Attributes

bool m_quietMode
bool m_printHeader
bool m_detail
 log_CLASSID_m

Detailed Description

Definition at line 43 of file i_uims_impl.h.


Constructor & Destructor Documentation

i_UIMessageServer_i::i_UIMessageServer_i ( bool  quietMode,
bool  a_detail 
)

Definition at line 56 of file i_uims_impl.cpp.

References log_FUNC_m.

                                                                       :
    m_quietMode(a_quietMode), 
    m_printHeader(true),
    m_detail(a_detail) {

    log_FUNC_m(i_UIMessageServer_i);
} // i_UIMessageServer_i::i_UIMessageServer_i

i_UIMessageServer_i::~i_UIMessageServer_i (  )  [protected, virtual]

Definition at line 68 of file i_uims_impl.cpp.

References ipc_Corba::Shutdown().

                                          {

    //log_FUNC_m(~i_UIMessageServer_i) - causes assertion failure on windows

    ipc_Corba::Shutdown();

} // i_UIMessageServer_i::~i_UIMessageServer_i

Here is the call graph for this function:


Member Function Documentation

void i_UIMessageServer_i::DisplayDetail ( const i_UIResult_t a_res  ) 

Definition at line 90 of file i_uims_impl.cpp.

References i_UIResultCell_t::alignment, i_UIResultCell_t::boolVar, cmn_Num2Str(), dbg_DETAIL, dbg_LOW, dbg_NORM, GetFSType(), ie_FATAL_ERROR, ie_NYI, ivd_DriveStatusToText(), ivd_FSTypeToText(), ivd_JobStatusToText(), ivd_JobTypeToText(), ivd_LibraryStatusToText(), ivd_LibraryTypeToText(), ivd_MediaFamilyToText(), ivd_MediaTypeToText(), ivd_MediaVolStatusToText(), ivd_MediumStatusToText(), ivd_NotApplicableToText(), ivd_PartitionActivityToText(), ivd_PartitionOptionsToText(), ivd_PartitionStatusToText(), ivd_PoolTypeToText(), ivd_SlotStatusToText(), ivd_SlotTypeToText(), ivd_SysVolLocationToText(), ivd_VolTypeToText(), len, log_DBG_m, log_FUNC_m, i_UIResultCell_t::num, i_UIResult_t::table, i_UIResultCell_t::text, i_UIResultCell_t::type, uialign_RIGHT, uires_BOOL, uires_DRIVESTATUS, uires_FSTYPE, uires_JOBSTATUS, uires_JOBTYPE, uires_LIBRARYSTATUS, uires_LIBRARYTYPE, uires_MEDIAFAMILYTYPE, uires_MEDIAPOOLTYPE, uires_MEDIATYPE, uires_MEDIUMSTATUS, uires_NA, uires_NUM, uires_PARTITIONACTIVITY, uires_PARTITIONOPTIONS, uires_PARTITIONSTATUS, uires_RAW, uires_SLOTSTATUS, uires_SLOTTYPE, uires_SYSVOLLOCATION, uires_TEXT, uires_VOLTYPE, uires_VOLUMESTATUS, and UTF8_TO_CONSOLE.

Referenced by DisplayResult().

                                                                {
    log_FUNC_m(DisplayDetail);

    stringstream strs;
    strs << setfill(' ');

    UInt32_t header(0);
    UInt32_t maxLength(0);
    log_DBG_m(dbg_NORM, " j max:" << a_res.table.length());
    for (UInt32_t j = 0; j < a_res.table.length(); j++) {
        log_DBG_m(dbg_NORM, " j:" << j << " kmax: " << a_res.table[j].row.length());
        if ( a_res.table[j].isHdr) {
            header = j;
            for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++) {

                switch (a_res.table[j].row[k].type ) {
                    case(uires_TEXT):
                        {
                            UInt32_t len(strlen(a_res.table[j].row[k].text));
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_NUM):
                        {
                            UInt32_t len(cmn_Num2Str((UInt64_t)a_res.table[j].row[k].num).size());

                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_LIBRARYSTATUS):
                        {
                            UInt32_t len(ivd_LibraryStatusToText(ivd_LibraryStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_SLOTSTATUS):
                        {
                            UInt32_t len(ivd_SlotStatusToText(ivd_SlotStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_DRIVESTATUS):
                        {
                            UInt32_t len(ivd_DriveStatusToText(ivd_DriveStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_MEDIUMSTATUS):
                        {
                            UInt32_t len(ivd_MediumStatusToText(ivd_MediumStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_VOLUMESTATUS):
                        {
                            UInt32_t len(ivd_MediaVolStatusToText(ivd_MediaVolStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;

                    case(uires_PARTITIONSTATUS):
                        {
                            UInt32_t len(ivd_PartitionStatusToText(ivd_PartitionStatus_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_PARTITIONACTIVITY):
                        {
                            UInt32_t len(ivd_PartitionActivityToText(ivd_PartitionActivity_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_JOBSTATUS):
                        {
                            UInt32_t len(ivd_JobStatusToText(ivd_JobStatus_e(a_res.table[j].row[k].num)).size());

                            if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_LIBRARYTYPE):
                        {
                        UInt32_t len(strlen(ivd_LibraryTypeToText(ivd_LibraryType_e(a_res.table[j].row[k].num))));
                        if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_MEDIAFAMILYTYPE):
                        {
                        UInt32_t len(strlen(ivd_MediaFamilyToText(ivd_MediaFamily_e(a_res.table[j].row[k].num))));
                        if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_MEDIAPOOLTYPE):
                        {
                        UInt32_t len(strlen(ivd_PoolTypeToText(ivd_PoolType_e(a_res.table[j].row[k].num))));
                        if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_SLOTTYPE):
                        {
                        UInt32_t len(strlen(ivd_SlotTypeToText(ivd_SlotType_e(a_res.table[j].row[k].num))));
                        if (maxLength < len) {
                                maxLength = len;
                            }
                        }
                        break;
                    case(uires_MEDIATYPE):
                            {
                            UInt32_t len(strlen(ivd_MediaTypeToText(ivd_MediaType_e(a_res.table[j].row[k].num))));
                            if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;

                    case(uires_SYSVOLLOCATION):
                            {
                            UInt32_t len(strlen(ivd_SysVolLocationToText(ivd_SysVolLocation_e(a_res.table[j].row[k].num))));
                            if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;

                    case(uires_VOLTYPE):
                            {
                            UInt32_t len(strlen(ivd_VolTypeToText(ivd_VolType_e(a_res.table[j].row[k].num))));
                            if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;

                    case(uires_NA):
                            {
                            UInt32_t len(strlen(ivd_NotApplicableToText()));
                            if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;
                    case(uires_FSTYPE):
                            {
                            UInt32_t len(strlen(ivd_FSTypeToText(GetFSType(a_res.table[j].row[k].num))));
                            if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;
                    case(uires_PARTITIONOPTIONS):
                            {
                                UInt32_t len(ivd_PartitionOptionsToText(a_res.table[j].row[k].num).length());
                                if (maxLength < len) {
                                    maxLength = len;
                                }
                            }
                            break;
                    case(uires_JOBTYPE):
                        {
                            UInt32_t len(ivd_JobTypeToText(ivd_JobType_e(a_res.table[j].row[k].num)).size());
                            if (maxLength < len) {
                                maxLength = len;
                                }
                        }
                        break;
                    default:
                        log_DBG_m(dbg_LOW,"Wanted to check unknown type: " << a_res.table[j].row[k].type );
                } // switch (a_res.table[j].row[k].type )
            } // for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++)
        } // if ( a_res.table[j].isHdr)
        else {

            for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++) {
                log_DBG_m(dbg_NORM, "maxLength: " << maxLength << " j:" << j <<
                    " k:"  << k);
                if ( k >= a_res.table[header].row.length()) {
                    throw ivd_InternalError(ie_FATAL_ERROR,
                                "BUG: No header defined for field.");
                }

                const i_UIResultCell_t& head = a_res.table[header].row[k];
                ostringstream tmp;
                strs << setw(maxLength + 2) << left;
                switch (head.type) {
                    case(uires_TEXT):
                        // TODO: I18N - all text UTF8 -> OEM codepage for Windows
                        tmp << UTF8_TO_CONSOLE(head.text) << ": ";
                        strs << tmp.str();
                        break;
                    case(uires_NUM):
                        tmp  << head.num << ": ";
                        strs << tmp.str();
                        break;
                    case(uires_BOOL):

                        (head.boolVar) ? (tmp << "true ") : (tmp << "false " )<< ": ";
                        strs << tmp.str();
                        break;
                    case(uires_RAW):
                        //strs << string(head.raw);
                        throw ivd_InternalError(ie_NYI);
                        break;
                    default:
                        throw ivd_InternalError(ie_NYI);
                }

                const i_UIResultCell_t& cell = a_res.table[j].row[k];

                switch (cell.type) {
                    case(uires_TEXT):
                        // TODO: I18N - all text UTF8 -> OEM codepage for Windows
                        if (cell.alignment == uialign_RIGHT) {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(cell.text);
                            strs << cellStr.str();
                        }
                        else {
                            strs << UTF8_TO_CONSOLE(cell.text);
                        }

                        break;
                    case(uires_NUM):
                        {
                            ostringstream numStr;
                            numStr << cell.num;
                            strs << numStr.str();
                            break;
                        }
                    case(uires_BOOL):
                        (cell.boolVar)
                            ? (strs << "true ")
                            : (strs << "false ");
                        break;

                    case(uires_RAW):
                        //strs << string(cell.raw);
                        throw ivd_InternalError(ie_NYI);
                        break;
                    case(uires_LIBRARYSTATUS):
                        {
                            ostringstream cellStrA;
                            cellStrA << UTF8_TO_CONSOLE(ivd_LibraryStatusToText(ivd_LibraryStatus_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStrA.str();
                            }
                            else{
                                strs << left << cellStrA.str();
                            }
                        }
                        break;
                    case(uires_SLOTSTATUS):
                        {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(ivd_SlotStatusToText((ivd_SlotStatus_e )cell.num).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_DRIVESTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_DriveStatusToText((ivd_DriveStatus_e ) cell.num).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionStatusToText(ivd_PartitionStatus_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONACTIVITY):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionActivityToText(ivd_PartitionActivity_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIUMSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediumStatusToText(ivd_MediumStatus_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_VOLUMESTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr <<  UTF8_TO_CONSOLE(
                                            ivd_MediaVolStatusToText(
                                                ivd_MediaVolStatus_e(cell.num)).c_str()
                                        );
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_JOBSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_JobStatusToText(ivd_JobStatus_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_LIBRARYTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_LibraryTypeToText(ivd_LibraryType_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIAFAMILYTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediaFamilyToText(ivd_MediaFamily_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIAPOOLTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PoolTypeToText(ivd_PoolType_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_SLOTTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_SlotTypeToText(ivd_SlotType_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIATYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediaTypeToText(ivd_MediaType_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_SYSVOLLOCATION):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_SysVolLocationToText(ivd_SysVolLocation_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_VOLTYPE):
                        {
                            ostringstream cellStr ;
                                log_DBG_m(dbg_NORM, " uires_VOLTYPE VolType: " << cell.num );
                            cellStr << UTF8_TO_CONSOLE(ivd_VolTypeToText(ivd_VolType_e(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_NA):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_NotApplicableToText());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_FSTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_FSTypeToText(GetFSType(cell.num)));
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONOPTIONS):
                        {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionOptionsToText((cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;

                    case(uires_JOBTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_JobTypeToText(ivd_JobType_e(cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;



                    default:
                        throw ivd_InternalError(ie_NYI);

                } // switch (cell.type)
                strs << endl;
                log_DBG_m(dbg_DETAIL, "str: " << strs.str());
            } // for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++)
            strs << endl;
        } // else
    } // for (UInt32_t j = 0; j < a_res.table.length(); j++)
    cout << strs.str();

}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_UIMessageServer_i::DisplayError ( const char *  a_error  ) 

Definition at line 1087 of file i_uims_impl.cpp.

                                                          {
    cerr << "ERROR: " << a_error << endl;
}

void i_UIMessageServer_i::DisplayMessage ( const char *  a_message  ) 

Definition at line 1095 of file i_uims_impl.cpp.

                                                              {
    cout << a_message << endl;
}

void i_UIMessageServer_i::DisplayResult ( const i_UIResult_t a_res  ) 

Definition at line 76 of file i_uims_impl.cpp.

References DisplayDetail(), DisplayTable(), ipc_CATCH_IVD_THROW_CORBA_m, log_FUNC_m, and m_detail.

Here is the call graph for this function:

void i_UIMessageServer_i::DisplayTable ( const i_UIResult_t a_res  ) 

Definition at line 603 of file i_uims_impl.cpp.

References i_UIResultCell_t::alignment, i_UIResultCell_t::boolVar, cmn_Num2Str(), dbg_DETAIL, dbg_LOW, dbg_NORM, GetFSType(), ivd_DriveStatusToText(), ivd_FSTypeToText(), ivd_JobStatusToText(), ivd_JobTypeToText(), ivd_LibraryStatusToText(), ivd_LibraryTypeToText(), ivd_MediaFamilyToText(), ivd_MediaTypeToText(), ivd_MediaVolStatusToText(), ivd_MediumStatusToText(), ivd_NotApplicableToText(), ivd_PartitionActivityToText(), ivd_PartitionOptionsToText(), ivd_PartitionStatusToText(), ivd_PoolTypeToText(), ivd_SlotStatusToText(), ivd_SlotTypeToText(), ivd_SysVolLocationToText(), ivd_VolTypeToText(), len, log_DBG_m, log_FUNC_m, m_printHeader, i_UIResultCell_t::num, i_UIResult_t::table, i_UIResultCell_t::text, i_UIResultCell_t::type, uialign_RIGHT, uires_BOOL, uires_DRIVESTATUS, uires_FSTYPE, uires_JOBSTATUS, uires_JOBTYPE, uires_LIBRARYSTATUS, uires_LIBRARYTYPE, uires_MEDIAFAMILYTYPE, uires_MEDIAPOOLTYPE, uires_MEDIATYPE, uires_MEDIUMSTATUS, uires_NA, uires_NUM, uires_PARTITIONACTIVITY, uires_PARTITIONOPTIONS, uires_PARTITIONSTATUS, uires_RAW, uires_SLOTSTATUS, uires_SLOTTYPE, uires_SYSVOLLOCATION, uires_TEXT, uires_VOLTYPE, uires_VOLUMESTATUS, and UTF8_TO_CONSOLE.

Referenced by DisplayResult().

                                                               {
    log_FUNC_m(DisplayTable);
    stringstream strs;

    //for each row find max value
    vector<UInt32_t> maxLength;

    for (UInt32_t j = 0; j < a_res.table.length(); j++) {

        for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++) {

            if ( maxLength.size() < a_res.table[j].row.length() ) {
                log_DBG_m(dbg_DETAIL,"resizing");
                maxLength.resize(a_res.table[j].row.length());
            }

            switch (a_res.table[j].row[k].type ) {
                case(uires_TEXT):
                    {
                        UInt32_t len(strlen(a_res.table[j].row[k].text));
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_NUM):
                    {
                        UInt32_t len((cmn_Num2Str((UInt64_t)a_res.table[j].row[k].num).size()));
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_LIBRARYSTATUS):
                    {
                        UInt32_t len(ivd_LibraryStatusToText(ivd_LibraryStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_SLOTSTATUS):
                    {
                        UInt32_t len(ivd_SlotStatusToText(ivd_SlotStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_DRIVESTATUS):
                    {
                        UInt32_t len(ivd_DriveStatusToText(ivd_DriveStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_MEDIUMSTATUS):
                    {
                        UInt32_t len(ivd_MediumStatusToText(ivd_MediumStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_VOLUMESTATUS):
                    {
                        UInt32_t len(ivd_MediaVolStatusToText(ivd_MediaVolStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;

                case(uires_PARTITIONSTATUS):
                    {
                        UInt32_t len(ivd_PartitionStatusToText(ivd_PartitionStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;

                case(uires_PARTITIONACTIVITY):
                    {
                        UInt32_t len(ivd_PartitionActivityToText(ivd_PartitionActivity_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;

                case(uires_JOBSTATUS):
                    {
                        UInt32_t len(ivd_JobStatusToText(ivd_JobStatus_e(a_res.table[j].row[k].num)).size());
                        if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                 case(uires_LIBRARYTYPE):
                    {
                       UInt32_t len(strlen(ivd_LibraryTypeToText(ivd_LibraryType_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_MEDIAFAMILYTYPE):
                    {
                       UInt32_t len(strlen(ivd_MediaFamilyToText(ivd_MediaFamily_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_MEDIAPOOLTYPE):
                    {
                       UInt32_t len(strlen(ivd_PoolTypeToText(ivd_PoolType_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_SLOTTYPE):
                    {
                       UInt32_t len(strlen(ivd_SlotTypeToText(ivd_SlotType_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;
               case(uires_MEDIATYPE):
                    {
                       UInt32_t len(strlen(ivd_MediaTypeToText(ivd_MediaType_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;

               case(uires_SYSVOLLOCATION):
                    {
                       UInt32_t len(strlen(ivd_SysVolLocationToText(ivd_SysVolLocation_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;
               case(uires_VOLTYPE):
                    {
                       UInt32_t len(strlen(ivd_VolTypeToText(ivd_VolType_e(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;

               case(uires_NA):
                    {
                       UInt32_t len(strlen(ivd_NotApplicableToText()));
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                    }
                    break;

               case(uires_FSTYPE):
                    {
                       UInt32_t len(strlen(ivd_FSTypeToText(GetFSType(a_res.table[j].row[k].num))));
                       if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;
                case(uires_PARTITIONOPTIONS):
                    {
                        UInt32_t len(ivd_PartitionOptionsToText(a_res.table[j].row[k].num).length());
                       if (maxLength[k] < len) {
                            maxLength[k] = len;
                        }
                    }
                    break;

               case(uires_JOBTYPE):
                   {
                       UInt32_t len(ivd_JobTypeToText(ivd_JobType_e(a_res.table[j].row[k].num)).size());
                       if (maxLength[k] < len) {
                           maxLength[k] = len;
                        }
                   }
                   break;

                default:
                    log_DBG_m(dbg_LOW,"Wanted to check unknown type: " << a_res.table[j].row[k].type );

            } // switch (a_res.table[j].row[k].type )
        } // for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++)
    } // for (UInt32_t j = 0; j < a_res.table.length(); j++)

    for (UInt32_t j = 0; j < a_res.table.length(); j++) {
        if ( !a_res.table[j].isHdr || (a_res.table[j].isHdr && m_printHeader)) {
            //NoPrintHeader();
            for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++) {
                const i_UIResultCell_t& cell = a_res.table[j].row[k];

                strs << setw(maxLength[k] + 2);
                switch (cell.type) {
                    case(uires_TEXT):
                        // TODO: I18N - all text UTF8 -> OEM codepage for Windows
                        if (cell.alignment == uialign_RIGHT) {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(cell.text) << "  ";
                            strs << right << cellStr.str();
                        }
                        else {
                            strs << left << UTF8_TO_CONSOLE(cell.text);
                        }

                        break;
                    case(uires_NUM):
                        {
                            ostringstream numStr;
                            numStr << cell.num << "  ";
                            strs << right << numStr.str();
                            break;
                        }
                    case(uires_BOOL):
                        strs << right;
                        (cell.boolVar)
                            ? (strs << "true ")
                            : (strs << "false ");
                        break;

                    case(uires_RAW):
                        //strs << string(cell.raw);
                        // Empty
                        break;
                    case(uires_LIBRARYSTATUS):
                        {
                            ostringstream cellStrA;
                            cellStrA << UTF8_TO_CONSOLE(ivd_LibraryStatusToText((ivd_LibraryStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStrA.str();
                            }
                            else {
                                strs << left << cellStrA.str();
                            }
                        }
                        break;
                    case(uires_SLOTSTATUS):
                         {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(ivd_SlotStatusToText((ivd_SlotStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }

                        break;
                    case(uires_DRIVESTATUS):
                        {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(ivd_DriveStatusToText((ivd_DriveStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionStatusToText((ivd_PartitionStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONACTIVITY):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionActivityToText((ivd_PartitionActivity_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIUMSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediumStatusToText((ivd_MediumStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }

                        break;
                    case(uires_VOLUMESTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediaVolStatusToText((ivd_MediaVolStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_JOBSTATUS):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_JobStatusToText((ivd_JobStatus_e ) cell.num).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_LIBRARYTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_LibraryTypeToText(ivd_LibraryType_e(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIAFAMILYTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediaFamilyToText(ivd_MediaFamily_e(cell.num)))<< "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_MEDIAPOOLTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_PoolTypeToText(ivd_PoolType_e(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_SLOTTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_SlotTypeToText(ivd_SlotType_e(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_MEDIATYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_MediaTypeToText(ivd_MediaType_e(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_SYSVOLLOCATION):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_SysVolLocationToText(ivd_SysVolLocation_e(cell.num)))<< "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_VOLTYPE):
                        {
                            ostringstream cellStr ;
                            log_DBG_m(dbg_NORM, " uires_VOLTYPE VolType: " << cell.num );
                            cellStr << UTF8_TO_CONSOLE(ivd_VolTypeToText(ivd_VolType_e(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_NA):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_NotApplicableToText()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;

                     case(uires_FSTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_FSTypeToText(GetFSType(cell.num))) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    case(uires_PARTITIONOPTIONS):
                        {
                            ostringstream cellStr;
                            cellStr << UTF8_TO_CONSOLE(ivd_PartitionOptionsToText((cell.num)).c_str());
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                     case(uires_JOBTYPE):
                        {
                            ostringstream cellStr ;
                            cellStr << UTF8_TO_CONSOLE(ivd_JobTypeToText(ivd_JobType_e(cell.num)).c_str()) << "  ";
                            if (cell.alignment == uialign_RIGHT) {
                                strs << right << cellStr.str();
                            }
                            else {
                                strs << left << cellStr.str();
                            }
                        }
                        break;
                    default:
                        log_DBG_m(dbg_LOW,"Wanted to check unknown type: " << a_res.table[j].row[k].type );
                } // switch (cell.type)

            } // for (UInt32_t k = 0; k < a_res.table[j].row.length(); k++)

        } // if ( !a_res.table[j].isHdr || (a_res.table[j].isHdr && m_printHeader))
        strs << endl;
    } // for (UInt32_t j = 0; j < a_res.table.length(); j++)

    cout << strs.str();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_UIMessageServer_i::DisplayWarning ( const char *  a_error  ) 

Definition at line 1091 of file i_uims_impl.cpp.

                                                            {
    cerr << "WARNING: " << a_error << endl;
}

void i_UIMessageServer_i::NoPrintHeader (  )  [inline]

Definition at line 60 of file i_uims_impl.h.

                         {
        m_printHeader = false;
    }

void i_UIMessageServer_i::PrintHeader (  )  [inline]

Definition at line 56 of file i_uims_impl.h.

                       {
        m_printHeader = true;
    }

void i_UIMessageServer_i::Remove (  )  [virtual]

Reimplemented from i_Component_i.

Definition at line 1101 of file i_uims_impl.cpp.

                                 {
    //log_FUNC_m(Remove); - causes assertion failure on windows
    i_Component_i::Remove();
}

void i_UIMessageServer_i::SetDetail (  )  [inline]

Definition at line 64 of file i_uims_impl.h.

                     {
        m_detail = true;
    }


Member Data Documentation

Reimplemented from i_Component_i.

Definition at line 85 of file i_uims_impl.h.

Definition at line 83 of file i_uims_impl.h.

Referenced by DisplayResult().

Definition at line 82 of file i_uims_impl.h.

Referenced by DisplayTable().

Definition at line 81 of file i_uims_impl.h.


The documentation for this class was generated from the following files: