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


C++ CContainer类代码示例

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


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

示例1: TabBackingProcStub

LRESULT CALLBACK TabBackingProcStub(HWND hwnd,UINT uMsg,
WPARAM wParam,LPARAM lParam,UINT_PTR uIdSubclass,DWORD_PTR dwRefData)
{
	CContainer *pContainer = (CContainer *)dwRefData;

	return pContainer->TabBackingProc(hwnd,uMsg,wParam,lParam);
}
开发者ID:yellowbigbird,项目名称:bird-self-lib,代码行数:7,代码来源:TabBackingHandler.cpp

示例2: BookmarksToolbarSubclassStub

LRESULT CALLBACK BookmarksToolbarSubclassStub(HWND hwnd,UINT uMsg,
WPARAM wParam,LPARAM lParam,UINT_PTR uIdSubclass,DWORD_PTR dwRefData)
{
	CContainer *pContainer = (CContainer *)dwRefData;

	return pContainer->BookmarksToolbarSubclass(hwnd,uMsg,wParam,lParam);
}
开发者ID:yellowbigbird,项目名称:bird-self-lib,代码行数:7,代码来源:BookmarkHandler.cpp

示例3: ADDTOCALLSTACK

TRIGRET_TYPE CContainer::OnContTriggerForLoop( CScript &s, CTextConsole * pSrc, CScriptTriggerArgs * pArgs, CGString * pResult, CScriptLineContext & StartContext, CScriptLineContext & EndContext, RESOURCE_ID_BASE rid, DWORD dwArg, int iDecendLevels )
{
	ADDTOCALLSTACK("CContainer::OnContTriggerForLoop");
	if ( rid.GetResIndex() != 0 )
	{
		CItem* pItem = GetContentHead();
		CItem * pItemNext;
		for ( ; pItem!=NULL; pItem=pItemNext)
		{
			pItemNext = pItem->GetNext();
			
			if ( pItem->IsResourceMatch( rid, dwArg ))
			{
				s.SeekContext( StartContext );
				TRIGRET_TYPE iRet = pItem->OnTriggerRun( s, TRIGRUN_SECTION_TRUE, pSrc, pArgs, pResult );
				if ( iRet == TRIGRET_BREAK )
				{
					EndContext = StartContext;
					break;
				}
 				if (( iRet != TRIGRET_ENDIF ) && ( iRet != TRIGRET_CONTINUE ))
					return( iRet );
				if ( iRet == TRIGRET_CONTINUE )
					EndContext = StartContext;
				else
					EndContext = s.GetContext();
			}
			if ( iDecendLevels <= 0 )
				continue;
			CItemContainer * pCont = dynamic_cast <CItemContainer*>(pItem);
			if ( pCont != NULL )
			{
				if ( pCont->IsSearchable())
				{
					CContainer * pContBase = dynamic_cast <CContainer *> (pCont);
					TRIGRET_TYPE iRet = pContBase->OnContTriggerForLoop( s, pSrc, pArgs, pResult, StartContext, EndContext, rid, dwArg, iDecendLevels-1 );
					if ( iRet != TRIGRET_ENDIF )
					{
						return( iRet );
					}

					// Since the previous call has already found the EndContext, set it.
					EndContext = s.GetContext();
				}
			}
		}
	}
	if ( EndContext.m_lOffset <= StartContext.m_lOffset )
	{
		CScriptObj * pScript = dynamic_cast <CScriptObj *> (this);
		TRIGRET_TYPE iRet = pScript->OnTriggerRun( s, TRIGRUN_SECTION_FALSE, pSrc, pArgs, pResult );
		if ( iRet != TRIGRET_ENDIF )
			return( iRet );
	}
	else
		s.SeekContext( EndContext );
	return( TRIGRET_ENDIF );
}
开发者ID:greeduomacro,项目名称:Source,代码行数:58,代码来源:CContain.cpp

示例4: IdentificationCompletedCallback

void CContainer::IdentificationCompletedCallback(TTankIndex Tank, TGenericCockie Cockie)
{
    CContainer *InstancePtr = reinterpret_cast<CContainer *>(Cockie);

    // Erase the callback pointers after callback was done.
    InstancePtr->SetIdentificationCompletedCallback(Tank, NULL, NULL);

    InstancePtr->m_TanksArray[Tank]->SetEventIdentificationCompletion();
}
开发者ID:SlavaC1,项目名称:ControlSW,代码行数:9,代码来源:Container.cpp

示例5: GetCellValue

void CGraphPlugIn::GetCellValue(cell c, char *s)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		cnt->GetCellResult(c, s, true);
	}
	catch(...){}
} // CGraphPlugIn::GetCellValue
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:11,代码来源:GraphPlugIn.cpp

示例6: CommandID

ret_ CNetworkHandle::OnMessage(const ub_1 *pMsg,
                               size_ nSize,
                               const TMsgInfo *pMsgInfo)
{
#ifdef _DEBUG_
    if (!pMsg)
        return PARAMETER_NULL | PARAMETER_1;

    if (0 == nSize)
        return PARAMETER_ERROR | PARAMETER_2;

    if (!pMsgInfo)
        return PARAMETER_NULL | PARAMETER_3;
#endif

    CNetworkConf *pConf = (CNetworkConf *)GetConf();

#ifdef _DEBUG_
    if (!pConf)
        return NO_ELEMENT_IN_CONTAINER;
#endif

    CPDUInfo *pPDUInfo = null_v;

    try
    {
        v_ CommandID((size_ *)(pMsg +
                               pConf->GetCommandID()->Offset(pMsg, nSize)));
        ret_ Ret = pConf->IdentifyID(CommandID, pPDUInfo, DIRECTION_IN);

        if (SUCCESS != Ret)
            return Ret;
    }
    catch (error_code err)
    {
        return err;
    }

    TMU tmu;

    tmu.pPDUInfo = pPDUInfo;
    tmu.pMessage = (ub_1 *)pMsg;
    tmu.nSize = nSize;
    tmu.pMsgInfo = (TMsgInfo *)pMsgInfo;

    CContainer *pContainer = CUIManager::Instance()->GetCurContainer();

    if (pContainer)
        pContainer->OnMessage(&tmu);

    return SUCCESS;
}
开发者ID:shoutrain,项目名称:ComEgg,代码行数:52,代码来源:CNetworkHandle.cpp

示例7: Work

void COptEnable::Work(const TMU *pTMU)
{
	CContainer *pContainer = CUIManager::Instance()->GetCurContainer();

	if (!pContainer)
		throw WINDOW_IS_NOT_EXIST;

	CWindow * pWindow = pContainer->GetChild(m_szWindowName);

	if (pWindow)
		pWindow->Enable(m_bIsEnable);
	else
		pContainer->Enable(m_bIsEnable);
}
开发者ID:shoutrain,项目名称:ComEgg,代码行数:14,代码来源:COptEnable.cpp

示例8: Work

void COptWaitMessage::Work(const TMU *pTMU)
{
	CPDUInfo *pPDUInfo = null_v;

	if (SUCCESS != CProtocolManager::Instance()->GetProtocol()->GetPDU(
			m_szMessageName, pPDUInfo))
	{
		throw OPERATOR_OPERAITON_ERROR;
	}

	CContainer *pContainer = CUIManager::Instance()->GetCurContainer();

	if (pContainer)
		pContainer->WaitMessage(pPDUInfo);
	else
		throw OPERATOR_OPERAITON_ERROR;
}
开发者ID:shoutrain,项目名称:ComEgg,代码行数:17,代码来源:COptWaitMessage.cpp

示例9: GetCellTime

bool CGraphPlugIn::GetCellTime(cell c, time_t *t)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eTimeData)
		{
			*t = v.fTime;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellTime */
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:18,代码来源:GraphPlugIn.cpp

示例10: GetCellDouble

bool CGraphPlugIn::GetCellDouble(cell c, double *d)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eNumData)
		{
			*d = v.fDouble;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellDouble */
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:18,代码来源:GraphPlugIn.cpp

示例11: GetCellText

bool CGraphPlugIn::GetCellText(cell c, char *s)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eTextData)
		{
			strcpy(s, v.fText);
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellText */
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:18,代码来源:GraphPlugIn.cpp

示例12: GetCellBool

bool CGraphPlugIn::GetCellBool(cell c, bool *b)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);

		Value v;
		if (cnt->GetValue(c, v) && v.fType == eBoolData)
		{
			*b = v.fBool;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellBool */
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:19,代码来源:GraphPlugIn.cpp

示例13: getParent

void CRadioBox::performGroupStateChanged()
{
    CContainer *pParentContainer = NULL;
    CCNode *pParent = getParent();
    while( pParent != NULL )
    {
        CContainer *pContainer = dynamic_cast<CContainer *>(pParent);
        if( pContainer != NULL && pContainer->getIsForm() )
        {
            pParentContainer = pContainer;
            break;
        }
        pParent = pParent->getParent();
    }
    
    if(pParentContainer == NULL)
        return;
    
    
}
开发者ID:jindaw,项目名称:game_sources,代码行数:20,代码来源:RadioBox.cpp

示例14: ADDTOCALLSTACK

void CCPropsItemChar::SetPropertyNum(int iPropIndex, PropertyValNum_t iVal, CObjBase* pLinkedObj, RESDISPLAY_VERSION iLimitToExpansion, bool fDeleteZero)
{
    ADDTOCALLSTACK("CCPropsItemChar::SetPropertyNum");
    ASSERT(!IsPropertyStr(iPropIndex));
    ASSERT((iLimitToExpansion >= RDS_PRET2A) && (iLimitToExpansion < RDS_QTY));

    if ((fDeleteZero && (iVal == 0)) || (_iPropertyExpansion[iPropIndex] > iLimitToExpansion))
    {
        if (0 == _mPropsNum.erase(iPropIndex))
            return; // I didn't have this property, so avoid further processing.
    }
    else
        _mPropsNum[iPropIndex] = iVal;

    if (!pLinkedObj)
        return;

    // Do stuff to the pLinkedObj
    switch (iPropIndex)
    {
        case PROPITCH_WEIGHTREDUCTION:
        {
            CItem *pItemLink = static_cast<CItem*>(pLinkedObj);
            int oldweight = pItemLink->GetWeight();
            CContainer * pCont = dynamic_cast <CContainer*> (pItemLink->GetParent());
            if (pCont)
            {
                ASSERT(pItemLink->IsItemEquipped() || pItemLink->IsItemInContainer());
                pCont->OnWeightChange(pItemLink->GetWeight() - oldweight);
                pLinkedObj->UpdatePropertyFlag();
            }
            break;
        }

        //default:
        //    pLinkedObj->UpdatePropertyFlag();
        //    break;
    }
}
开发者ID:Sphereserver,项目名称:Source2,代码行数:39,代码来源:CCPropsItemChar.cpp

示例15: ADDTOCALLSTACK

void CClient::Cmd_EditItem( CObjBase *pObj, int iSelect )
{
	ADDTOCALLSTACK("CClient::Cmd_EditItem");
	// ARGS:
	//   iSelect == -1 = setup.
	//   m_Targ_Text = what are we doing to it ?
	//
	if ( !pObj )
		return;

	CContainer *pContainer = dynamic_cast<CContainer *>(pObj);
	if ( !pContainer )
	{
		addGumpDialogProps(pObj->GetUID());
		return;
	}

	if ( iSelect == 0 )		// cancelled
		return;

	if ( iSelect > 0 )		// we selected an item
	{
		if ( static_cast<size_t>(iSelect) >= COUNTOF(m_tmMenu.m_Item) )
			return;

		if ( m_Targ_Text.IsEmpty() )
			addGumpDialogProps(m_tmMenu.m_Item[static_cast<size_t>(iSelect)]);
		else
			OnTarg_Obj_Set(CGrayUID(m_tmMenu.m_Item[static_cast<size_t>(iSelect)]).ObjFind());
		return;
	}
	
	CMenuItem item[minimum(COUNTOF(m_tmMenu.m_Item), MAX_MENU_ITEMS)];	// Most as we want to display at one time.
	item[0].m_sText.Format("Contents of %s", pObj->GetName());

	size_t count = 0;
	for ( CItem *pItem = pContainer->GetContentHead(); pItem != NULL; pItem = pItem->GetNext() )
	{
		count++;
		m_tmMenu.m_Item[count] = pItem->GetUID();
		item[count].m_sText = pItem->GetName();
		ITEMID_TYPE idi = pItem->GetDispID();
		item[count].m_id = static_cast<WORD>(idi);
		item[count].m_color = 0;

		if ( !pItem->IsType(IT_EQ_MEMORY_OBJ) )
		{
			HUE_TYPE wHue = pItem->GetHue();
			if ( wHue != 0 )
			{
				wHue = (wHue == 1 ? 0x7FF : wHue - 1);
				item[count].m_color = wHue;
			}
		}

		if ( count >= (COUNTOF(item) - 1) )
			break;
	}
	
	ASSERT(count < COUNTOF(item));
	addItemMenu(CLIMODE_MENU_EDIT, item, count, pObj);
}
开发者ID:Sphereserver,项目名称:Source,代码行数:62,代码来源:CClientUse.cpp


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