Public Member Functions | Private Member Functions | Private Attributes

pm_FileList Class Reference
[Partition Manager]

#include <pm.h>

List of all members.

Public Member Functions

 pm_FileList (const pm_FileList &a_fileList)
 pm_FileList (const i_JobRequestList_t &a_fileList)
i_JobRequestList_tConvertToCorba ()
UInt64_t GetListSize ()
UInt32_t NumOfFiles ()

Private Member Functions

void CalcSize ()

Private Attributes

pm_FileList_v m_fileList
ivd_FileSize_t m_listfSize
 log_CLASSID_m

Detailed Description

Definition at line 72 of file pm.h.


Constructor & Destructor Documentation

pm_FileList::pm_FileList ( const pm_FileList a_fileList  ) 

Definition at line 46 of file pm_filelist.cpp.

References CalcSize(), log_FUNC_m, and m_fileList.

Here is the call graph for this function:

pm_FileList::pm_FileList ( const i_JobRequestList_t a_fileList  ) 

Definition at line 55 of file pm_filelist.cpp.

References CalcSize(), dbg_DETAIL, dbg_NORM, file, pm_File_t::fileIdx, pm_File_t::fSize, ie_DATA_CORRUPTION, log_DBG_m, log_FUNC_m, and m_fileList.

    : m_listfSize(0) {

    log_FUNC_m(pm_FileList);

    if (a_fileList.length() == 0) {
        throw ivd_InternalError(ie_DATA_CORRUPTION, "File List is empty");
    }

    for (UInt32_t i = 0; i < a_fileList.length(); i++){
        pm_File_t file;
        file.fileIdx    = a_fileList[i].fileIdx;
        file.fSize      = a_fileList[i].fSize;

        m_fileList.push_back(file);
        log_DBG_m(dbg_DETAIL,
            "iFile:  [" <<
            a_fileList[i].fileIdx <<  "]  "  << " : " << a_fileList[i].fSize
        );
    }

    CalcSize();
    log_DBG_m(dbg_NORM, "m_fileList length is  " << m_fileList.size());
}

Here is the call graph for this function:


Member Function Documentation

void pm_FileList::CalcSize (  )  [private]

Definition at line 114 of file pm_filelist.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, m_fileList, and m_listfSize.

Referenced by pm_FileList().

                          {
    log_FUNC_m(CalcSize);

    m_listfSize = 0;
    for (UInt32_t i = 0 ; i < m_fileList.size(); i++){
        m_listfSize += m_fileList[i].fSize;
    }
    m_listfSize += m_fileList.size() * 1024;
    log_DBG_m(dbg_DETAIL,"Size of List is " << m_listfSize);
}

Here is the caller graph for this function:

i_JobRequestList_t * pm_FileList::ConvertToCorba (  ) 

Definition at line 90 of file pm_filelist.cpp.

References dbg_NORM, i_JobRequest_t::fileID, i_JobRequest_t::fileIdx, i_JobRequest_t::fSize, log_DBG_m, log_FUNC_m, and m_fileList.

Referenced by i_MigrationJob_i::CompleteJob(), i_MigrationJob_i::Execute(), and i_MigrationJob_i::GetFiles().

                                                {
    log_FUNC_m(ConvertToCorba);

    i_JobRequestList_t_var iFileList(new i_JobRequestList_t(m_fileList.size()));
    iFileList->length(m_fileList.size());
    log_DBG_m(dbg_NORM,"Coverting fileList of " << m_fileList.size() << " elements");

    for(UInt32_t i = 0; i < iFileList->length(); i++){
        i_JobRequest_t iFile;
        iFile.fileID    = 0;
        iFile.fileIdx   = m_fileList[i].fileIdx;
        iFile.fSize     = m_fileList[i].fSize;
        iFileList[i]    = iFile;
    }
    log_DBG_m(dbg_NORM,"Created CORBA::sequence with " << iFileList->length() << " elements" );

    return iFileList._retn();
}

Here is the caller graph for this function:

UInt64_t pm_FileList::GetListSize (  ) 

Definition at line 110 of file pm_filelist.cpp.

References m_listfSize.

Referenced by i_MigrationJob_i::Execute().

                                 {
    return m_listfSize;
}

Here is the caller graph for this function:

UInt32_t pm_FileList::NumOfFiles (  ) 

Definition at line 86 of file pm_filelist.cpp.

References m_fileList.

Referenced by i_MigrationJob_i::i_MigrationJob_i().

                                 {
    return m_fileList.size();
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 89 of file pm.h.

Definition at line 86 of file pm.h.

Referenced by CalcSize(), ConvertToCorba(), NumOfFiles(), and pm_FileList().

Definition at line 87 of file pm.h.

Referenced by CalcSize(), and GetListSize().


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