本文整理汇总了C++中LLUIString::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ LLUIString::empty方法的具体用法?C++ LLUIString::empty怎么用?C++ LLUIString::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLUIString
的用法示例。
在下文中一共展示了LLUIString::empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processNotify
void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
{
S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock);
BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification");
lldebugs << "Received " << count << " online notifications **** " << llendl;
if(count > 0)
{
LLUUID agent_id;
const LLRelationship* info = NULL;
LLUUID tracking_id;
if(mTrackingData)
{
tracking_id = mTrackingData->mAvatarID;
}
BOOL notify = FALSE;
LLStringUtil::format_map_t args;
for(S32 i = 0; i < count; ++i)
{
msg->getUUIDFast(_PREHASH_AgentBlock, _PREHASH_AgentID, agent_id, i);
info = getBuddyInfo(agent_id);
if(info)
{
setBuddyOnline(agent_id,online);
if(chat_notify)
{
std::string first, last;
if(gCacheName->getName(agent_id, first, last))
{
notify = TRUE;
args["[FIRST]"] = first;
args["[LAST]"] = last;
}
}
}
else
{
llwarns << "Received online notification for unknown buddy: "
<< agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << llendl;
}
if(tracking_id == agent_id)
{
// we were tracking someone who went offline
deleteTrackingData();
}
// *TODO: get actual inventory id
gInventory.addChangedMask(LLInventoryObserver::CALLING_CARD, LLUUID::null);
}
if(notify)
{
// Popup a notify box with online status of this agent
LLNotifyBox::showXml(online ? "FriendOnline" : "FriendOffline", args);
// If there's an open IM session with this agent, send a notification there too.
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id);
if (floater)
{
LLUIString notifyMsg = LLNotifyBox::getTemplateMessage((online ? "FriendOnline" : "FriendOffline"),args);
if (!notifyMsg.empty())
floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor"));
}
}
mModifyMask |= LLFriendObserver::ONLINE;
instance().notifyObservers();
gInventory.notifyObservers();
}
}