本文整理汇总了C++中LLDynamicArray::find方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDynamicArray::find方法的具体用法?C++ LLDynamicArray::find怎么用?C++ LLDynamicArray::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDynamicArray
的用法示例。
在下文中一共展示了LLDynamicArray::find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RevokeSelected
void JCFloaterAnimList::RevokeSelected(void *userdata )
{
JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
LLDynamicArray<LLUUID> ids;
std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
{
LLScrollListItem *item = *itr;
const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID();
if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
{
ids.put(id);
}
}
if( !ids.empty() )
{
for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
{
LLUUID id = *itr;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RevokePermissions);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ObjectID, id);
msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX);
gAgent.sendReliableMessage();
}
}
}
示例2: StopSelected
void JCFloaterAnimList::StopSelected(void *userdata )
{
JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
LLDynamicArray<LLUUID> ids;
std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
{
LLScrollListItem *item = *itr;
const LLUUID &id = item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID();
if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
{
ids.put(id);
}
}
gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
}
示例3: StopSelected
void LLFloaterExploreAnimations::StopSelected(void *userdata )
{
LLFloaterExploreAnimations *self = (LLFloaterExploreAnimations*)userdata;
LLDynamicArray<LLUUID> ids;
std::vector< LLScrollListItem * > items = self->getChild<LLScrollListCtrl>("anim_list")->getAllSelected();
for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
{
LLScrollListItem *item = *itr;
const LLUUID &id = item->getValue().asUUID();
if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
{
ids.put(id);
}
}
gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
}