• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ sharedList函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: locker

void QBSoundWin::stopAll()
{
//printf("stopAll\n");
	QBSoundLocker locker(&mMutex);
#ifdef __USE_OGG_VORBIS__
  {
    PlayerList::iterator it = streamTrack.begin();
    while(it != streamTrack.end()) {
      delete (*it).second;
      ++it;
    }
    streamTrack.clear();
  }
  {
    EffectList::iterator it = sharedList().begin();
    while(it != sharedList().end())
    {
      delete (*it).second;
      ++it;
    }
    sharedList().clear();
  }
#endif
	return QBSound::stopAll();
}
开发者ID:yamagame,项目名称:PicoPicoGameEngine,代码行数:25,代码来源:QBSoundWin.cpp


示例2: setEffectsVolume

void SimpleAudioEngine::setEffectsVolume(float volume)
{
    EffectList::iterator iter;
    for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
    {
        iter->second->SetVolume(int(volume * 100));
    }
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:8,代码来源:SimpleAudioEngine.cpp


示例3: sharedList

void SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
{
    EffectList::iterator p = sharedList().find(nSoundId);
    if (p != sharedList().end())
    {
        p->second->Resume();
    }
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:8,代码来源:SimpleAudioEngine.cpp


示例4: stopAllEffects

void SimpleAudioEngine::stopAllEffects()
{
    EffectList::iterator iter;
    for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
    {
        iter->second->Stop();
    }
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:8,代码来源:SimpleAudioEngine.cpp


示例5: sharedList

float SimpleAudioEngine::getEffectsVolume()
{
    EffectList::iterator iter;
    iter = sharedList().begin();
    if (iter != sharedList().end())
    {
        return float(iter->second->GetVolume()) / 100.f;
    }
}
开发者ID:0309,项目名称:cocos2d-x,代码行数:9,代码来源:SimpleAudioEngine.cpp


示例6: _Hash

void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
    unsigned int nID = _Hash(pszFilePath);

    EffectList::iterator p = sharedList().find(nID);
    if (p != sharedList().end())
    {
        delete p->second;
        p->second = nullptr;
        sharedList().erase(nID);
    }
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:12,代码来源:SimpleAudioEngine.cpp


示例7: sharedMusic

void SimpleAudioEngine::end()
{
    sharedMusic().Close();

    for (auto& iter : sharedList())
    {
        delete iter.second;
        iter.second = nullptr;
    }
    sharedList().clear();
    return;
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:12,代码来源:SimpleAudioEngine.cpp


示例8: sharedMusic

void SimpleAudioEngine::end()
{
    sharedMusic().Close();

    EffectList::iterator p = sharedList().begin();
    while (p != sharedList().end())
    {
        delete p->second;
        p->second = NULL;
        p++;
    }
    sharedList().clear();
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:13,代码来源:SimpleAudioEngine.cpp


示例9: _Hash

unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop)
{
    unsigned int nRet = _Hash(pszFilePath);

    preloadEffect(pszFilePath);

    EffectList::iterator p = sharedList().find(nRet);
    if (p != sharedList().end())
    {
        p->second->Play((bLoop) ? -1 : 1);
    }

    return nRet;
}
开发者ID:wenhulove333,项目名称:ScutServer,代码行数:14,代码来源:SimpleAudioEngine.cpp


示例10: _Hash

bool SimpleAudioEngine::isEffectPlaying(const char* pszFilePath)
{
    unsigned int nRet = _Hash(pszFilePath);

	bool result = false;

    EffectList::iterator p = sharedList().find(nRet);
    if (p != sharedList().end())
    {
        return p->second->IsPlaying();
    }

    return result;
}
开发者ID:XoDeR,项目名称:RioEngine,代码行数:14,代码来源:SimpleAudioEngine.cpp


示例11: _Hash

unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop/* = false*/,
        float pitch/* = 1.0f*/, float pan/* = 0.0f*/, float gain/* = 1.0f*/)
{
    unsigned int nRet = _Hash(pszFilePath);

    preloadEffect(pszFilePath);

    EffectList::iterator p = sharedList().find(nRet);
    if (p != sharedList().end())
    {
        p->second->Play(bLoop);
    }

    return nRet;
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:15,代码来源:SimpleAudioEngine.cpp


示例12: resumeAllEffects

void SimpleAudioEngine::resumeAllEffects()
{
    for (auto& iter : sharedList())
    {
        iter.second->Resume();
    }
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp


示例13: pauseAllEffects

void SimpleAudioEngine::pauseAllEffects()
{
    for (auto& iter : sharedList())
    {
        iter.second->Pause();
    }
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp


示例14: stopAllEffects

void SimpleAudioEngine::stopAllEffects()
{
    for (auto& iter : sharedList())
    {
        iter.second->Stop();
    }
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp


示例15: BREAK_IF

void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
{
    int nRet = 0;
    do 
    {
        BREAK_IF(! pszFilePath);

        nRet = _Hash(pszFilePath);

        BREAK_IF(sharedList().end() != sharedList().find(nRet));

        sharedList().insert(Effect(nRet, new MciPlayer()));
        MciPlayer * pPlayer = sharedList()[nRet];
        pPlayer->Open(_FullPath(pszFilePath), nRet);

        BREAK_IF(nRet == pPlayer->GetSoundID());

        sharedList().erase(nRet);
        nRet = 0;
    } while (0);
}
开发者ID:XoDeR,项目名称:RioEngine,代码行数:21,代码来源:SimpleAudioEngine.cpp


示例16: _Hash

void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
    unsigned int nID = _Hash(pszFilePath);
    sharedList().erase(nID);
}
开发者ID:bartholomule,项目名称:redneckracer,代码行数:5,代码来源:SimpleAudioEngine.cpp


示例17: nameMatches

void OXMLi_ListenerState_Numbering::endElement (OXMLi_EndElementRequest * rqst)
{
	if (
		nameMatches(rqst->pName, NS_W_KEY, "numbering") ||
		nameMatches(rqst->pName, NS_W_KEY, "abstractNum") ||
		nameMatches(rqst->pName, NS_W_KEY, "multiLevelType") ||
		nameMatches(rqst->pName, NS_W_KEY, "name") ||
		nameMatches(rqst->pName, NS_W_KEY, "nsid") ||
		nameMatches(rqst->pName, NS_W_KEY, "numStyleLink") ||
		nameMatches(rqst->pName, NS_W_KEY, "styleLink") ||
		nameMatches(rqst->pName, NS_W_KEY, "tmpl") ||
		nameMatches(rqst->pName, NS_W_KEY, "isLgl") ||
		nameMatches(rqst->pName, NS_W_KEY, "legacy") ||
		nameMatches(rqst->pName, NS_W_KEY, "lvlJc") ||
		nameMatches(rqst->pName, NS_W_KEY, "lvlPicBulletId") ||
		nameMatches(rqst->pName, NS_W_KEY, "lvlRestart") ||
		nameMatches(rqst->pName, NS_W_KEY, "lvlText") ||
		nameMatches(rqst->pName, NS_W_KEY, "numFmt") ||
		nameMatches(rqst->pName, NS_W_KEY, "start") ||
		nameMatches(rqst->pName, NS_W_KEY, "suff") ||
		nameMatches(rqst->pName, NS_W_KEY, "abstractNumId")
		)
	{
		//TODO: add functionality here
		rqst->handled = true;
	}
	else if(nameMatches(rqst->pName, NS_W_KEY, "lvl"))
	{
		OXML_Document * doc = OXML_Document::getInstance();		
		if(!doc)
		{
			doc = OXML_Document::getNewInstance();
		}			
		OXML_SharedList sharedList(m_currentList);
		doc->addList(sharedList);
		m_currentList = NULL;
		rqst->handled = true;
	}
	else if(nameMatches(rqst->pName, NS_W_KEY, "num"))
	{
		m_currentNumId.clear(); //set it to empty string
		rqst->handled = true;
	}
	else if(nameMatches(rqst->pName, NS_W_KEY, "pPr") || 
			nameMatches(rqst->pName, NS_W_KEY, "rPr"))
	{
		if(rqst->stck->empty())
		{
			rqst->handled = false;
			rqst->valid = false;
			return;
		}
		OXML_SharedElement dummy = rqst->stck->top();
		
		if(m_currentList)
		{
			m_currentList->setAttributes(dummy->getAttributes());
			m_currentList->setProperties(dummy->getProperties());
		}
		rqst->stck->pop(); //remove the dummy element
		rqst->handled = true;
	}
}
开发者ID:hfiguiere,项目名称:abiword,代码行数:63,代码来源:OXMLi_ListenerState_Numbering.cpp


示例18: sharedMusic

void SimpleAudioEngine::end()
{
    sharedMusic().Close();
    sharedList().clear();
    return;
}
开发者ID:bartholomule,项目名称:redneckracer,代码行数:6,代码来源:SimpleAudioEngine.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ shared_from_this函数代码示例发布时间:2022-05-30
下一篇:
C++ sharedAudioController函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap