Public Member Functions | Public Attributes | Protected Attributes | Private Attributes

mif_VolStatus Class Reference

#include <i_mediumdupl_impl.h>

List of all members.

Public Member Functions

 mif_VolStatus ()
void SetNumOfVol (UInt32_t a_numOfVol)
void SourceVolRead (bool a_succeeded)
bool SourceVolRead (UInt32_t a_num)
void TargetVolWrite (bool a_succeeded)
UInt32_t GetCurrentSourceVol ()
UInt32_t GetCurrentTargetVol ()
UInt32_t GetNumOfVol ()
bool SourceFinished ()
bool TargetFinished ()
bool AllSuccess ()

Public Attributes

 log_CLASSID_m

Protected Attributes

vector< bool > m_sourceVolRead
vector< bool > m_targetVolWrite

Private Attributes

UInt32_t m_numOfVol
UInt32_t m_currentSourceVol
bool m_sourceFinished
UInt32_t m_currentTargetVol
bool m_targetFinished
bool m_allSuccess

Detailed Description

Definition at line 41 of file i_mediumdupl_impl.h.


Constructor & Destructor Documentation

mif_VolStatus::mif_VolStatus (  ) 

Member Function Documentation

bool mif_VolStatus::AllSuccess (  ) 

Definition at line 151 of file mif_volstatus.cpp.

References m_allSuccess.

Referenced by i_MediumDupl_i::MediumOperationComplete().

                              {
    return m_allSuccess;
}

Here is the caller graph for this function:

UInt32_t mif_VolStatus::GetCurrentSourceVol (  ) 

Definition at line 121 of file mif_volstatus.cpp.

References dbg_NORM, log_DBG_m, log_FUNC_m, m_currentSourceVol, m_sourceFinished, and m_sourceVolRead.

Referenced by i_MediumDupl_i::MediumOperationComplete(), and i_MediumDupl_i::Process().

                                           { 
    log_FUNC_m(GetCurrentSourceVol);
    log_DBG_m(dbg_NORM, 
        "m_currentSourceVol:" << m_currentSourceVol <<
        " m_sourceFinished:" << boolalpha << m_sourceFinished <<
        " m_sourceVolRead.size():" << m_sourceVolRead.size() );

    return m_currentSourceVol; 
}

Here is the caller graph for this function:

UInt32_t mif_VolStatus::GetCurrentTargetVol (  ) 

Definition at line 131 of file mif_volstatus.cpp.

References dbg_NORM, log_DBG_m, log_FUNC_m, m_currentTargetVol, m_targetFinished, and m_targetVolWrite.

Referenced by i_MediumDupl_i::Execute(), i_MediumDupl_i::MediumOperationComplete(), and i_MediumDupl_i::Process().

                                           { 
    log_FUNC_m(GetCurrentTargetVol);
    log_DBG_m(dbg_NORM, "m_currentTargetVol:" << m_currentTargetVol <<
        " m_targetFinished:" << boolalpha << m_targetFinished <<
        " m_targetVolWrite.size():" << m_targetVolWrite.size() );

    return m_currentTargetVol; 
}

Here is the caller graph for this function:

UInt32_t mif_VolStatus::GetNumOfVol (  )  [inline]

Definition at line 56 of file i_mediumdupl_impl.h.

References m_numOfVol.

Referenced by i_MediumDupl_i::Process().

                          {
        return m_numOfVol;
    };

Here is the caller graph for this function:

void mif_VolStatus::SetNumOfVol ( UInt32_t  a_numOfVol  ) 

Definition at line 56 of file mif_volstatus.cpp.

References log_FUNC_m, m_numOfVol, m_sourceVolRead, and m_targetVolWrite.

Referenced by i_MediumDupl_i::i_MediumDupl_i().

                                                   {
    log_FUNC_m(SetNumOfVol);
    m_numOfVol = a_numOfVol;
    for (UInt32_t i(0); i < m_numOfVol; i++){
        m_sourceVolRead.push_back(false);
        m_targetVolWrite.push_back(false);
    }        
}

Here is the caller graph for this function:

bool mif_VolStatus::SourceFinished (  ) 

Definition at line 140 of file mif_volstatus.cpp.

References log_FUNC_m, and m_sourceFinished.

Referenced by i_MediumDupl_i::MediumOperationComplete().

Here is the caller graph for this function:

void mif_VolStatus::SourceVolRead ( bool  a_succeeded  ) 

Definition at line 65 of file mif_volstatus.cpp.

References dbg_NORM, ie_FATAL_ERROR, log_DBG_m, log_FUNC_m, m_allSuccess, m_currentSourceVol, m_sourceFinished, and m_sourceVolRead.

Referenced by i_MediumDupl_i::Execute(), i_MediumDupl_i::MediumOperationComplete(), and i_MediumDupl_i::Process().

                                                 {
    log_FUNC_m(SourceVolRead);

    log_DBG_m(dbg_NORM, "m_currentSourceVol:" << m_currentSourceVol <<
                        " m_sourceFinished:" << boolalpha << m_sourceFinished <<
                        " m_sourceVolRead.size():" << m_sourceVolRead.size() );

    if (m_currentSourceVol > m_sourceVolRead.size()){
        throw ivd_InternalError(ie_FATAL_ERROR);
    }
    m_sourceVolRead[m_currentSourceVol - 1] = a_succeeded;

    if (!a_succeeded)
        m_allSuccess = false;

    if (m_currentSourceVol < m_sourceVolRead.size()) {
        m_currentSourceVol++;
    }
    else
        m_sourceFinished = true;

    log_DBG_m(dbg_NORM, "m_currentSourceVol:" << m_currentSourceVol <<
                        " m_sourceFinished:" << boolalpha << m_sourceFinished <<
                        " m_sourceVolRead.size():" << m_sourceVolRead.size() );


}

Here is the caller graph for this function:

bool mif_VolStatus::SourceVolRead ( UInt32_t  a_num  ) 

Definition at line 93 of file mif_volstatus.cpp.

References ie_FATAL_ERROR, and m_sourceVolRead.

                                               {
    if ((a_num > m_sourceVolRead.size()) || (a_num == 0)){
        throw ivd_InternalError(ie_FATAL_ERROR, "Accessing unexisting element");
    }
    return m_sourceVolRead[a_num - 1];
}

bool mif_VolStatus::TargetFinished (  ) 

Definition at line 146 of file mif_volstatus.cpp.

References log_FUNC_m, and m_targetFinished.

Referenced by i_MediumDupl_i::MediumOperationComplete().

Here is the caller graph for this function:

void mif_VolStatus::TargetVolWrite ( bool  a_succeeded  ) 

Definition at line 100 of file mif_volstatus.cpp.

References dbg_NORM, ie_FATAL_ERROR, log_DBG_m, log_FUNC_m, m_allSuccess, m_currentTargetVol, m_targetFinished, and m_targetVolWrite.

Referenced by i_MediumDupl_i::MediumOperationComplete().

                                                  {
    log_FUNC_m(TargetVolWrite);
    log_DBG_m(dbg_NORM, "m_currentTargetVol:" << m_currentTargetVol <<
                        " m_targetFinished:" << boolalpha << m_targetFinished <<
                        " m_targetVolWrite.size():" << m_targetVolWrite.size() );

    if (m_currentTargetVol > m_targetVolWrite.size()){
        throw ivd_InternalError(ie_FATAL_ERROR);
    }
    m_targetVolWrite[m_currentTargetVol - 1] = a_succeeded;

    if (!a_succeeded)
        m_allSuccess = false;

    if (m_currentTargetVol < m_targetVolWrite.size()) {
        m_currentTargetVol++;
    } 
    else
        m_targetFinished = true;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 43 of file i_mediumdupl_impl.h.

Definition at line 71 of file i_mediumdupl_impl.h.

Referenced by AllSuccess(), SourceVolRead(), and TargetVolWrite().

Definition at line 66 of file i_mediumdupl_impl.h.

Referenced by GetCurrentSourceVol(), and SourceVolRead().

Definition at line 68 of file i_mediumdupl_impl.h.

Referenced by GetCurrentTargetVol(), and TargetVolWrite().

Definition at line 65 of file i_mediumdupl_impl.h.

Referenced by GetNumOfVol(), and SetNumOfVol().

Definition at line 67 of file i_mediumdupl_impl.h.

Referenced by GetCurrentSourceVol(), SourceFinished(), and SourceVolRead().

Definition at line 74 of file i_mediumdupl_impl.h.

Referenced by GetCurrentSourceVol(), SetNumOfVol(), and SourceVolRead().

Definition at line 69 of file i_mediumdupl_impl.h.

Referenced by GetCurrentTargetVol(), TargetFinished(), and TargetVolWrite().

Definition at line 75 of file i_mediumdupl_impl.h.

Referenced by GetCurrentTargetVol(), SetNumOfVol(), and TargetVolWrite().


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