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


C++ llinventorymodel::item_array_t类代码示例

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


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

示例1: dropCategory

BOOL LLIMFloater::dropCategory(LLInventoryCategory* category, BOOL drop)
{
	BOOL rv = isInviteAllowed();
	if(rv && category)
	{
		LLInventoryModel::cat_array_t cats;
		LLInventoryModel::item_array_t items;
		LLUniqueBuddyCollector buddies;
		gInventory.collectDescendentsIf(category->getUUID(),
										cats,
										items,
										LLInventoryModel::EXCLUDE_TRASH,
										buddies);
		S32 count = items.count();
		if(count == 0)
		{
			rv = FALSE;
		}
		else if(drop)
		{
			uuid_vec_t ids;
			ids.reserve(count);
			for(S32 i = 0; i < count; ++i)
			{
				ids.push_back(items.get(i)->getCreatorUUID());
			}
			inviteToSession(ids);
		}
	}
	return rv;
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:31,代码来源:llimfloater.cpp

示例2: dropCategory

BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
{
	if (category)
	{
		LLInventoryModel::cat_array_t cats;
		LLInventoryModel::item_array_t items;
		LLUniqueBuddyCollector buddies;
		gInventory.collectDescendentsIf(category->getUUID(),
										cats,
										items,
										LLInventoryModel::EXCLUDE_TRASH,
										buddies);
		S32 count = items.count();
		if(count == 0)
		{
			return false;
		}
		else if(drop)
		{
			LLDynamicArray<LLUUID> ids;
			for(S32 i = 0; i < count; ++i)
			{
				ids.put(items.get(i)->getCreatorUUID());
			}
			inviteToSession(ids);
		}
	}
	return true;
}
开发者ID:mightymarc,项目名称:SWAMPWATER,代码行数:29,代码来源:llimpanel.cpp

示例3: syncFriendsFolder

void LLFriendCardsManager::syncFriendsFolder()
{
	LLAvatarTracker::buddy_map_t all_buddies;
	LLAvatarTracker::instance().copyBuddyList(all_buddies);

	// 1. Remove Friend Cards for non-friends
	LLInventoryModel::cat_array_t cats;
	LLInventoryModel::item_array_t items;

	gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH);

	LLInventoryModel::item_array_t::const_iterator it;
	for (it = items.begin(); it != items.end(); ++it)
	{
		lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl;
		if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID()))
		{
			lldebugs << "NONEXISTS, so remove it" << llendl;
			removeFriendCardFromInventory((*it)->getCreatorUUID());
		}
	}

	// 2. Add missing Friend Cards for friends
	LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
	llinfos << "try to build friends, count: " << all_buddies.size() << llendl;
	for(; buddy_it != all_buddies.end(); ++buddy_it)
	{
		const LLUUID& buddy_id = (*buddy_it).first;
		addFriendCardToInventory(buddy_id);
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:31,代码来源:llfriendcard.cpp

示例4: getIncludedItems

void LLMakeOutfitDialog::getIncludedItems(LLInventoryModel::item_array_t& item_list)
{
	LLInventoryModel::cat_array_t *cats;
	LLInventoryModel::item_array_t *items;
	gInventory.getDirectDescendentsOf(LLAppearanceMgr::instance().getCOF(), cats, items);
	for (LLInventoryModel::item_array_t::const_iterator iter = items->begin(); iter != items->end(); ++iter)
	{
		LLViewerInventoryItem* item = (*iter);
		if (!item)
			continue;
		if (item->isWearableType())
		{
			LLWearableType::EType type = item->getWearableType();
			if (type < LLWearableType::WT_COUNT && childGetValue(mCheckBoxList[type].first).asBoolean())
			{
				item_list.push_back(item);
			}
		}
		else
		{
			LLViewerJointAttachment* attachment = gAgentAvatarp->getWornAttachmentPoint(item->getLinkedUUID());
			if (attachment && childGetValue(std::string("checkbox_")+attachment->getName()).asBoolean())
			{
				item_list.push_back(item);
			}
		}
	}
}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:28,代码来源:llmakeoutfitdialog.cpp

示例5: updateAttachments

void LLCOFMgr::updateAttachments()
{
    /*const*/ LLVOAvatar* pAvatar = gAgentAvatarp;
    if (!pAvatar)
        return;

    const LLUUID idCOF = getCOF();

    // Grab all attachment links currently in COF
    LLInventoryModel::item_array_t items;
    getDescendentsOfAssetType(idCOF, items, LLAssetType::AT_OBJECT, true);

    // Include attachments which should be in COF but don't have their link created yet
    uuid_vec_t::iterator itPendingAttachLink = m_PendingAttachLinks.begin();
    while (itPendingAttachLink != m_PendingAttachLinks.end())
    {
        const LLUUID& idItem = *itPendingAttachLink;
        if ( (!pAvatar->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) )
        {
            itPendingAttachLink = m_PendingAttachLinks.erase(itPendingAttachLink);
            continue;
        }

        LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
        if (pItem)
            items.push_back(pItem);

        ++itPendingAttachLink;
    }

    // Don't remove attachments until avatar is fully loaded (should reduce random attaching/detaching/reattaching at log-on)
    LLAgentWearables::userUpdateAttachments(items, !pAvatar->isFullyLoaded());
}
开发者ID:jakit,项目名称:PartyHatViewer,代码行数:33,代码来源:cofmgr.cpp

示例6: updateFolderCount

void LLFloaterOutbox::updateFolderCount()
{
	if (mOutboxInventoryPanel.get() && mOutboxId.notNull())
	{
		S32 item_count = 0;

		if (mOutboxId.notNull())
		{
			LLInventoryModel::cat_array_t * cats;
			LLInventoryModel::item_array_t * items;
			gInventory.getDirectDescendentsOf(mOutboxId, cats, items);

			item_count = cats->count() + items->count();
		}

		mOutboxItemCount = item_count;
	}
	else
	{
		// If there's no outbox, the number of items in it should be set to 0 for consistency
		mOutboxItemCount = 0;
	}

	if (!mImportBusy)
	{
		updateFolderCountStatus();
	}
}
开发者ID:hades187,项目名称:singu,代码行数:28,代码来源:llfloateroutbox.cpp

示例7: isLinkInCOF

bool LLCOFMgr::isLinkInCOF(const LLUUID& idItem)
{
    LLInventoryModel::cat_array_t folders;
    LLInventoryModel::item_array_t items;
    LLLinkedItemIDMatches f(gInventory.getLinkedItemID(idItem));
    gInventory.collectDescendentsIf(getCOF(), folders, items, LLInventoryModel::EXCLUDE_TRASH, f);
    return (!items.empty());
}
开发者ID:jakit,项目名称:PartyHatViewer,代码行数:8,代码来源:cofmgr.cpp

示例8: isItemInAnyFriendsList

bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* item)
{
	if (item->getType() != LLAssetType::AT_CALLINGCARD)
		return false;

	LLInventoryModel::item_array_t items;
	findMatchedFriendCards(item->getCreatorUUID(), items);

	return items.count() > 0;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:10,代码来源:llfriendcard.cpp

示例9: refreshList

void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item_array)
{
	getIDs().clear();
	LLInventoryModel::item_array_t::const_iterator it = item_array.begin();
	for( ; item_array.end() != it; ++it)
	{
		getIDs().push_back((*it)->getUUID());
	}
	mNeedsRefresh = true;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:10,代码来源:llinventoryitemslist.cpp

示例10: removeFriendCardFromInventory

void LLFriendCardsManager::removeFriendCardFromInventory(const LLUUID& avatarID)
{
	LLInventoryModel::item_array_t items;
	findMatchedFriendCards(avatarID, items);

	LLInventoryModel::item_array_t::const_iterator it;
	for (it = items.begin(); it != items.end(); ++ it)
	{
		gInventory.removeItem((*it)->getUUID());
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:11,代码来源:llfriendcard.cpp

示例11: saveCurrentWearables

void LLFloaterCustomize::saveCurrentWearables()
{
	LLWearableType::EType cur = getCurrentWearableType();

	for(U32 i = 0;i < gAgentWearables.getWearableCount(cur);++i)
	{
		LLViewerWearable* wearable = gAgentWearables.getViewerWearable(cur,i);
		if(wearable && wearable->isDirty())
		{
			/*
			===============================================================================================
			Copy-pasted some code from LLPanelEditWearable::saveChanges instead of just calling saveChanges, as
			we only have one 'active' panel per wearable type, not per layer. The panels just update when
			layer of focus is changed. Easier just to do it right here manually.
			===============================================================================================
			*/ 
			// Find an existing link to this wearable's inventory item, if any, and its description field.
			if(gAgentAvatarp->isUsingServerBakes())
			{
				LLInventoryItem *link_item = NULL;
				std::string description;
				LLInventoryModel::item_array_t links =
					LLAppearanceMgr::instance().findCOFItemLinks(wearable->getItemID());
				if (links.size()>0)
				{
					link_item = links.get(0).get();
					if (link_item && link_item->getIsLinkType())
					{
						description = link_item->getActualDescription();
					}
				}
				// Make another copy of this link, with the same
				// description.  This is needed to bump the COF
				// version so texture baking service knows appearance has changed.
				if (link_item)
				{
					// Create new link
					link_inventory_item( gAgent.getID(),
										 link_item->getLinkedUUID(),
										 LLAppearanceMgr::instance().getCOF(),
										 link_item->getName(),
										 description,
										 LLAssetType::AT_LINK,
										 NULL);
					// Remove old link
					gInventory.purgeObject(link_item->getUUID());
				}
			}
			gAgentWearables.saveWearable( cur, i );
		}
	}
}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:52,代码来源:llfloatercustomize.cpp

示例12: getFolderCount

S32 LLFloaterMarketplaceListings::getFolderCount()
{
	if (mPanelListings && mRootFolderId.notNull())
	{
		LLInventoryModel::cat_array_t * cats;
		LLInventoryModel::item_array_t * items;
		gInventory.getDirectDescendentsOf(mRootFolderId, cats, items);

		return (cats->size() + items->size());
	}
	else
	{
		return 0;
	}
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:15,代码来源:llfloatermarketplacelistings.cpp

示例13: removeCOFItemLinks

void LLCOFMgr::removeCOFItemLinks(const LLUUID& idItem)
{
    gInventory.addChangedMask(LLInventoryObserver::LABEL, idItem);

    LLInventoryModel::cat_array_t folders;
    LLInventoryModel::item_array_t items;
    gInventory.collectDescendents(getCOF(), folders, items, LLInventoryModel::EXCLUDE_TRASH);

    for (S32 idxItem = 0; idxItem < items.count(); idxItem++)
    {
        const LLInventoryItem* pItem = items.get(idxItem).get();
        if ( (pItem->getIsLinkType()) && (idItem == pItem->getLinkedUUID()) )
            gInventory.purgeObject(pItem->getUUID());
    }
}
开发者ID:jakit,项目名称:PartyHatViewer,代码行数:15,代码来源:cofmgr.cpp

示例14: climb

// static
void LLLocalInventory::climb(LLInventoryCategory* cat,
                             LLInventoryModel::cat_array_t& cats,
                             LLInventoryModel::item_array_t& items)
{
    LLInventoryModel* model = &gInventory;

    // Add this category
    cats.push_back(LLPointer<LLViewerInventoryCategory>((LLViewerInventoryCategory*)cat));

    LLInventoryModel::cat_array_t *direct_cats;
    LLInventoryModel::item_array_t *direct_items;
    model->getDirectDescendentsOf(cat->getUUID(), direct_cats, direct_items);

    // Add items
    LLInventoryModel::item_array_t::iterator item_iter = direct_items->begin();
    LLInventoryModel::item_array_t::iterator item_end = direct_items->end();
    for( ; item_iter != item_end; ++item_iter)
    {
        items.push_back(*item_iter);
    }

    // Do subcategories
    LLInventoryModel::cat_array_t::iterator cat_iter = direct_cats->begin();
    LLInventoryModel::cat_array_t::iterator cat_end = direct_cats->end();
    for( ; cat_iter != cat_end; ++cat_iter)
    {
        climb(*cat_iter, cats, items);
    }
}
开发者ID:nathanmarck,项目名称:VoodooNxg,代码行数:30,代码来源:lllocalinventory.cpp

示例15: getItemIDs

// Checked: 2013-10-12 (RLVa-1.4.9)
bool RlvCommandOptionGetPath::getItemIDs(LLWearableType::EType wtType, uuid_vec_t& idItems)
{
	uuid_vec_t::size_type cntItemsPrev = idItems.size();

	LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items;
	LLFindWearablesOfType f(wtType);
	gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), folders, items, false, f);
	for (LLInventoryModel::item_array_t::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem)
	{
		const LLViewerInventoryItem* pItem = *itItem;
		if (pItem)
			idItems.push_back(pItem->getLinkedUUID());
	}

	return (cntItemsPrev != idItems.size());
}
开发者ID:Frans,项目名称:SingularityViewer,代码行数:17,代码来源:rlvhelper.cpp


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