当前位置: 首页>>代码示例>>C++>>正文


C++ LLSD::asUUID方法代码示例

本文整理汇总了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);
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:29,代码来源:llgroupiconctrl.cpp

示例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");
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:7,代码来源:llfloatergroups.cpp

示例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;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:29,代码来源:llflatlistview.cpp

示例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();  
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:29,代码来源:fspanelprofileclassifieds.cpp

示例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());
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:27,代码来源:llpanelvoiceeffect.cpp

示例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);
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:7,代码来源:llfloaterscriptdebug.cpp

示例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();
}
开发者ID:jimjesus,项目名称:kittyviewer,代码行数:16,代码来源:llpanelavatar.cpp

示例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;
		}
	}
}
开发者ID:AlericInglewood,项目名称:SingularityViewer,代码行数:25,代码来源:llscrolllistcell.cpp

示例9:

LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) : 
	mSelectCallback(NULL),
	mCallbackUserdata(NULL),
	mPowersMask(GP_ALL_POWERS)
{
	mID = seed.asUUID();
	sInstances.insert(std::make_pair(mID, this));
}
开发者ID:Nora28,项目名称:imprudence,代码行数:8,代码来源:llfloatergroups.cpp

示例10: show

// static
void LLFloaterAssociateListing::show(LLFloaterAssociateListing* floater, const LLSD& folder_id)
{
	if (!floater) return;

	floater->mUUID = folder_id.asUUID();

	floater->open();
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:9,代码来源:llfloatermarketplacelistings.cpp

示例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");
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:8,代码来源:llfloaterparcel.cpp

示例12: LLFloaterScriptQueue

LLFloaterCompileQueue::LLFloaterCompileQueue(const LLSD& key)
  : LLFloaterScriptQueue(key)
{
	setTitle(LLTrans::getString("CompileQueueTitle"));
	setStartString(LLTrans::getString("CompileQueueStart"));
														 															 
	mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(key.asUUID()));
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:8,代码来源:llcompilequeue.cpp

示例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);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:9,代码来源:llfloaterscriptdebug.cpp

示例14: LLFloater

LLFloaterPay::LLFloaterPay(const LLSD& key)
	: LLFloater(key),
	  mCallbackData(),
	  mCallback(NULL),
	  mObjectNameText(NULL),
	  mTargetUUID(key.asUUID()),
	  mTargetIsGroup(FALSE),
	  mHaveName(FALSE)
{
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:10,代码来源:llfloaterpay.cpp

示例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));
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:44,代码来源:llavatariconctrl.cpp


注:本文中的LLSD::asUUID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。