本文整理汇总了C++中llinventorymodel::cat_array_t::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ cat_array_t::clear方法的具体用法?C++ cat_array_t::clear怎么用?C++ cat_array_t::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llinventorymodel::cat_array_t
的用法示例。
在下文中一共展示了cat_array_t::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findSharedFolders
// Checked: 2010-04-07 (RLVa-1.2.0a) | Modified: RLVa-1.0.0h
bool RlvInventory::findSharedFolders(const std::string& strCriteria, LLInventoryModel::cat_array_t& folders) const
{
// Sanity check - can't do anything without a shared root
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
if (!pRlvRoot)
return false;
folders.clear();
LLInventoryModel::item_array_t items;
RlvCriteriaCategoryCollector f(strCriteria);
gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, FALSE, f);
return (folders.count() != 0);
}
示例2: getPath
// Checked: 2010-08-30 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
bool RlvInventory::getPath(const uuid_vec_t& idItems, LLInventoryModel::cat_array_t& folders) const
{
// Sanity check - can't do anything without a shared root
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
if (!pRlvRoot)
return false;
folders.clear();
for (uuid_vec_t::const_iterator itItem = idItems.begin(); itItem != idItems.end(); ++itItem)
{
const LLInventoryItem* pItem = gInventory.getItem(*itItem);
if ( (pItem) && (gInventory.isObjectDescendentOf(pItem->getUUID(), pRlvRoot->getUUID())) )
{
// If the containing folder is a folded folder we need its parent
LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID());
if (RlvInventory::instance().isFoldedFolder(pFolder, true))
pFolder = gInventory.getCategory(pFolder->getParentUUID());
folders.push_back(pFolder);
}
}
return (folders.count() != 0);
}