本文整理汇总了C++中LLSD::asUUID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSD::asUUID方法的具体用法?C++ LLSD::asUUID怎么用?C++ LLSD::asUUID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSD
的用法示例。
在下文中一共展示了LLSD::asUUID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setValue
void LLGroupIconCtrl::setValue(const LLSD& value)
{
if (value.isUUID())
{
LLGroupMgr* gm = LLGroupMgr::getInstance();
if (mGroupId.notNull())
{
gm->removeObserver(this);
}
if (mGroupId != value.asUUID())
{
mGroupId = value.asUUID();
mID = mGroupId; // set LLGroupMgrObserver::mID to make callbacks work
// Check if cache already contains image_id for that group
if (!updateFromCache())
{
LLIconCtrl::setValue(mDefaultIconName);
gm->addObserver(this);
gm->sendGroupPropertiesRequest(mGroupId);
}
}
}
else
{
LLIconCtrl::setValue(value);
}
}
示例2:
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed)
: LLFloater(), LLInstanceTracker<LLFloaterGroupPicker, LLUUID>(seed.asUUID()),
mPowersMask(GP_ALL_POWERS),
mID(seed.asUUID())
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_choose_group.xml");
}
示例3: llsds_are_equal
//compares two LLSD's
bool llsds_are_equal(const LLSD& llsd_1, const LLSD& llsd_2)
{
llassert(llsd_1.isDefined());
llassert(llsd_2.isDefined());
if (llsd_1.type() != llsd_2.type()) return false;
if (!llsd_1.isMap())
{
if (llsd_1.isUUID()) return llsd_1.asUUID() == llsd_2.asUUID();
//assumptions that string representaion is enough for other types
return llsd_1.asString() == llsd_2.asString();
}
if (llsd_1.size() != llsd_2.size()) return false;
LLSD::map_const_iterator llsd_1_it = llsd_1.beginMap();
LLSD::map_const_iterator llsd_2_it = llsd_2.beginMap();
for (S32 i = 0; i < llsd_1.size(); ++i)
{
if ((*llsd_1_it).first != (*llsd_2_it).first) return false;
if (!llsds_are_equal((*llsd_1_it).second, (*llsd_2_it).second)) return false;
++llsd_1_it;
++llsd_2_it;
}
return true;
}
示例4: onOpen
void FSPanelClassifieds::onOpen(const LLSD& key)
{
const LLUUID id(key.asUUID());
BOOL self = (gAgent.getID() == id);
// only agent can edit her picks
getChildView("edit_panel")->setEnabled(self);
getChildView("edit_panel")->setVisible( self);
// Disable buttons when viewing profile for first time
if(getAvatarId() != id)
{
getChildView(XML_BTN_INFO)->setEnabled(FALSE);
getChildView(XML_BTN_TELEPORT)->setEnabled(FALSE);
getChildView(XML_BTN_SHOW_ON_MAP)->setEnabled(FALSE);
}
if(getAvatarId() != id)
{
mClassifiedsList->goToTop();
// Set dummy value to make panel dirty and make it reload picks
setValue(LLSD());
}
FSPanelProfileTab::onOpen(key);
updateData();
updateButtons();
}
示例5: onCommitVoiceEffect
void LLPanelVoiceEffect::onCommitVoiceEffect()
{
LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface();
if (!effect_interface)
{
mVoiceEffectCombo->setEnabled(false);
return;
}
LLSD value = mVoiceEffectCombo->getValue();
if (value.asInteger() == PREVIEW_VOICE_EFFECTS)
{
// Open the Voice Morph preview floater
LLFloaterReg::showInstance("voice_effect");
}
else if (value.asInteger() == GET_VOICE_EFFECTS)
{
// Open the voice morphing info web page
LLWeb::loadURL(LLTrans::getString("voice_morphing_url"));
}
else
{
effect_interface->setVoiceEffect(value.asUUID());
}
mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect());
}
示例6: LLFloater
LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
: LLFloater(LLSD(object_id)),
mObjectID(object_id.asUUID())
{
// enabled autocous blocks controling focus via LLFloaterReg::showInstance
setAutoFocus(FALSE);
}
示例7: onOpen
void LLPanelProfileTab::onOpen(const LLSD& key)
{
// Don't reset panel if we are opening it for same avatar.
if(getAvatarId() != key.asUUID())
{
resetControls();
resetData();
scrollToTop();
}
// Update data even if we are viewing same avatar profile as some data might been changed.
setAvatarId(key.asUUID());
updateData();
updateButtons();
}
示例8: setValue
void LLScrollListIcon::setValue(const LLSD& value)
{
if (value.isUUID())
{
// don't use default image specified by LLUUID::null, use no image in that case
LLUUID image_id = value.asUUID();
mIcon = image_id.notNull() ? LLUI::getUIImageByID(image_id) : LLUIImagePtr(NULL);
}
else
{
std::string value_string = value.asString();
if (LLUUID::validate(value_string))
{
setValue(LLUUID(value_string));
}
else if (!value_string.empty())
{
mIcon = LLUI::getUIImage(value.asString());
}
else
{
mIcon = NULL;
}
}
}
示例9:
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
mSelectCallback(NULL),
mCallbackUserdata(NULL),
mPowersMask(GP_ALL_POWERS)
{
mID = seed.asUUID();
sInstances.insert(std::make_pair(mID, this));
}
示例10: show
// static
void LLFloaterAssociateListing::show(LLFloaterAssociateListing* floater, const LLSD& folder_id)
{
if (!floater) return;
floater->mUUID = folder_id.asUUID();
floater->open();
}
示例11: LLCallbackMap
LLFloaterParcelInfo::LLFloaterParcelInfo(const LLSD& parcel_id)
: LLFloater(parcel_id),
mParcelID( parcel_id.asUUID() ),
mPanelParcelp(NULL)
{
mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterParcelInfo::createPanelPlace, this);
// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml");
}
示例12: LLFloaterScriptQueue
LLFloaterCompileQueue::LLFloaterCompileQueue(const LLSD& key)
: LLFloaterScriptQueue(key)
{
setTitle(LLTrans::getString("CompileQueueTitle"));
setStartString(LLTrans::getString("CompileQueueStart"));
mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(key.asUUID()));
}
示例13: LLFloater
LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
: LLFloater(LLSD(object_id)),
mObjectID(object_id.asUUID())
{
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml");
// enabled autocous blocks controling focus via LLFloaterReg::showInstance
setAutoFocus(FALSE);
}
示例14: LLFloater
LLFloaterPay::LLFloaterPay(const LLSD& key)
: LLFloater(key),
mCallbackData(),
mCallback(NULL),
mObjectNameText(NULL),
mTargetUUID(key.asUUID()),
mTargetIsGroup(FALSE),
mHaveName(FALSE)
{
}
示例15: setValue
//virtual
void LLAvatarIconCtrl::setValue(const LLSD& value)
{
if (value.isUUID())
{
LLAvatarPropertiesProcessor* app =
LLAvatarPropertiesProcessor::getInstance();
if (mAvatarId.notNull())
{
app->removeObserver(mAvatarId, this);
}
if (mAvatarId != value.asUUID())
{
mAvatarId = value.asUUID();
// *BUG: This will return stale icons if a user changes their
// profile picture. However, otherwise we send too many upstream
// AvatarPropertiesRequest messages.
// to get fresh avatar icon use
// LLAvatarIconIDCache::getInstance()->remove(avatar_id);
// Check if cache already contains image_id for that avatar
if (!updateFromCache())
{
// *TODO: Consider getting avatar icon/badge directly from
// People API, rather than sending AvatarPropertyRequest
// messages. People API already hits the user table.
LLIconCtrl::setValue(mDefaultIconName);
app->addObserver(mAvatarId, this);
app->sendAvatarPropertiesRequest(mAvatarId);
}
}
}
else
{
LLIconCtrl::setValue(value);
}
LLAvatarNameCache::get(mAvatarId,
boost::bind(&LLAvatarIconCtrl::onAvatarNameCache,
this, _1, _2));
}