当前位置: 首页>>代码示例>>C++>>正文


C++ CBaseEntityTA::GetID方法代码示例

本文整理汇总了C++中CBaseEntityTA::GetID方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseEntityTA::GetID方法的具体用法?C++ CBaseEntityTA::GetID怎么用?C++ CBaseEntityTA::GetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBaseEntityTA的用法示例。


在下文中一共展示了CBaseEntityTA::GetID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RepositionSubEntity

/******************************************************************************
Function Name  :  RepositionSubEntity
Input(s)       :  CBaseEntityTA* pouRefSubEntity
                  CBaseEntityTA* pouCurrSubEntity
Output         :  HRESULT - returns the New Entity ID
Functionality  :  Reposition pouRefSubEntity after pouCurrSubEntity
Member of      :  CTestCaseEntity
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  06/04/2011
Modifications  :  
Codetag        :  CS021
******************************************************************************/
HRESULT CTestCaseEntity::RepositionSubEntity(CBaseEntityTA* pouRefSubEntity, CBaseEntityTA* pouCurrSubEntity)
{
    //DESIGN:: First Take copy of Data and delete it from current position and add at required place 
    UINT unCount = (UINT)m_ouData.m_odTAEntityList.GetCount();
    for(UINT i=0; i<unCount; i++)
    {
        POSITION pos = m_ouData.m_odTAEntityList.FindIndex(i);
        CBaseEntityTA* pEntity = m_ouData.m_odTAEntityList.GetAt(pos);
        if(pEntity->GetID() == pouRefSubEntity->GetID())
        {
            m_ouData.m_odTAEntityList.RemoveAt(pos);
            break;
        }
    }
    if(pouCurrSubEntity == NULL)        //Insert At First Index;
    {
        m_ouData.m_odTAEntityList.AddHead(pouRefSubEntity);
    }
    
    else
    {
        for(UINT i=0; i<unCount; i++)
        {
            POSITION pos = m_ouData.m_odTAEntityList.FindIndex(i);
            CBaseEntityTA* pEntity = m_ouData.m_odTAEntityList.GetAt(pos);
            if(pEntity->GetID() == pouCurrSubEntity->GetID())
            {
                m_ouData.m_odTAEntityList.InsertAfter(pos, pouRefSubEntity);
                break;
            }
        }
    }
    return pouRefSubEntity->GetID();
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:47,代码来源:TestCaseEntity.cpp

示例2: bParseTestSetup

/******************************************************************************
Function Name  :  bParseTestSetup
Input(s)       :  INT nIndex
Output         :  BOOL
Functionality  :  Loads The
Member of      :  CTSExecutorChildFrame
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  07/04/2011
Modifications  :
Code Tag       :
******************************************************************************/
BOOL CTSExecutorChildFrame::bParseTestSetup(INT nIndex)
{
    BOOL bResult = FALSE;
    STestSetupInfo sTSInfo;

    if( m_ouTSExecutor.GetTestSetupInfo(nIndex, sTSInfo) == S_OK)
    {
        HTREEITEM hTSItem = m_odTreeView->InsertTreeItem(m_hParentTreeItem, sTSInfo.m_omstrName, NULL, def_INDEX_TESTSETUPIMAGE,
                            def_INDEX_TESTSETUPIMAGE, sTSInfo.m_dwID);
        m_odTreeView->GetTreeCtrl().SetCheck(hTSItem, sTSInfo.m_bEnable);

        for(INT i = 0; i < sTSInfo.m_nTCCount; i++)
        {
            CBaseEntityTA* pouTCData;
            CTestCaseData ouTCData;

            if(m_ouTSExecutor.GetTestCaseInfo(sTSInfo.m_dwID, i, &pouTCData) == S_OK)
            {
                pouTCData->GetEntityData(TEST_CASE, &ouTCData);
                HTREEITEM hTCItem =  m_odTreeView->InsertTreeItem(hTSItem, ouTCData.m_omTitle, NULL, def_INDEX_TESTCASEIMAGE,
                                     def_INDEX_TESTCASEIMAGE, pouTCData->GetID());
                m_odTreeView->GetTreeCtrl().SetCheck(hTCItem, pouTCData->bGetEnableStatus());
            }
        }

        bResult = TRUE;
    }

    return bResult;
}
开发者ID:Ferrere,项目名称:busmaster,代码行数:42,代码来源:TSExecutorGUI_ChildFrame.cpp

示例3: DeleteSubEntry

/******************************************************************************
Function Name  :  DeleteSubEntry
Input(s)       :  CBaseEntityTA* pouSubEntryObj
Output         :  HRESULT
Functionality  :  Deletes a Subentry 
Member of      :  CTestCaseEntity
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  06/04/2011
Modifications  :  
Codetag        :  CS018
******************************************************************************/
HRESULT CTestCaseEntity::DeleteSubEntry(CBaseEntityTA* pouSubEntryObj)
{
    HRESULT hResult  = S_FALSE;
    INT nCount = (INT)m_ouData.m_odTAEntityList.GetCount();
    for(int i = 0; i < nCount; i++)
    {
        POSITION pos = m_ouData.m_odTAEntityList.FindIndex(i);
        CBaseEntityTA *pEntity = m_ouData.m_odTAEntityList.GetAt(pos);
        if(pEntity->GetID() == pouSubEntryObj->GetID())
        {
            m_ouData.m_odTAEntityList.RemoveAt(pos);
            hResult = S_OK;
            break;
        }
    }
    return hResult;
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:29,代码来源:TestCaseEntity.cpp


注:本文中的CBaseEntityTA::GetID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。