本文整理汇总了C++中llavatartracker::buddy_map_t::end方法的典型用法代码示例。如果您正苦于以下问题:C++ buddy_map_t::end方法的具体用法?C++ buddy_map_t::end怎么用?C++ buddy_map_t::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llavatartracker::buddy_map_t
的用法示例。
在下文中一共展示了buddy_map_t::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refreshNamesPresence
BOOL LLPanelFriends::refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies)
{
std::vector<LLScrollListItem*> items = mFriendsList->getAllData();
std::sort(items.begin(), items.end(), SortFriendsByID());
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
std::vector<LLScrollListItem*>::const_iterator item_it = items.begin();
BOOL have_names = TRUE;
while(true)
{
if(item_it == items.end() || buddy_it == all_buddies.end())
{
break;
}
const LLUUID & buddy_uuid = buddy_it->first;
const LLUUID & item_uuid = (*item_it)->getValue().asUUID();
if(item_uuid == buddy_uuid)
{
const LLRelationship* info = buddy_it->second;
if (!info)
{
++item_it;
continue;
}
S32 last_change_generation = (*item_it)->getColumn(LIST_FRIEND_UPDATE_GEN)->getValue().asInteger();
if (last_change_generation < info->getChangeSerialNum())
{
// update existing item in UI
have_names &= updateFriendItem(buddy_it->first, info);
}
++buddy_it;
++item_it;
}
else if(item_uuid < buddy_uuid)
{
++item_it;
}
else //if(item_uuid > buddy_uuid)
{
++buddy_it;
}
}
return have_names;
}
示例2: refreshNamesSync
BOOL LLPanelFriends::refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies)
{
mFriendsList->deleteAllItems();
BOOL have_names = TRUE;
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
for(; buddy_it != all_buddies.end(); ++buddy_it)
{
have_names &= addFriend(buddy_it->first);
}
return have_names;
}
示例3: addBuddyList
S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
{
using namespace std;
U32 new_buddy_count = 0;
std::string full_name;
LLUUID agent_id;
for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr)
{
agent_id = (*itr).first;
buddy_map_t::const_iterator existing_buddy = mBuddyInfo.find(agent_id);
if(existing_buddy == mBuddyInfo.end())
{
++new_buddy_count;
mBuddyInfo[agent_id] = (*itr).second;
// IDEVO: is this necessary? name is unused?
gCacheName->getFullName(agent_id, full_name);
addChangedMask(LLFriendObserver::ADD, agent_id);
lldebugs << "Added buddy " << agent_id
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
<< ", FROM: " << mBuddyInfo[agent_id]->getRightsGrantedFrom()
<< llendl;
}
else
{
LLRelationship* e_r = (*existing_buddy).second;
LLRelationship* n_r = (*itr).second;
llwarns << "!! Add buddy for existing buddy: " << agent_id
<< " [" << (e_r->isOnline() ? "Online" : "Offline") << "->" << (n_r->isOnline() ? "Online" : "Offline")
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
<< "]" << llendl;
}
}
notifyObservers();
return new_buddy_count;
}
示例4: addBuddyList
S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
{
using namespace std;
U32 new_buddy_count = 0;
char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
LLUUID agent_id;
for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr)
{
agent_id = (*itr).first;
buddy_map_t::const_iterator existing_buddy = mBuddyInfo.find(agent_id);
if(existing_buddy == mBuddyInfo.end())
{
++new_buddy_count;
mBuddyInfo[agent_id] = (*itr).second;
gCacheName->getName(agent_id, first, last);
mModifyMask |= LLFriendObserver::ADD;
lldebugs << "Added buddy " << agent_id
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
<< ", FROM: " << mBuddyInfo[agent_id]->getRightsGrantedFrom()
<< llendl;
}
else
{
LLRelationship* e_r = (*existing_buddy).second;
LLRelationship* n_r = (*itr).second;
llwarns << "!! Add buddy for existing buddy: " << agent_id
<< " [" << (e_r->isOnline() ? "Online" : "Offline") << "->" << (n_r->isOnline() ? "Online" : "Offline")
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
<< "]" << llendl;
}
}
notifyObservers();
return new_buddy_count;
}