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


C++ uuid_vec_t::end方法代码示例

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


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

示例1: computeDifference

void LLCommonUtils::computeDifference(
	const uuid_vec_t& vnew,
	const uuid_vec_t& vcur,
	uuid_vec_t& vadded,
	uuid_vec_t& vremoved)
{
	uuid_vec_t vnew_copy(vnew);
	uuid_vec_t vcur_copy(vcur);

	std::sort(vnew_copy.begin(), vnew_copy.end());
	std::sort(vcur_copy.begin(), vcur_copy.end());

	size_t maxsize = llmax(vnew_copy.size(), vcur_copy.size());
	vadded.resize(maxsize);
	vremoved.resize(maxsize);

	uuid_vec_t::iterator it;
	// what was removed
	it = set_difference(vcur_copy.begin(), vcur_copy.end(), vnew_copy.begin(), vnew_copy.end(), vremoved.begin());
	vremoved.erase(it, vremoved.end());

	// what was added
	it = set_difference(vnew_copy.begin(), vnew_copy.end(), vcur_copy.begin(), vcur_copy.end(), vadded.begin());
	vadded.erase(it, vadded.end());
}
开发者ID:HizWylder,项目名称:GIS,代码行数:25,代码来源:llcommonutils.cpp

示例2: startAdhocCall

// static
void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids)
{
	if (ids.size() == 0)
	{
		return;
	}

	// convert vector into LLDynamicArray for addSession
	LLDynamicArray<LLUUID> id_array;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		id_array.push_back(*it);
	}

	// create the new ad hoc voice session
	const std::string title = LLTrans::getString("conference-title");
	LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START,
										   ids[0], id_array, true);
	if (session_id == LLUUID::null)
	{
		return;
	}

	gIMMgr->autoStartCallOnStartup(session_id);

	make_ui_sound("UISndStartIM");
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:28,代码来源:llavataractions.cpp

示例3: removeFriendsDialog

// static
void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
{
	if(ids.size() == 0)
		return;

	LLSD args;
	std::string msgType;
	if(ids.size() == 1)
	{
		LLUUID agent_id = ids[0];
		LLAvatarName av_name;
		if(LLAvatarNameCache::get(agent_id, &av_name))
		{
			args["NAME"] = av_name.getNSName();
		}

		msgType = "RemoveFromFriends";
	}
	else
	{
		msgType = "RemoveMultipleFromFriends";
	}

	LLSD payload;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		payload["ids"].append(*it);
	}

	LLNotificationsUtil::add(msgType,
		args,
		payload,
		&handleRemove);
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:35,代码来源:llavataractions.cpp

示例4: removeFriendsDialog

// static
void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
{
	if(ids.size() == 0)
		return;

	LLSD args;
	std::string msgType;
	if(ids.size() == 1)
	{
		LLUUID agent_id = ids[0];
		std::string first, last;
		if(gCacheName->getName(agent_id, first, last))
		{
			args["FIRST_NAME"] = first;
			args["LAST_NAME"] = last;	
		}

		msgType = "RemoveFromFriends";
	}
	else
	{
		msgType = "RemoveMultipleFromFriends";
	}

	LLSD payload;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		payload["ids"].append(*it);
	}

	LLNotificationsUtil::add(msgType,
		args,
		payload,
		&handleRemove);
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:36,代码来源:llavataractions.cpp

示例5: startAdhocCall

// static
void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids)
{
	if (ids.size() == 0)
	{
		return;
	}

	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
		const LLUUID& idAgent = *it;
		if (!RlvActions::canStartIM(idAgent))
		{
			make_ui_sound("UISndInvalidOp");
			RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
			return;
		}
// [/RLVa:KB]
//		id_array.push_back(*it);
	}

	// create the new ad hoc voice session
	const std::string title = LLTrans::getString("conference-title");
	LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START,
										   ids[0], ids);
	if (session_id.isNull())
	{
		return;
	}

	gIMMgr->autoStartCallOnStartup(session_id);

	make_ui_sound("UISndStartIM");
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:35,代码来源:llavataractions.cpp

示例6: showAddedLandmarkInfo

void LLPanelPlaces::showAddedLandmarkInfo(const uuid_vec_t& items)
{
	for (uuid_vec_t::const_iterator item_iter = items.begin();
		 item_iter != items.end();
		 ++item_iter)
	{
		const LLUUID& item_id = (*item_iter);
		if(!highlight_offered_object(item_id))
		{
			continue;
		}

		LLInventoryItem* item = gInventory.getItem(item_id);

		llassert(item);
		if (item && (LLAssetType::AT_LANDMARK == item->getType()) )
		{
			// Created landmark is passed to Places panel to allow its editing.
			// If the panel is closed we don't reopen it until created landmark is loaded.
			if("create_landmark" == getPlaceInfoType() && !getItem())
			{
				setItem(item);
			}
		}
	}
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:26,代码来源:llpanelplaces.cpp

示例7: canOfferTeleport

// static
bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
{
	bool result = true;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		if(!canOfferTeleport(*it))
		{
			result = false;
			break;
		}
	}
	return result;
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:14,代码来源:llavataractions.cpp

示例8: LLInventoryFetchDescendentsObserver

LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
															 const uuid_vec_t& item_ids)
{
	mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);

	uuid_vec_t pruned_item_ids;
	for (uuid_vec_t::const_iterator item_iter = item_ids.begin();
		 item_iter != item_ids.end();
		 ++item_iter)
	{
		const LLUUID& item_id = (*item_iter);
		const LLViewerInventoryItem* item = gInventory.getItem(item_id);
		if (item && std::find(folder_ids.begin(), folder_ids.end(), item->getParentUUID()) == folder_ids.end())
		{
			continue;
		}
		pruned_item_ids.push_back(item_id);
	}

	mFetchItems = new LLInventoryFetchItemsObserver(pruned_item_ids);
	mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:22,代码来源:llinventoryobserver.cpp

示例9: startConference

// static
void LLAvatarActions::startConference(const uuid_vec_t& ids)
{
	// *HACK: Copy into dynamic array
	LLDynamicArray<LLUUID> id_array;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		id_array.push_back(*it);
	}
	const std::string title = LLTrans::getString("conference-title");
	LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array);
	if (session_id != LLUUID::null)
	{
		LLIMFloater::show(session_id);
	}
	make_ui_sound("UISndStartIM");
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:17,代码来源:llavataractions.cpp

示例10: canOfferTeleport

// static
bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
{
	// We can't send more than 250 lures in a single message, so disable this
	// button when there are too many id's selected.
	if(ids.size() > 250) return false;

	bool result = true;
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		if(!canOfferTeleport(*it))
		{
			result = false;
			break;
		}
	}
	return result;
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:18,代码来源:llavataractions.cpp

示例11: updateFriends

void LLPanelFriends::updateFriends(U32 changed_mask)
{
	LLUUID selected_id;
	LLCtrlListInterface *friends_list = childGetListInterface("friend_list");
	if (!friends_list) return;
	LLCtrlScrollInterface *friends_scroll = childGetScrollInterface("friend_list");
	if (!friends_scroll) return;
	
	// We kill the selection warning, otherwise we'll spam with warning popups
	// if the maximum amount of friends are selected
	mShowMaxSelectWarning = false;

	const uuid_vec_t selected_friends = mFriendsList->getSelectedIDs();
	if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
	{
		refreshNames(changed_mask);
	}
	else if(changed_mask & LLFriendObserver::POWERS)
	{
		--mNumRightsChanged;
		if(mNumRightsChanged > 0)
		{
			mPeriod = RIGHTS_CHANGE_TIMEOUT;	
			mEventTimer.start();
			mAllowRightsChange = FALSE;
		}
		else
		{
			tick();
		}
	}
	if(!selected_friends.empty())
	{
		// only non-null if friends was already found. This may fail,
		// but we don't really care here, because refreshUI() will
		// clean up the interface.
		friends_list->setCurrentByID(selected_id);
		for(uuid_vec_t::const_iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
		{
			friends_list->setSelectedByValue(*itr, true);
		}
	}

	refreshUI();
	mShowMaxSelectWarning = true;
}
开发者ID:ArxNet,项目名称:SingularityViewer,代码行数:46,代码来源:llfloaterfriends.cpp

示例12: copyUUIDs

// static
void LLAvatarActions::copyUUIDs(const uuid_vec_t& ids)
{
	std::string ids_string;
	const std::string& separator = LLTrans::getString("words_separator");
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
		const LLUUID& id = *it;
		if (id.isNull())
			continue;

		if (!ids_string.empty())
			ids_string.append(separator);

		ids_string.append(id.asString());
	}

	if (!ids_string.empty())
		gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(ids_string));
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:20,代码来源:llavataractions.cpp

示例13: startConference

// static
void LLAvatarActions::startConference(const uuid_vec_t& ids)
{
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
		const LLUUID& idAgent = *it;
		if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(idAgent)) )
		{
			make_ui_sound("UISndInvalidOp");
			RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF, LLSD().with("RECIPIENT", LLSLURL("agent", idAgent, "completename").getSLURLString()));
			return;
		}
// [/RLVa:KB]
	}
	static LLCachedControl<bool> tear_off("OtherChatsTornOff");
	if (!tear_off) gIMMgr->setFloaterOpen(true);
	const std::string title = LLTrans::getString("conference-title");
	gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], ids);
	make_ui_sound("UISndStartIM");
}
开发者ID:theUnkownName,项目名称:SingularityViewer,代码行数:21,代码来源:llavataractions.cpp

示例14: buildResidentsString

// static
void LLAvatarActions::buildResidentsString(const uuid_vec_t& avatar_uuids, std::string& residents_string)
{
	std::vector<LLAvatarName> avatar_names;
	uuid_vec_t::const_iterator it = avatar_uuids.begin();
	for (; it != avatar_uuids.end(); ++it)
	{
		LLAvatarName av_name;
		if (LLAvatarNameCache::get(*it, &av_name))
		{
			avatar_names.push_back(av_name);
		}
	}

	// We should check whether the vector is not empty to pass the assertion
	// that avatar_names.size() > 0 in LLAvatarActions::buildResidentsString.
	if (!avatar_names.empty())
	{
		LLAvatarActions::buildResidentsString(avatar_names, residents_string);
	}
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:21,代码来源:llavataractions.cpp

示例15: startConference

// static
void LLAvatarActions::startConference(const uuid_vec_t& ids)
{
	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
	{
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
		const LLUUID& idAgent = *it;
		if (!RlvActions::canStartIM(idAgent))
		{
			make_ui_sound("UISndInvalidOp");
			RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
			return;
		}
// [/RLVa:KB]
	}
	static LLCachedControl<bool> tear_off("OtherChatsTornOff");
	if (!tear_off) gIMMgr->setFloaterOpen(true);
	const std::string title = LLTrans::getString("conference-title");
	gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], ids);
	make_ui_sound("UISndStartIM");
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:21,代码来源:llavataractions.cpp


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