本文整理汇总了C++中LLUrlMatch::getQuery方法的典型用法代码示例。如果您正苦于以下问题:C++ LLUrlMatch::getQuery方法的具体用法?C++ LLUrlMatch::getQuery怎么用?C++ LLUrlMatch::getQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLUrlMatch
的用法示例。
在下文中一共展示了LLUrlMatch::getQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addChat
// Put a line of chat in all the right places
void LLFloaterChat::addChat(const LLChat& chat,
BOOL from_instant_message,
BOOL local_agent)
{
LLColor4 text_color = get_text_color(chat, from_instant_message);
BOOL invisible_script_debug_chat =
chat.mChatType == CHAT_TYPE_DEBUG_MSG
&& !gSavedSettings.getBOOL("ScriptErrorsAsChat");
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
if (rlv_handler_t::isEnabled())
{
// TODO-RLVa: we might cast too broad a net by filtering here, needs testing
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
{
LLChat& rlvChat = const_cast<LLChat&>(chat);
if (!from_instant_message)
RlvUtil::filterLocation(rlvChat.mText);
rlvChat.mRlvLocFiltered = TRUE;
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) )
{
LLChat& rlvChat = const_cast<LLChat&>(chat);
if ( (!from_instant_message) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
{
// Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup)
RlvUtil::filterNames(rlvChat.mText);
}
rlvChat.mRlvNamesFiltered = TRUE;
}
}
// [/RLVa:KB]
if (!invisible_script_debug_chat
&& !chat.mMuted
&& gConsole
&& !local_agent)
{
// We display anything if it's not an IM. If it's an IM, check pref...
if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") )
{
// Replace registered urls in the console so it looks right.
std::string chit(chat.mText), // Read through this
chat; // Add parts to this
LLUrlMatch match;
while (!chit.empty() && LLUrlRegistry::instance().findUrl(chit, match))
{
const auto start(match.getStart()), length(match.getEnd()+1-start);
if (start > 0) chat += chit.substr(0, start); // Add up to the start of the match
chat += match.getLabel() + match.getQuery(); // Add the label and the query
chit.erase(0, start+length); // remove the url match and all before it
}
if (!chit.empty()) chat += chit; // Add any leftovers
gConsole->addConsoleLine(chat, text_color);
}
}
if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM"))
log_chat_text(chat);
if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory"))
addChatHistory(chat,false);
triggerAlerts(chat.mText);
if(!from_instant_message)
addChatHistory(chat);
}