本文整理汇总了C++中LLSD::append方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSD::append方法的具体用法?C++ LLSD::append怎么用?C++ LLSD::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSD
的用法示例。
在下文中一共展示了LLSD::append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: httpSuccess
void fetchScriptLimitsRegionSummaryResponder::httpSuccess()
{
const LLSD& content_ref = getContent();
#ifdef USE_FAKE_RESPONSES
LLSD fake_content;
LLSD summary = LLSD::emptyMap();
LLSD available = LLSD::emptyArray();
LLSD available_urls = LLSD::emptyMap();
LLSD available_memory = LLSD::emptyMap();
LLSD used = LLSD::emptyArray();
LLSD used_urls = LLSD::emptyMap();
LLSD used_memory = LLSD::emptyMap();
used_urls["type"] = "urls";
used_urls["amount"] = FAKE_NUMBER_OF_URLS;
available_urls["type"] = "urls";
available_urls["amount"] = FAKE_AVAILABLE_URLS;
used_memory["type"] = "memory";
used_memory["amount"] = FAKE_AMOUNT_OF_MEMORY;
available_memory["type"] = "memory";
available_memory["amount"] = FAKE_AVAILABLE_MEMORY;
//summary response:{'summary':{'available':[{'amount':i731,'type':'urls'},{'amount':i895577,'type':'memory'},{'amount':i731,'type':'urls'},{'amount':i895577,'type':'memory'}],'used':[{'amount':i329,'type':'urls'},{'amount':i66741,'type':'memory'}]}}
used.append(used_urls);
used.append(used_memory);
available.append(available_urls);
available.append(available_memory);
summary["available"] = available;
summary["used"] = used;
fake_content["summary"] = summary;
const LLSD& content = fake_content;
#else
const LLSD& content = content_ref;
#endif
if (!content.isMap())
{
failureResult(HTTP_INTERNAL_ERROR_OTHER, "Malformed response contents", content);
return;
}
#ifdef DUMP_REPLIES_TO_LLINFOS
LLSDNotationStreamer notation_streamer(content);
std::ostringstream nice_llsd;
nice_llsd << notation_streamer;
OSMessageBox(nice_llsd.str(), "summary response:", 0);
LL_WARNS() << "summary response:" << *content << LL_ENDL;
#endif
LLFloaterScriptLimits* instance = LLFloaterScriptLimits::findInstance();
if(!instance)
{
LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL;
}
else
{
LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels");
if(tab)
{
LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel");
if(panel_memory)
{
panel_memory->getChild<LLUICtrl>("loading_text")->setValue(LLSD(std::string("")));
LLButton* btn = panel_memory->getChild<LLButton>("refresh_list_btn");
if(btn)
{
btn->setEnabled(true);
}
panel_memory->setRegionSummary(content);
}
}
}
}