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


C++ array_const_iterator::asUUID方法代码示例

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


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

示例1: handleRemove

// static
bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& response)
{
	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);

	const LLSD& ids = notification["payload"]["ids"];
	for (LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr)
	{
		LLUUID id = itr->asUUID();
		const LLRelationship* ip = LLAvatarTracker::instance().getBuddyInfo(id);
		if (ip)
		{
			switch (option)
			{
			case 0: // YES
				if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS))
				{
					LLAvatarTracker::instance().empower(id, FALSE);
					LLAvatarTracker::instance().notifyObservers();
				}
				LLAvatarTracker::instance().terminateBuddy(id);
				LLAvatarTracker::instance().notifyObservers();
				gInventory.addChangedMask(LLInventoryObserver::LABEL | LLInventoryObserver::CALLING_CARD, LLUUID::null);
				gInventory.notifyObservers();
				break;

			case 1: // NO
			default:
				LL_INFOS() << "No removal performed." << LL_ENDL;
				break;
			}
		}
	}
	return false;
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:35,代码来源:llavataractions.cpp

示例2: loadIgnoreGroup

void LLIMMgr::loadIgnoreGroup()
{
	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "ignore_groups.xml");

	LLSD settings_llsd;
	llifstream file;
	file.open(filename);
	if (file.is_open())
	{
		// llinfos << "loading group chat ignore from " << filename << "..." << llendl;
		LLSDSerialize::fromXML(settings_llsd, file);

		mIgnoreGroupList.clear();

		for(LLSD::array_const_iterator iter = settings_llsd.beginArray();
		    iter != settings_llsd.endArray(); ++iter)
		{
			// llinfos << "added " << iter->asUUID()
			//         << " to group chat ignore list" << llendl;
			mIgnoreGroupList.push_back( iter->asUUID() );
		}
	}
	else
	{
		// llinfos << "can't load " << filename
		//         << " (probably it doesn't exist yet)" << llendl;
	}
}
开发者ID:IamusNavarathna,项目名称:SingularityViewer,代码行数:28,代码来源:llimview.cpp

示例3: getContent

		/*virtual*/ void httpCompleted()
		{
			LLSD experiences = getContent()["experience_keys"];
			LLSD::array_const_iterator it = experiences.beginArray();
			for( /**/ ; it != experiences.endArray(); ++it)
			{
				const LLSD& row = *it;
				LLUUID public_key = row[EXPERIENCE_ID].asUUID();


				LL_DEBUGS("ExperienceCache") << "Received result for " << public_key 
					<< " display '" << row[LLExperienceCache::NAME].asString() << "'" << LL_ENDL ;

				processExperience(public_key, row);
			}

			LLSD error_ids = getContent()["error_ids"];
			LLSD::array_const_iterator errIt = error_ids.beginArray();
			for( /**/ ; errIt != error_ids.endArray() ; ++errIt )
			{
				LLUUID id = errIt->asUUID();		
				LLSD exp;
				exp[EXPIRES]=DEFAULT_EXPIRATION;
				exp[EXPERIENCE_ID] = id;
				exp[PROPERTIES]=PROPERTY_INVALID;
				exp[MISSING]=true;
                exp[QUOTA] = DEFAULT_QUOTA;

				processExperience(id, exp);
				LL_WARNS("ExperienceCache") << "LLExperienceResponder::result() error result for " << id << LL_ENDL ;
			}

			LL_DEBUGS("ExperienceCache") << sCache.size() << " cached experiences" << LL_ENDL;
		}
开发者ID:Belxjander,项目名称:Kirito,代码行数:34,代码来源:llexperiencecache.cpp

示例4: setExperienceList

void LLPanelGroupExperiences::setExperienceList(const LLSD& experiences)
{
	if (hasString("no_experiences"))
	{
		mExperiencesList->setNoItemsCommentText(getString("no_experiences"));
	}
    mExperiencesList->clear();

    LLSD::array_const_iterator it = experiences.beginArray();
    for ( /**/ ; it != experiences.endArray(); ++it)
    {
        LLUUID public_key = it->asUUID();
        LLExperienceItem* item = new LLExperienceItem();

        item->init(public_key);
        mExperiencesList->addItem(item, public_key);
    }
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:18,代码来源:llpanelgroupexperiences.cpp


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